online) a) Ising spins $s_i$ denoted by black circles live on vertices of a square lattice. Edge spins $S_{ij}=s_i s_j$ denoted by green (light) circles are added on links of the lattice. Product of edge spins belonging to a face $F$ of the lattice should be equal to $1$. b) In a quantum formalism, each constraint corresponding to a face of the lattice is mapped to a face operator $B_F =\prod_{e\in \partial F}Z_e$. It is in fact a stabilizer of the Toric code. There are also another kind of stabilizers $A_v =\prod_{e\in v}X_e$ corresponding to each vertex of the lattice.[]{data-label="k4"}](k4){width="8cm" height="4cm"}

Interestingly, the above partition function can be rewritten in a quantum formalism as follows. We insert new spins $S_e$, (edge spins) denoted by green (light) circles, on the edges of the square lattice, as Fig.(\[k4\]-a) shows. The value of each edge spin $S_e$ is defined as product of the vertex spins living on the two endpoints of the edge $e$, i.e., $S_e =s_i s_j$. Next, we replace the vertex spins in Eq.(\[ranz\]) with edge spins $S_e$. However, we need also to consider the constraints between the edge spins. Specifically, as it is shown in Fig.(\[k4\]-a), corresponding to each face 