The Surface Code
The surface code arranges qubits on a 2D lattice with four-body local checks, offering a high threshold and hardware-friendly geometry.
A local, planar code
The surface code places data qubits on the edges of a two-dimensional square lattice, with stabilizer checks associated to the plaquettes (faces) and vertices (stars). Vertex checks are products of X on the four edges meeting a vertex; plaquette checks are products of Z on the four edges bordering a face. Every check touches only four neighboring qubits, so all interactions are geometrically local, the key reason the surface code suits superconducting and other planar hardware.
On a planar patch with suitable boundaries, the code encodes one logical qubit. The distance equals the linear size of the lattice: a d-by-d patch corrects up to (d-1)/2 errors and uses on the order of d^2 physical qubits per logical qubit.
Errors as strings
A chain of X errors on adjacent edges triggers stabilizers only at its two endpoints; the interior anticommutations cancel. So the syndrome consists of isolated defects marking the ends of error strings. Decoding means pairing up these defects with the most likely connecting chains, a task solved by minimum-weight perfect matching. A logical error occurs only when an error string spans the lattice from boundary to boundary, which requires order d errors, hence the distance.
- Data qubits on edges; X-checks on vertices, Z-checks on plaquettes.
- All checks are weight-4 and local, ideal for 2D chip layouts.
- Syndromes are string endpoints; decoding is a matching problem.
- Distance grows with lattice size, so protection scales with qubit count.
Why it dominates
The surface code has one of the highest known thresholds, near 1 percent under circuit-level noise, meaning hardware only needs per-gate error rates below roughly that value for encoding to help. Combined with its 2D locality, this makes it the leading candidate for near-term fault-tolerant machines. Logical operations are performed by lattice surgery and code deformation, and non-Clifford gates are supplied by magic state distillation.
Its close relative on a torus, the toric code, is the original theoretical model from which the surface code descends.