Computing Library › Quantum Error Correction
Quantum Error Correction

Z2 Gauge Theory and the Toric Code

The toric code is the ground-state sector of a Z2 lattice gauge theory, a link that explains its stabilizers, charges, and fluxes in physical terms.

Gauge theory on a lattice

A Z2 gauge theory assigns a two-valued gauge field to each lattice edge. Gauss's law is enforced at every vertex, and magnetic flux is measured around every plaquette. Translating these two conditions into qubit language gives exactly the vertex operators A(v) and plaquette operators B(p) of the toric code. The code space is the physical, gauge-invariant Hilbert space of the theory.

Charges and fluxes

Kronos motion — error correction

In the gauge-theory reading, a violated vertex operator is a static electric charge that breaks Gauss's law, and a violated plaquette is a unit of magnetic flux, a vortex. The deconfined phase of the Z2 gauge theory, where charges cost only a constant energy no matter how far apart, corresponds to the topologically ordered phase that protects the code.

This dictionary is more than an analogy. It explains why the toric code is stable against weak perturbations: the deconfined phase is a genuine phase of matter with a spectral gap, and phases of matter are robust to small changes of parameters. It also motivates generalizations. Replacing the group Z2 with a larger or non-abelian group yields qudit and non-abelian codes with richer anyon content.

For simulation work, lattice gauge theories are themselves a leading target for quantum computers, so the same mathematics appears twice: as the structure of the error-correcting code and as the physics one hopes to simulate.