A surface code is a family of topological stabilizer codes on a two-dimensional cellulation. In a standard square-lattice convention, qubits lie on edges, an X-type check multiplies X on edges meeting a vertex, and a Z-type check multiplies Z around a face.
Vertex and face checks commute because their overlaps contain zero or two edges. A local Pauli operator error changes nearby check signs, producing an error syndrome. Chains of errors have syndromes at their endpoints; a chain connecting appropriate boundaries or winding around a nontrivial cycle can instead implement a logical operation. Locality makes repeated syndrome extraction useful, but a sufficiently long undetected chain can still corrupt the encoded state. The associated surface-code anyon model describes the electric and magnetic check excitations and their mutual braiding.
Join spheres pole to pole, with longitude edges on each sphere and one qubit per edge. For this surface code, omit the Pauli X gates star checks at the two end poles. Include the Pauli Z gates checks on each two-edge face and the Pauli X gates star checks at the interior junctions. The boundary choice is essential for encoding one logical qubit.
Label an edge by , with sphere and longitude . Independent face checks are , , and the junction checks are with . There are independent stabilizer generators on qubits, so the code space has dimension two. These are exactly the checks of a concatenated phase-and-bit-flip repetition code.
A pole-to-pole path has weight , and an equatorial dual cut has weight . They cross once and have zero anticommutator, giving logical operations and quantum code distance . If every pole star is instead included, the star rank is and the code dimension falls to one; the closed chain then carries no logical qubit.
For independent bit flips, summing the probabilities of all error chains in one syndrome and logical class equals, up to a class-independent factor, the partition function of a random-bond Ising model. A reference error fixes bond signs and products of star stabilizers become Ising spin configurations.
On a cylinder with equal anyon-condensing boundaries, the two topological ground states split only through a virtual string implementing a logical operator. A perturbation of strength produces a splitting of order times a path-counting factor times , where is the shortest supported logical-string length.
The toric code is a stabilizer code with a qubit on every edge of a two-dimensional lattice on a torus. A vertex check multiplies Pauli operators on its incident edges, while a face check multiplies Pauli operators around its boundary:The checks commute because a vertex and face share either zero or two edges. The code is their common eigenspace, equivalently the space of ground states of
On the torus, gives two redundant checks. The remaining independent checks leave a four-dimensional code space, encoding two logical qubits. Products of Pauli operators around noncontractible loops act on that information. [ref]
A violated vertex or face check is an excitation. Open strings create pairs of excitations at their endpoints; closed noncontractible strings can change a logical state without creating local excitations. The electric and magnetic excitations are bosons with mutual full-braiding phase , while their composite is a fermion. [ref]
Fault-tolerant quantum computation by anyons by A. Yu. Kitaev. Section 2, string operators and anyon statistics
The surface-code anyons are . They obey ; and are bosons with mutual full-braiding phase , while their composite is a fermion.