large extent, analytically tractable, thereby increasing both their theoretical and experimental relevance. The $G=G'={\mathbb{Z}}_2$ models in $2D$ and $3D$ are further shown to be in the same universality class as the imaginary time partition function of certain $1D$ and $2D$ models (the group cohomology models [@Chen2011]) of bosonic SPTs. From a numerical perspective our models thus provide an efficient way for performing Monte-Carlo simulations of bosonic SPTs with discrete symmetries (see also Ref.  for the continuous case). They also open a new and more promising experimental route for studying these fascinating strongly interacting phases of matter.

Two dimensions
==============

As a first illustrative example of a $2D$ CTP with $G={\mathbb{Z}}_2$ we consider the following model on the square lattice: $$\begin{aligned}
   \label{eq:Z_sigma_A}
  Z &= \sum_{\sigma,U}e^{-\beta\mathscr{H} }
  \prod_{p}\delta(U_{ij}U_{jk}U_{kl}U_{li} - 1)\, ,\\
  \label{eq:model}
  -\beta\mathscr{H} &= 
  \sum_{\langle i,j\rangle}
  \left\{
    K_1 \sigma_i U_{ij}\sigma_j + K_2 U_{ij}\right\}\, .\end{aligned}$$ Here $\sigma_i=\pm 1$ and $U_{ij}=\pm 1$ are site and link variables, and the product is over plaquettes $p$, having the sites $i,j,k,l$ on their boundary. The model has a ${\mathbb{Z}}_2$ symmetry $\sigma_i\to -\sigma_i$, and it has a ${\mathbb{Z}}_2$ constraint forcing zero flux for the $U$ field through each plaquette.

Conveniently, a non-local transformation ($U_{ij}=\mu_i\mu_j$) maps this model to 