boundary and ends in a spin at site $n$. b) The Toric code state corresponding to the Ising model with the above boundary condition will have an open boundary where face operators in the boundary are three-local. To each string $\gamma_n$ we assign a $Z$-type operator $\Gamma_Z =\prod_{i \in \gamma_n }Z_i$.[]{data-label="string"}](string){width="7cm" height="10cm"}

where $J_{ij}=+J~(-J)$ when $i$ and $j$ are endpoints of an edge $e\in E_1  ~(E_2)$. In order to find a quantum formalism for the above relation, let us consider an open boundary condition for the model where spins of the boundary are fixed to $s_0 =+1$, see Fig.(\[string\]). By such boundary condition, we consider a string called $\gamma_n$ which starts from a spin in the boundary and ends in spin $s_n$. Next, since $s_i ^2 =1$, we can rewrite $s_n$ as $s_n s_{n-1}s_{n-1} ... s_1 s_1 s_0$ and therefore, Eq.(\[deg\]) is written in the following form: $$\label{deg2}
m_n[\mathbf{J}]=\frac{\sum_{\mathbf{s}}(s_n s_{n-1})(s_{n-1}s_{n-2})...( s_1 s_0) e^{\beta \sum_{\la i,j\ra }J_{ij}s_i s_j }}{\mathcal{Z}[\mathbf{J}]}.$$ Next, we do the same process done in the previous section for finding the quantum formalism of the partition function. First we replace Ising interactions $s_i s_j$ with edge spins $S_e$ and then these spins are replaced with Pauli operators $Z_e$. Therefore, 