$|+\ra =\frac{1}{\sqrt{2}}(|0\ra +|1\ra )$. Therefore, the partition function in Eq.(\[cons\]) reads as follows: $$\label{qf}
\mathcal{Z}[\mathbf{J}]=2^M    ~^{\otimes M}\la +|e^{\beta \sum_{e} J_{e}Z_e }\prod_{F} \frac{1+\prod_{e \in \partial F} Z_e}{2}|+\ra ^{\otimes M},$$ where $M$ refers to the number of edges of the lattice. The right hand side of the above equation is in fact an inner product of the following quantum states: $$|\alpha[\mathbf{J}] \ra =e^{\beta \sum_{e} J_{e}Z_e }|+\ra^{\otimes M}=\frac{1}{\sqrt{2}^M}\otimes_{e}(e^{\beta J_e }|0\ra +e^{-\beta J_e }|1\ra),$$

$$\label{inn}
|G\ra =\prod_{F} \frac{1+B_F}{2}|+\ra ^{\otimes M}.$$

Here $B_F  =\prod_{e \in \partial F} Z_e$ which is called a face operator, see Fig.(\[k4\]-b). Finally, the partition function is in the form of $\mathcal{Z}[\mathbf{J}]=2^M \la \alpha[\mathbf{J}] |G\ra$. While $|\alpha \ra$ is simply a product state containing information of the couplings of the Ising model, $|G\ra$ is an entangled state which encodes interaction pattern of the Ising model. Specifically, $|G\ra$ is a Toric code state defined on qubits that live on the edges of the lattice. Note that since $B_F (1+B_F)=(1+B_F )$, it is clear that state $|G\ra$ is stabilized by $B_F$. On the other hand, corresponding to each vertex of the lattice or each face of the dual lattice, there is a vertex operator in the form of $A_v =\prod_{e \in v}X_e$, see 