|q⟩ Bad Qubits

advanced · Physics · Surface Codes & Topological Codes

Error Thresholds

The single most important number for a fault-tolerant code is its error threshold pthp_{\text{th}}: the physical error rate below which increasing the code distance decreases the logical error rate. Above threshold, adding qubits makes things worse; below it, the code works arbitrarily well in the large-dd limit. The surface code's threshold is famously high, which is why it dominates hardware roadmaps. This lesson states the threshold and the sub-threshold scaling law you use to size a code.

The competition that defines a threshold

Two effects fight as the distance dd grows:

The second effect wins iff the physical error rate is below the threshold pthp_{\text{th}}. The threshold is exactly the crossing point where curves of logical error rate versus pp — taken at different distances — all intersect.

The surface-code threshold

Under an idealized independent-error model the surface-code threshold maps onto the phase transition of the 2D random-bond Ising model along the Nishimori line, giving

pth10.9%.p_{\text{th}} \approx 10.9\% .

With realistic circuit-level noise (faulty gates, faulty and repeated measurements), the threshold drops to the often-quoted

pth0.51%.p_{\text{th}} \approx 0.5\text{--}1\% .

That 1%\sim 1\% tolerance is generous compared with competing codes and within reach of current hardware — the surface code's headline selling point.

The sub-threshold scaling law

For p<pthp < p_{\text{th}}, the logical error rate per error-correction round follows the empirical law

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

with an O(1)\mathcal{O}(1) prefactor AA. The exponent (d+1)/2\lfloor (d+1)/2 \rfloor is the number of physical faults needed to overwhelm a distance-dd code. The structure is the key insight:

A worked estimate

Take A=0.1A = 0.1, threshold pth=1%p_{\text{th}} = 1\%, physical rate p=0.1%p = 0.1\%, and distance d=5d = 5. Then p/pth=0.1p/p_{\text{th}} = 0.1 and the exponent is (5+1)/2=3(5+1)/2 = 3, giving

PL=0.1×(0.1)3=104.P_L = 0.1 \times (0.1)^3 = 10^{-4}.

A tenfold safety margin in pp and a modest distance-5 patch already yield a logical error of 10410^{-4} per round. Pushing to d=7d = 7 would give 0.1×(0.1)4=1050.1 \times (0.1)^4 = 10^{-5}, and so on — the engineering knob is simply dd.

Try it

Implement the scaling law PL=A(p/pth)(d+1)/2P_L = A\,(p/p_{\text{th}})^{(d+1)/2} for odd dd. With A=0.1A = 0.1, pth=0.01p_{\text{th}} = 0.01, p=0.001p = 0.001, and d=5d = 5, return PLP_L.

Run your code to see the quantum state.

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