Surface Code

The surface code is the architecture the whole fault-tolerance chapter has been building toward: a Calderbank–Shor–Steane stabilizer code whose every check acts on only four neighbouring qubits, laid out on a two-dimensional grid a real chip can wire. It is the planar descendant of Kitaev's toric code, and it inherits the toric code's decisive trick — logical information is stored not in any qubit but in the homology of the lattice, in whether a string of operators wraps the surface or merely encircles a contractible patch. Because the smallest logical operator is a string traversing the entire code, no local disturbance — exactly what decoherence delivers — can corrupt the stored qubit. Two numbers make this article the flagship of the tier. First, the code distance grows with the linear size of the lattice, d=Ld = L, so the logical error rate falls exponentially in dd once the physical error rate is below threshold. Second, that threshold is astonishingly forgiving: about 10.9%10.9\% for an idealized independent-noise model, and still near 1%1\% under realistic circuit-level noise — an order of magnitude kinder than concatenated codes, and reachable by today's hardware. This article assembles the stabilizer, CSS, syndrome-decoding, and code-distance machinery of the preceding articles into the memory that leading laboratories are racing to scale. Error correction reduces to a concrete task — pair up the syndrome defects with the least-improbable error chain, a minimum-weight perfect matching — and the residual failures are precisely the topologically nontrivial loops. Combined with lattice surgery and magic-state distillation, the surface code becomes a complete blueprint for universal fault-tolerant quantum computation.

Key takeaways
  • The surface code is a topological CSS stabilizer code on a 2D lattice: XX-type star checks and ZZ-type plaquette checks each act on only four neighbouring qubits, so syndrome extraction is geometrically local.
  • Logical information lives in homology — logical operators are noncontractible Pauli strings spanning the lattice — so the distance grows with linear size, d=Ld = L, and no local operator causes a logical error.
  • A single Pauli error lights up a pair of syndrome defects at the endpoints of its error chain; a chain shows only its boundary ∂γ\partial\gamma, so the decoder infers a homology class, not a path — decoding independent X/ZX/Z noise is minimum-weight perfect matching on the defect graph.
  • The threshold is high — pth≈0.109p_{\mathrm{th}} \approx 0.109 for the code-capacity model (the random-bond Ising Nishimori point), ≈2.9%\approx 2.9\% phenomenological, ≈0.5\approx 0.5–1%1\% circuit-level — and below it PL∼(p/pth)⌊d/2⌋+1P_L \sim (p/p_{\mathrm{th}})^{\lfloor d/2\rfloor+1} falls exponentially.
  • Key idea: Encode logical qubits in the homology of a 2D lattice using only weight-4 local CSS stabilizers; errors create pointlike syndrome defects whose minimum-weight pairing corrects all but topologically nontrivial chains, giving a high threshold and exponential distance scaling.

Where this lives today

The surface code has moved from theory paper to laboratory milestone. The single most important experimental question for any platform is whether increasing the code distance lowers the logical error rate — crossing "below threshold" — because that is the signature that adding qubits buys protection rather than more failure modes. In 2024 Google reported exactly this on a superconducting processor: scaling a logical qubit from distance 3 to 5 to 7 lowered the logical error per cycle at each step, with a suppression factor Λ≈2.1\Lambda\approx2.1 per two units of distance and a distance-7 error near 0.14%0.14\% per cycle — the first convincing demonstration that a surface-code memory improves with size and outlives its best physical component. Real-time decoding is now a co-design problem: minimum-weight matching, union-find, and neural-network decoders race to keep up with the microsecond syndrome cycle, since a decoder that lags the machine silently ruins the memory it protects. Resource estimates for cryptographically relevant Shor factoring — millions of physical qubits, thousands of logical qubits, deep magic-state factories — are all quoted in surface-code units, the clearest sign of how thoroughly this one code frames the roadmap to fault tolerance.

The physical picture

Put one physical qubit on every edge of a square lattice. Around each vertex four edges meet: the product of Pauli XX on those four qubits is a star check AvA_v. Around each square face four edges close a loop: the product of Pauli ZZ on those four qubits is a plaquette check BpB_p. Every star and plaquette share no edge or exactly two, so XX and ZZ anticommute an even number of times and all checks commute — a legal stabilizer group. The simultaneous +1+1 eigenspace of every check is the code space, and a violated check is a localized "anyon" excitation. The first figure fixes the anatomy and shows the one fact that makes decoding possible: a chain of errors betrays only its two endpoints.

Figure
A surface-code patch with data qubits on edges. The blue star check multiplies X on the four edges at a vertex, the amber plaquette check multiplies Z around a face, and they commute because they share 0 or 2 edges. A length-3 chain of Z errors in red commutes with every check except the two star checks at its endpoints, so it lights up exactly 2 syndrome defects — the decoder sees the boundary ∂γ, never the path.
Star check A = X·X·X·X, plaquette check B = Z·Z·Z·Z — a Z-chain lights up only its 2 endpoints XXXX A ZZZZ B ZZZ defect defect interior checks stay +1 syndrome = ∂γ, weight 2 data qubit on each edge

A single ZZ error anticommutes with the two star checks at its edge's endpoints, flipping both to −1-1: a pair of charge (ee) defects. Join several ZZ errors into a connected chain and every interior vertex touches two error edges — the sign flips cancel, so the interior check reads +1+1. Only the two free ends touch a single error edge, so the syndrome is exactly the boundary ∂γ\partial\gamma of the chain. This is why the code is decodable and why it is subtle: the syndrome reveals where a chain ends, never which path it took, so the decoder recovers the error only up to a stabilizer — a contractible loop. A recovery differing from the truth by a contractible loop is harmless; one differing by a loop wrapping the surface is a logical error. The second figure carries the payoff number — the threshold that separates "more qubits help" from "more qubits hurt".

Figure
The surface-code threshold. Logical error per cycle P_L versus physical error rate p, for code distances d = 3, 7, 15 under circuit-level noise. The three curves cross at the threshold p_th ≈ 1%. Below threshold, increasing the distance drives P_L down exponentially as P_L ∝ (p/p_th)^((d+1)/2); above threshold, adding qubits makes the logical qubit worse.
The punchline: curves cross at p_th ≈ 1% — below it, larger d wins exponentially 10⁰10⁻²10⁻⁴10⁻⁶10⁻⁸ 00.5%1.0%1.5%2.0% physical error rate p logical error per cycle P_L p_th ≈ 1% d = 3 d = 7 d = 15 crossing

Why is that threshold so high? Because the failure question is topological, not local: a logical error happens only when errors plus recovery accidentally close a loop around the surface, and whether such loops proliferate is a phase transition — the random-bond Ising ordered phase (decoding succeeds) disorders at p≈10.9%p \approx 10.9\% (derived below). That statistical-mechanics threshold, not the tiny suppression window of concatenation, is what the surface code inherits.

The core equations

The two check families define the code; everything else follows from how Paulis commute on the lattice. A star check is a product of XX on the edges at a vertex; a plaquette check a product of ZZ on the edges bounding a face.

Av=∏e∋vXe,Bp=∏e∈∂pZe(1)A_v=\prod_{e\ni v} X_e,\qquad B_p=\prod_{e\in\partial p} Z_e \qquad (1)

where: AvA_v — star (vertex) XX-type stabilizer at vertex vv; BpB_p — plaquette (face) ZZ-type stabilizer on face pp; ee — an edge of the lattice carrying one physical qubit; e∋ve\ni v — edges incident on vertex vv; e∈∂pe\in\partial p — edges on the boundary of face pp. Reading: each check is weight-4 in the bulk, so syndrome extraction touches only nearest neighbours. Because every check commutes, they can be enforced simultaneously as the ground-space condition of a local, frustration-free Hamiltonian — the topological-order viewpoint, with errors as gapped excitations above a degenerate ground space.

H=−∑vAv−∑pBp(2)H=-\sum_v A_v-\sum_p B_p \qquad (2)

where: HH — the parent Hamiltonian whose ground space is exactly the code space. Reading: a violated Av=−1A_v=-1 is an ee (charge) anyon and a violated Bp=−1B_p=-1 is an mm (flux) anyon; local Pauli errors create these defects only in pairs. Counting logical qubits is bookkeeping: subtract the independent checks rr from the physical qubits nn. On a genus-gg surface the answer is topological, and the distance is the shortest noncontractible loop.

k=n−r,k=2g (closed surface),d=L(3)k=n-r,\qquad k=2g\ (\text{closed surface}),\qquad d=L \qquad (3)

where: kk — number of logical qubits; nn — physical qubits (edges); rr — independent stabilizer generators; gg — genus (g=1g=1 for the torus, giving k=2k=2); dd — code distance; LL — linear lattice size. Reading: the ordinary torus stores k=2k=2 logical qubits; a planar patch with boundaries stores k=1k=1. The logical operators are the noncontractible strings — a Xˉ\bar X on one cycle, a Zˉ\bar Z on a crossing cycle. They commute with every check yet act nontrivially on the code space, and anticommute with each other exactly as a logical qubit's XX and ZZ must.

Xˉ=∏e∈γXXe,Zˉ=∏e∈γZZe,{Xˉ,Zˉ}=0(4)\bar X=\prod_{e\in\gamma_X} X_e,\qquad \bar Z=\prod_{e\in\gamma_Z} Z_e,\qquad \{\bar X,\bar Z\}=0 \qquad (4)

where: γX\gamma_X — a homologically nontrivial cycle carrying the logical XX string; γZ\gamma_Z — a complementary nontrivial cycle carrying the logical ZZ string. Reading: the two strings cross an odd number of times, so Xˉ\bar X and Zˉ\bar Z anticommute; neither can be shrunk out of the stabilizer group. The tolerated error rate is a phase-transition point: for independent X/ZX/Z noise with perfect measurements, optimal decoding fails where the associated random-bond Ising model disorders on its Nishimori line.

1−pthpth=e2βNJ,pth≈0.1094(5)\frac{1-p_{\mathrm{th}}}{p_{\mathrm{th}}}=e^{2\beta_N J},\qquad p_{\mathrm{th}}\approx 0.1094 \qquad (5)

where: pthp_{\mathrm{th}} — critical physical error probability (code-capacity model); βN,J\beta_N,J — the Nishimori-line inverse temperature and coupling. Reading: below pthp_{\mathrm{th}} arbitrarily low logical error is achievable by enlarging the lattice; above it, no size helps. Below threshold, the logical error rate is set by the smallest misleading pattern, about half a logical string — giving exponential suppression in the distance.

PL  ∼  A(ppth)⌊d/2⌋+1(6)P_L \;\sim\; A\left(\frac{p}{p_{\mathrm{th}}}\right)^{\lfloor d/2\rfloor+1} \qquad (6)

where: PLP_L — logical error rate per correction cycle; AA — an O(1)O(1) prefactor set by geometry and decoder; ⌊d/2⌋+1\lfloor d/2\rfloor+1 — the number of physical faults needed to fool the decoder. Reading: each increase of dd by 2 multiplies PLP_L by roughly (p/pth)(p/p_{\mathrm{th}}) — one order of magnitude when p/pth≈0.1p/p_{\mathrm{th}}\approx0.1. Finally, decoding is an optimization: weight each candidate chain by its negative log-likelihood and choose the least-weight recovery consistent with the syndrome — a minimum-weight perfect matching on the defect graph.

min⁡R: ∂R=∂E ∑chainsw(chain),w∝−ln⁡p1−p(7)\min_{R:\ \partial R=\partial E}\ \sum_{\text{chains}} w(\text{chain}),\qquad w \propto -\ln\frac{p}{1-p} \qquad (7)

where: EE — the true (unknown) error chain; RR — the recovery chain the decoder applies; ∂R=∂E\partial R=\partial E — the constraint that recovery reproduces the observed syndrome; ww — the log-likelihood edge weight between two defects. Reading: pairing the defects by shortest weighted paths is the maximum-likelihood recovery for independent noise.

Derivation ACounting the logical qubits by Euler characteristic

The surface code's boldest claim — that a featureless sheet of qubits secretly stores logical information — is at bottom a counting statement, and the cleanest proof places qubits on the edges of an L×LL\times L torus and subtracts the independent stabilizer generators from the physical qubits. Vertices, edges, and faces are tracked by the Euler characteristic, and two global product identities among the checks are exactly what leave room for the logical qubits; run on a genus-gg surface, the same argument delivers k=2gk=2g.

Step 1. Count the cells. On the torus every vertex has four incident edges and each edge is shared by two vertices, so V=L2V=L^2, E=2L2E=2L^2, F=L2F=L^2; qubits sit on edges, so n=E=2L2n=E=2L^2. Why: the qubit budget is set by the edges, and the torus gives twice as many edges as vertices.

Step 2. Find the dependencies among checks. Every edge belongs to exactly two stars and two plaquettes, so multiplying all star operators gives the identity, ∏vAv=I\prod_v A_v=I, and likewise ∏pBp=I\prod_p B_p=I: one linear relation per family. Why: a generator that is the product of all the others is not independent, and these two relations free up the logical degrees of freedom.

Step 3. Count independent generators. Subtracting one dependency per family, r=(V−1)+(F−1)=2L2−2r=(V-1)+(F-1)=2L^2-2. Why: the genuine constraints on the 2n2^n-dimensional Hilbert space number rr, not V+FV+F.

Step 4. Assemble the count: k=n−r=2L2−(2L2−2)=2k=n-r=2L^2-(2L^2-2)=2. Equivalently k=2−χ=2gk=2-\chi=2g with χ=V−E+F=0\chi=V-E+F=0 and genus g=1g=1 for the torus; a planar patch with two rough and two smooth boundaries has one dependency fewer and encodes k=1k=1. Why: the count is topological — it depends only on how the surface is connected, which is what makes the logical qubits robust.

Go deeper · Derivation B · 1 minWhy local errors make only paired defects
Derivation BWhy local errors make only paired defects

The entire decoding problem rests on a single structural fact: a connected chain of identical Pauli errors is invisible in its interior and shows up only at its two endpoints, so the syndrome is the boundary of the error rather than the error itself. Establishing this by tracking how a chain of ZZ operators commutes past each star check is what turns a messy pattern of faults into a tidy set of pointlike defects, and it is why recovery need only reproduce a boundary, never guess a path.

Step 1. Take a single edge error ZeZ_e. It shares its edge with exactly two star checks AvA_v (one per endpoint of ee), and on that shared qubit XX and ZZ anticommute, so ZeZ_e flips both checks to −1-1 and commutes with every other. A lone error creates a pair of defects. Why: an error is born as a pair because a single edge has two endpoints.

Step 2. Now take a connected chain γ\gamma of ZZ errors and look at an interior vertex vv. Two edges of γ\gamma meet at vv, so AvA_v picks up two anticommuting crossings and the signs cancel: (−1)2=+1(-1)^2=+1, leaving that check satisfied. Why: the interior of a chain is silent, so a long error is no more visible than a short one.

Step 3. At a free endpoint of γ\gamma only one edge is present, so AvA_v is flipped once and reads −1-1. The syndrome is therefore precisely ∂γ\partial\gamma, formalized by Av(∏e∈γZe)=(−1)∣∂γ∩v∣(∏e∈γZe)AvA_v\big(\prod_{e\in\gamma}Z_e\big)=(-1)^{|\partial\gamma\cap v|}\big(\prod_{e\in\gamma}Z_e\big)A_v. Why: only the ends carry a defect, so the decoder learns endpoints, not routes.

Step 4. Two chains with the same boundary differ by a cycle. If that cycle is contractible it is a product of plaquettes — a stabilizer — and either chain corrects equally; if it wraps the surface it is a logical operator and the mismatch is a logical error. Why: correctability is a homology condition — the deep reason the code protects information at all.

Go deeper · Derivation C · 1 minThe decoding threshold as a random-bond Ising transition
Derivation CThe decoding threshold as a random-bond Ising transition

The most celebrated surface-code number — a code-capacity threshold near eleven percent — is not a coding accident but a phase-transition temperature borrowed from statistical mechanics, and deriving it means recognizing that optimal decoding compares the total probability of whole classes of error chains, not individual chains. Summing the Boltzmann-like weights over all stabilizer-equivalent errors turns the decoding likelihood into the partition function of a 2D Ising model with quenched random bonds fixed by the syndrome, and the decoder succeeds precisely in that model's ordered phase.

Step 1. Write the probability of a specific error pattern EE under independent noise, P(E)∝∏e(1−p)1−ne p neP(E)\propto\prod_e (1-p)^{1-n_e}\,p^{\,n_e} with ne∈{0,1}n_e\in\{0,1\} marking an error on edge ee. Why: independent bit-by-bit noise gives a product measure, the starting point for any maximum-likelihood analysis.

Step 2. Optimal decoding wants not the single most likely EE but the most likely homology class, so sum over all stabilizer-equivalent errors, P(class Eˉ)=∑E∼EˉP(E)P(\text{class }\bar E)=\sum_{E\sim\bar E}P(E). Writing p=12(1−tanh⁡βJ)p=\tfrac12(1-\tanh\beta J) recasts this as an Ising partition function whose bonds are randomly signed wherever the syndrome demands a defect. Why: the class probability is a sum over a huge equivalence set — literally a partition function.

Step 3. The error model ties the Ising temperature to the disorder through the Nishimori condition e−2βJ=p/(1−p)e^{-2\beta J}=p/(1-p), pinning the system to the Nishimori line where gauge symmetry fixes the internal energy. Why: noise probability and temperature are not independent — the coding problem lives on one line in the phase diagram.

Step 4. Decoding succeeds with probability approaching one exactly when the model is ferromagnetically ordered — the domain wall representing a logical string costs free energy and is suppressed. The order-to-disorder transition on the Nishimori line sits at pc≈0.1094p_c\approx0.1094, so pth≈10.9%p_{\mathrm{th}}\approx10.9\%. Why: a confined domain wall means logical strings cannot form; its deconfinement is the code's failure — one and the same transition.

Limiting cases

The surface code's numbers shift with how much of the noise you take seriously — perfect measurements, noisy measurements, or fully faulty circuits — and with the lattice size:

CaseResultMeaning
Code-capacity (perfect measurements)pth≈0.1094p_{\mathrm{th}}\approx 0.1094Independent X/ZX/Z errors with noiseless syndrome extraction; the threshold is the 2D random-bond Ising Nishimori-point disorder.
Phenomenological (noisy measurements)pth≈0.029p_{\mathrm{th}}\approx 0.029Syndrome bits also fail with probability pp; decoding becomes 3D space–time matching (the random-plaquette Z2\mathbb{Z}_2 gauge model).
Circuit-level depolarizing noisepth≈0.005–0.01p_{\mathrm{th}}\approx 0.005\text{–}0.01Every gate, idle step, and measurement is faulty — the realistic operating target; hardware aims for physical rates well below 1%1\%.
Sub-threshold scaling (p<pthp<p_{\mathrm{th}})PL∼A (p/pth)⌊d/2⌋+1→0P_L\sim A\,(p/p_{\mathrm{th}})^{\lfloor d/2\rfloor+1}\to 0Exponential suppression as d→∞d\to\infty; each step d→d+2d\to d+2 multiplies PLP_L by about p/pthp/p_{\mathrm{th}}.
Planar patch, one logical qubitn≈2d2−1n\approx 2d^2-1 qubitsRotated layout: d2d^2 data plus d2−1d^2-1 ancilla qubits store a single distance-dd logical qubit.

Worked examples

1 · Sizing a logical qubit (fully worked)

A superconducting chip runs at physical error rate p=10−3p=10^{-3} with a circuit-level threshold pth=10−2p_{\mathrm{th}}=10^{-2}. A quantum algorithm needs each logical qubit to survive a full run with logical error per cycle PL≲10−10P_L\lesssim 10^{-10}. What code distance is required, and how many physical qubits does that cost per logical qubit?

Step 1. Set up the suppression law. With p/pth=10−3/10−2=0.1p/p_{\mathrm{th}}=10^{-3}/10^{-2}=0.1 and prefactor A≈0.1A\approx0.1, equation (6) gives PL≈(0.1)⌊d/2⌋+2P_L\approx (0.1)^{\lfloor d/2\rfloor+2}. Each step d→d+2d\to d+2 raises the exponent by one, gaining a full order of magnitude.

Step 2. Solve for the exponent. We need (0.1)⌊d/2⌋+2≤10−10(0.1)^{\lfloor d/2\rfloor+2}\le10^{-10}, i.e. ⌊d/2⌋≥8\lfloor d/2\rfloor\ge8, giving d≥17d\ge17; take the smallest odd distance, d=17d=17. Check: ⌊17/2⌋+1=9\lfloor17/2\rfloor+1=9, so PL≈0.1×(0.1)9=10−10P_L\approx0.1\times(0.1)^9=10^{-10}.

Step 3. Convert to qubits. A rotated planar patch uses n≈2d2−1n\approx2d^2-1, so n=2(17)2−1=577n=2(17)^2-1=\mathbf{577} physical qubits for one logical qubit. A slacker 10−610^{-6} target needs only d=9d=9 and n=161n=161 qubits — the cost grows as d2∼(log⁡PL)2d^2\sim(\log P_L)^2. A deep-suppression logical qubit at p=10−3p=10^{-3} costs d=17d=17 and about 577 physical qubits.

2 · Reading a two-defect syndrome

In the bulk of a large lattice, two ZZ errors occur on edges whose star-check endpoints are the vertices uu and ww, separated by 4 lattice steps horizontally. What syndrome appears, and what does a minimum-weight matching decoder do?

Step 1. Locate the defects. The syndrome is the boundary of the total ZZ-error chain. If the two errors are isolated, four star checks light up; if they are the two links of a connected chain from uu to ww, the shared interior vertex cancels and only the two endpoint checks at uu and ww fire. Take the connected case: two defects, at uu and ww.

Step 2. Weight the graph. Nodes are the lit defects and edge weights are −ln⁡[p/(1−p)]-\ln[p/(1-p)] per lattice step. With uu and ww four steps apart, the direct pairing has weight 4×[−ln⁡(p/(1−p))]4\times[-\ln(p/(1-p))], and for small pp this is the least-weight explanation of the pair.

Step 3. Match and recover. Minimum-weight matching pairs uu with ww and proposes a length-4 recovery chain of ZZ operators along a geodesic. Recovery-times-error is a closed loop; because u,wu,w are close and in the bulk, that loop is contractible and the correction succeeds. The decoder never learns the true path — it applies any shortest same-boundary chain, and topology guarantees the difference is a harmless contractible loop.

Physics of the portrait

The surface code descends directly from one 1997 idea: that anyons living on a lattice could store quantum information no local perturbation can touch. The person who saw it is also the person who supplied half the rest of the toolkit — from the phase-estimation algorithm to the theory of topological quantum computation.

Origins · 1 minAlexei Kitaev and how this was discovered
AK
Alexei Kitaev
b. 1963 · topological quantum computation and the toric code

Alexei Kitaev, a Russian-American theoretical physicist now at Caltech, reshaped quantum information twice over. In 1997 he introduced the toric code in "Fault-tolerant quantum computation by anyons" (a preprint that year, published in Annals of Physics in 2003), proposing that logical qubits be stored in the degenerate ground space of a local lattice Hamiltonian whose excitations are abelian anyons — so that only a globally nontrivial operation could alter the encoded state. This was a radical departure from the concatenated codes of Shor and Steane: protection came from topology and geometric locality rather than recursive layers, and the resulting threshold was an order of magnitude higher. With Bravyi he extended the construction to lattices with boundaries (the planar surface code) and to magic-state distillation, the missing ingredient for universality. Kitaev's reach is unusually broad: quantum phase estimation, the complexity class QMA, the Kitaev chain with its Majorana zero modes, and the honeycomb spin model all bear his name. The 2002 paper with Dennis, Landahl, and Preskill, recasting surface-code decoding as a random-bond Ising phase transition, turned his topological memory into the quantitative, threshold-bearing architecture industry now builds. He received the Breakthrough Prize in Fundamental Physics in 2012 and the Dirac Medal in 2015.

History
1997
— Kitaev introduces the toric code, storing qubits in the ground space of a local anyon Hamiltonian
1998
— Bravyi and Kitaev define surface codes with boundaries, the planar version usable on a chip
2002
— Dennis, Kitaev, Landahl, and Preskill map optimal decoding to the random-bond Ising model threshold
2012
— Fowler, Mariantoni, Martinis, and Cleland give the practical circuit-level architecture with a near-1% threshold
2024
— Google demonstrates below-threshold error suppression on a distance-7 surface code

Going further

Texts. Nielsen & Chuang, Quantum Computation and Quantum Information, ch. 10 (stabilizer and CSS codes) · Preskill, Lecture Notes on Quantum Computation, ch. 7 (topological codes and the toric code) · Kitaev, "Fault-tolerant quantum computation by anyons," Ann. Phys. 303 (2003) 2 · Dennis, Kitaev, Landahl, Preskill, "Topological quantum memory," J. Math. Phys. 43 (2002) 4452 · Fowler, Mariantoni, Martinis, Cleland, "Surface codes: towards practical large-scale quantum computation," PRA 86 (2012) 032324 · Kitaev, Shen, Vyalyi, Classical and Quantum Computation (AMS, 2002).

Provenance. Stabilizer commutation, k=2gk=2g via the Euler characteristic, and the homological decoding picture follow Preskill ch. 7 and Kitaev (2003); a verifier should confirm χ=V−E+F=0\chi=V-E+F=0 and k=n−r=2k=n-r=2 for the torus. The code-capacity threshold pth≈0.1094p_{\mathrm{th}}\approx0.1094 is the standard 2D ±J\pm J random-bond Ising Nishimori-point value (Dennis–Kitaev–Landahl–Preskill 2002); the phenomenological (≈2.9%\approx2.9\%) and circuit-level (≈0.5\approx0.5–1%1\%) thresholds are from Fowler et al. (2012) and Wang–Harrington–Preskill. The worked d=17, n=577d=17,\ n=577 figures use n≈2d2−1n\approx2d^2-1. The 2024 below-threshold demonstration and Λ≈2.1\Lambda\approx2.1 suppression are reported by Google Quantum AI.

Prerequisites. Stabilizer Formalism · CSS Codes · Syndrome Measurement and Decoding · Code Distance and Logical Operators · Pauli Group and Clifford Group. Leads to. Magic-State Distillation · Lattice Surgery · Color Codes.

Ask the tutor: Ask me to walk you through decoding a specific syndrome by minimum-weight matching, or to size a logical qubit for your own target error rate and hardware.

Is the surface code the same thing as the toric code?

They are the same construction on different surfaces. Kitaev's toric code lives on a torus with periodic boundaries and encodes k=2g=2k=2g=2 logical qubits, but a torus is not buildable on a flat chip. The planar surface code replaces the periodic boundaries with two kinds of physical edge — "rough" and "smooth" — which play the role the topology used to play, and a single patch then encodes one logical qubit. The bulk physics is identical: the same weight-4 checks, anyonic excitations, and homological decoding. "Surface code" is the umbrella term; the toric code is its closed-surface special case.

Why does a bit-flip error create exactly a pair of defects, never just one?

Because a syndrome defect is the end of an error chain, and a chain has two ends. A single ZZ error lives on one edge, and that edge touches two star checks — one at each endpoint — so both flip. You cannot make an odd number of defects with local Pauli errors: the lattice statement that anyons are created in conjugate pairs. This is why the decoder always pairs up defects; an unpaired defect signals a measurement error or the patch boundary (where a chain can terminate against an edge and hide one endpoint), which is what boundaries and space–time matching handle.

What does minimum-weight perfect matching actually minimize?

It minimizes the total improbability of the recovery. Each candidate chain between two defects is weighted by −ln⁡[p/(1−p)]-\ln[p/(1-p)] per step, so a short chain is cheap and a long one expensive, and the most probable explanation of the syndrome pairs defects by least summed weight — solved exactly in polynomial time by Edmonds' blossom algorithm. For independent XX and ZZ noise this is the true maximum-likelihood decoder; for correlated or depolarizing noise it is a good approximation, and belief-propagation refinements recover the small threshold loss.

How many physical qubits does one logical qubit really cost?

It depends on how much suppression you need. A distance-dd rotated planar patch uses about 2d2−12d^2-1 physical qubits, and the distance is set by how far below threshold you run and how small a logical error you require. At p=10−3p=10^{-3}, reaching PL∼10−10P_L\sim10^{-10} needs roughly d=17d=17 and about 577 qubits; pushing to the 10−1510^{-15} a long algorithm demands can require d∼25d\sim25 and well over a thousand qubits per logical qubit. Add the magic-state factories that supply TT gates and full-scale estimates reach into the millions.

Where does the famous 10.9% number come from, and why is it not what hardware sees?

It is the code-capacity threshold: the largest independent X/ZX/Z error rate a perfect decoder tolerates when syndrome measurements are noiseless, equal to the disorder at which the 2D random-bond Ising model disorders on its Nishimori line, pc≈0.1094p_c\approx0.1094. Real hardware never enjoys perfect measurements. Once syndrome extraction is itself faulty you decode in three dimensions (space plus time) and the threshold drops to about 2.9%2.9\%; once every gate, idle period, and readout can fail, the circuit-level threshold falls to roughly 0.50.5–1%1\%. The 10.9%10.9\% figure is the ceiling, not the operating point.

Why is a high threshold worth more than a small code?

Because the threshold decides whether scaling works at all. Below threshold, every extra pair of distance steps multiplies the logical error rate by a fixed factor, so any target error is reachable by enlarging the lattice; above threshold, adding qubits adds more error than it corrects. A 1%1\% threshold lets today's few-per-mille hardware sit comfortably in the "scaling helps" regime, whereas a concatenated code with effective threshold near 10−410^{-4} would demand far better qubits before it even begins to help. High threshold plus purely local checks is exactly what made large-scale fault tolerance look achievable.

Before this

Where this leads