|q⟩ Bad Qubits

advanced · Programming · Implementing the Surface Code

The Threshold Theorem (Applied)

Building a bigger code only helps if adding qubits actually drives the error rate down. The threshold theorem is the guarantee that it does — provided the hardware is good enough. For the surface code it takes a strikingly practical form.

The threshold condition

There exists a critical physical error rate pthp_{\text{th}}, the threshold, such that:

Below threshold, the logical error rate per round scales approximately as

pL    A(ppth)(d+1)/2,p_L \;\approx\; A \left( \frac{p}{p_{\text{th}}} \right)^{\lfloor (d+1)/2 \rfloor},

where AA is an O(1)O(1) prefactor. The exponent grows with dd, so each step up in distance suppresses errors by a roughly constant factor as long as p<pthp < p_{\text{th}}.

Why a threshold exists at all

A logical error requires a chain of about d/2d/2 physical errors that the decoder mismatches. The number of such low-weight failing configurations grows combinatorially with dd, but the probability of each one shrinks like pd/2p^{d/2}. When pp is small enough, the shrinking probability wins over the growing count, and the net logical error rate decreases with dd. The threshold is precisely the value of pp where these two effects balance.

The surface code's selling point

What makes the surface code so attractive is the value of its threshold. With realistic circuit-level noise and a matching decoder, the surface-code threshold sits near pth1%p_{\text{th}} \approx 1\% — far more forgiving than most other codes, whose thresholds are often an order of magnitude lower. A 1%1\% threshold is within reach of today's best superconducting and trapped-ion hardware, which is why the surface code dominates fault-tolerance roadmaps.

Reading the scaling in practice

The exponential suppression is what lets engineers quote a target. To reach a logical error rate of, say, 101210^{-12} from a physical rate of p103p \approx 10^{-3}, one solves the scaling relation for dd — typically landing in the range d20d \approx 203030. The next lesson turns that distance into a concrete qubit budget, making the cost of fault tolerance explicit.

Sign in on the full site to ask questions and join the discussion.