Code distance required for a target logical error rate
Inverting the below-threshold scaling ansatz gives the smallest odd surface-code distance whose logical error rate per round meets a target. The distance grows only logarithmically with the inverse target, while the qubit count per patch grows quadratically with the distance.
Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01
AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.
Derivation. Under the scaling ansatz,
pL(d) decreases with d, so the set of admissible distances is an up-set and its
smallest odd member is the required distance. Taking logarithms of
A(p/pth)(d+1)/2≤pLtarget and dividing by
ln(pth/p)>0 gives (d+1)/2≥ln(A/pLtarget)/ln(pth/p),
which is the approximate closed form before rounding up to an odd integer.
Consequences. With Λ=pth/p, each increase of d by 2
multiplies the logical error rate by 1/Λ, so reaching a target ten times smaller
costs 2/log10Λ more units of distance. A rotated surface-code patch with
one ancilla per check uses 2d2−1 physical qubits
(rotated surface code), so the footprint grows like
(ln(1/pLtarget)/lnΛ)2: logarithmic sensitivity to the
target, but strong sensitivity to Λ, that is to the physical error rate.
For example, with A=0.1 and Λ=10, a target of 10−12 per round needs
(d+1)/2≥11, so d=21 and 881 physical qubits per patch; with Λ=20
it needs (d+1)/2≥11/log1020=8.45, so (d+1)/2=9, d=17 and 577
qubits per patch.
Holds when
The logical error rate per round follows the scaling ansatz pL(d)≈A(p/pth)(d+1)/2 with fitted constants A and pth, and p<pth.
The result inherits every limitation of that fit; it is an algebraic inversion, not an independent physical statement.
Claude (AI drafting assistant)Writing, original draft (CRediT roles)
Review history
Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)
Algebraic inversion of A (p/p_th)^((d+1)/2) <= target re-derived; ansatz form compared with Fowler et al. arXiv:1208.0928 (d_e = (d+1)/2 scaling); worked examples recomputed numerically (Lambda=10 -> (d+1)/2 >= 11, d=21, 881 qubits; Lambda=20 -> 8.455, d=17, 577 qubits); 2d^2-1 qubits per rotated patch re-derived.
Revision history
2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10
Current revision e73caf1a283f98f7. Source file knowledge/records/equation/code-distance-from-target-logical-error.md in the content repository (readable there once it is public).