Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Topological Codes and Gauge Constraints

    Two errors can produce identical local measurement outcomes yet have different logical effects. In a toric code, the difference is whether the combined error and correction winds around the torus. A finite square lattice lets us check this distinction without diagonalizing its enormous Hilbert space.

    Preparation: Error-correction conditions. We use physical qubits on edges, ideal stabilizer measurements and known measurement outcomes; no noisy-measurement threshold is assumed.

    Physical qubits and commuting checks

    Take an L×LL\times L periodic square lattice with L≥3L\geq3 and one qubit on each of its 2L22L^2 edges. Write h(x,y)h(x,y) for the horizontal edge from (x,y)(x,y) to (x+1,y)(x+1,y) and v(x,y)v(x,y) for the vertical edge to (x,y+1)(x,y+1); coordinates are modulo LL. Define

    Ax,y=Xh(x,y)Xh(x−1,y)Xv(x,y)Xv(x,y−1),A_{x,y}=X_{h(x,y)}X_{h(x-1,y)}X_{v(x,y)}X_{v(x,y-1)}, Bx,y=Zh(x,y)Zv(x+1,y)Zh(x,y+1)Zv(x,y).B_{x,y}=Z_{h(x,y)}Z_{v(x+1,y)}Z_{h(x,y+1)}Z_{v(x,y)}.

    Every star and plaquette share either zero or two edges. Each shared edge contributes a minus sign from XZ=−ZXXZ=-ZX, so all checks commute. The code is their common +1+1 eigenspace, equivalently the ground space of

    H=−Je∑x,yAx,y−Jm∑x,yBx,y,Je,Jm>0.H=-J_e\sum_{x,y}A_{x,y}-J_m\sum_{x,y}B_{x,y}, \qquad J_e,J_m>0.

    There are two relations, ∏Ax,y=I\prod A_{x,y}=I and ∏Bx,y=I\prod B_{x,y}=I, and no further independent ones. The number of independent stabilizers is 2L2−22L^2-2, leaving two logical qubits. These are the toric-code operators of Kitaev, §1, Eqs. (1)–(4).

    A short string and its syndrome

    For a path γ\gamma on the direct lattice, let Z(γ)Z(\gamma) be the product of ZZ on its edges. An interior vertex touches two path edges, so its star still has eigenvalue +1+1. An endpoint touches one and has eigenvalue −1-1. All plaquettes remain +1+1. Thus the measured star defects locate the endpoints, not the complete path. This is the string mechanism in Kitaev, §2, Eq. (5).

    Set L=5L=5 and consider the two-edge error

    E=Zh(0,0)Zh(1,0).E=Z_{h(0,0)}Z_{h(1,0)}.

    The syndrome is A0,0=A2,0=−1A_{0,0}=A_{2,0}=-1, with every other star positive. The obvious correction C0=EC_0=E gives C0E=IC_0E=I. But it is not the only successful correction. Take the detour one row above:

    C1=Zv(0,0)Zh(0,1)Zh(1,1)Zv(2,0).C_1=Z_{v(0,0)}Z_{h(0,1)}Z_{h(1,1)}Z_{v(2,0)}.

    It has the same two endpoints. Multiplying error and correction cancels their endpoint syndrome and produces

    C1E=B0,0B1,0.C_1E=B_{0,0}B_{1,0}.

    Since both plaquettes act as identity on the code, this detour also restores every logical state. The decoder need not discover the actual microscopic error path; it must choose a path in the correct equivalence class modulo plaquette boundaries.

    The same syndrome can hide a logical error

    Define a noncontractible horizontal loop and a crossing dual loop by

    Z‾=∏x=04Zh(x,0),X‾=∏y=04Xh(0,y).\overline Z=\prod_{x=0}^{4}Z_{h(x,0)}, \qquad \overline X=\prod_{y=0}^{4}X_{h(0,y)}.

    Both commute with all stabilizers. They share one edge, so

    X‾ Z‾=−Z‾ X‾.\overline X\,\overline Z=-\overline Z\,\overline X.

    Therefore Z‾\overline Z cannot be a stabilizer: it changes a logical degree of freedom. The alternative correction C2=EZ‾C_2=E\overline Z is the other three-edge route around the row. It has the same measured endpoints as EE, but

    C2E=Z‾.C_2E=\overline Z.

    The syndrome has vanished while a logical error remains. The physical distinction is visible by starting in a +1+1 eigenstate of X‾\overline X: the wrong correction produces a −1-1 eigenstate.

    For L=5L=5, the minimum nontrivial loop length is five. Hence the code distance is five and all errors of weight at most two can be corrected by an appropriate decoder. For the displayed syndrome, the two-edge path is shorter than its three-edge winding competitor. This worst-case distance statement is separate from a threshold claim for a stochastic noise model.

    examples/quantum-information/quantum-error-correction/check_finite.py represents Pauli strings by binary edge vectors. Exact arithmetic over F2\mathbb F_2 finds star and plaquette ranks 2424 each, checks all commutators, verifies the two successful corrections, and proves that the winding residual is outside the plaquette span. All fifty single-edge ZZ errors have distinct endpoint syndromes. No 2502^{50} state vector is required.

    A stabilizer constraint is not automatically gauge redundancy

    Here the full edge-qubit Hilbert space is physical. A state with Ax,y=−1A_{x,y}=-1 is an allowed excited state, distinguishable by a measurement and assigned a higher energy by HH. Restricting attention to the code or to a low-energy sector does not delete those states from the physical theory.

    A gauge description may instead impose Gauss constraints as part of defining the physical state space and restrict its observable algebra. Such a description can be useful, but its constrained states, charged sectors and allowed operators must be specified. Calling every stabilizer a gauge transformation would obscure the experimentally measurable syndrome in the qubit model. Kitaev discusses the relation to a gauge-theory description in §3; the distinction here is between a microscopic physical code and a chosen constrained description of it.

    Summary

    Local checks detect string endpoints. Correct recovery cancels the error up to a contractible stabilizer loop; a noncontractible residual implements a logical operation. The finite toric code is a physical qubit system, and its stabilizer constraints should not be conflated with an unspecified gauge redundancy.

    Exercises

    1. What is the energy cost of the displayed open ZZ string? What happens when its two endpoints meet after winding once around the torus?
    Solution

    Each violated star changes its term from −Je-J_e to +Je+J_e, costing 2Je2J_e. Two endpoints therefore cost 4Je4J_e, independent of their separation in this commuting Hamiltonian. When they meet, the star defects disappear and the energy returns to the ground-state value. If the closed path winds nontrivially, the final state differs by Z‾\overline Z and can lie in a different logical state at the same energy. Equal energy and zero syndrome do not imply successful recovery.

    1. Derive the analogous syndrome for an XX string on the dual lattice, and identify its successful correction criterion.
    Solution

    A dual path crosses physical edges carrying XX. It commutes with every star, while a plaquette anticommutes precisely when the dual path has an endpoint at its center. Thus only the two endpoint plaquettes have eigenvalue −1-1. An error and correction whose combined dual path is contractible differ by a product of star operators and act trivially on the code. A noncontractible dual residual is a logical XX operator; it anticommutes with a direct-lattice logical ZZ loop crossing it once.

    References

    • A. Kitaev, Fault-Tolerant Quantum Computation by Anyons, §1, Eqs. (1)–(4), §2, Eq. (5), and §3 on gauge-theory interpretation. The L=5L=5 correction paths above are worked explicitly in the companion calculation.

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.