# Surface-Codes-Based Quantum Communication Networks
## 2 Surface Codes for Quantum Networking and Distributed Computing  
The surface code belongs to the class of topological codes [1] and it is defined on a 2-D lattice, with one illustrative example provided in Figure 1, with qubits being clearly indicated in Figure 1a. The stabilizers of plaquette type can be defined as provided in Figure 1b. Each plaquette stabilizer denoted by \(X\) (\(Z\)) is composed of Pauli \(X\) (\(Z\))-operators on qubits located in the intersection of edges of corresponding plaquette. As an illustration, the plaquette stabilizer denoted by \(X\) related to qubits 1 and 2 will be \(X_{1\times 2}\). The plaquette stabilizer denoted by \(Z\), related to qubits 5, 6, 8, and 9, will be \(Z_{5}Z_{6}Z_{8}Z_{9}\). To simplify the notation, we can use the representation provided in Figure 1c, where the shaded plaquettes correspond to all-\(X\) containing operators' stabilizers, while the white plaquettes correspond to all-\(Z\) containing operators' stabilizers. The stabilizers require only local qubits' interaction, which is not true for other classes of quantum error correction codes. The weight-2 stabilizers are allocated around perimeter, while weight-4 stabilizers are located in the interior. The logical operators for this code are run over both sides of the lattice, as shown in Figure 1d, and can be represented as \(\overline{X}=X_{3}X_{6}X_{9}\), \(\overline{Z}=Z_{1}Z_{2}Z_{3}\). The codeword length is determined as the product of side lengths, expressed in number of qubits, and, for the surface code from Figure 1, we have that \(n=L_{\rm x}\times L_{\rm z}=3\times 3=9\). On the other hand, the number of informati  
Figure 1: Illustration of a surface code: (**a**) the qubits are located in the lattice positions, (**b**) all-\(X\) and all-\(Z\) plaquette operators, (**c**) popular representation of surface codes in which stabilizers are clearly indicated, and (**d**) logical operators. minimum distance of this code is determined as the minimum side length, that is \(d=\min(L_{\mathrm{x}},L_{\mathrm{z}})=3\), indicating that this code can correct a single qubit error. Let us now specify the _rules of the game_, that is the operations that can be applied to the patches (qubits), which can be categorized as [14]: (i) _initialization_, (ii) _qubit measurements_, and (iii) _patch deformations_. Compared to computing only limited number of operations are required in quantum networking. With each of these operations, we associate the cost, expressed in terms of time-steps, with each time-step (t.s.) corresponding to \(\
eg d\) code cycles (related to the measuring all stabilizers \(d\) times), with \(d\) being the distance of underlying surface code per tile. One-qubit patches, shown in Figure 2 as \(|q_{1}\rangle\) and \(|q_{2}\rangle\), can be initialized to \(|0\rangle\) or \(|+\rangle\) states, while two-qubit patches, shown in Figure 2 as \(|q_{3}\rangle\), to \(|00\rangle\) or \(|++\rangle\) states, with associated cost being 0 t.s. (The logic \(|+\rangle\)-state indicates that all physical qubits are initialized into \(|+\rangle\)-state.) In principle, one-qubit patches can be initialized to the arbitrary states, such as the _magic state_\(|m\rangle=|0\rangle+\exp(|\mathrm{i}\pi/4\rangle|1\rangle)\); however, an undetected Pauli error [1] can spoil the initialized state. The _single-patch measurements_ can be performed in \(X\) or \(Z\) bases, and after the measurement the corresponding patches get removed from the board, thus freeing up the occupied tiles for future use. The cost associated with single-patch measurements is 0 t.s. For _two-patch measurements_, when the edges in neighboring tiles are different, we can perform the product measurements. As an illustration, the product \(Z\otimes Z\) between adjacent patches can be measured as illustrated in Figure 3 (left).