The code-capacity threshold: independent errors, two or more, and concatenation #
Category: 1-Mathlib (CSD-free; staged as a Mathlib-upstream candidate). BACKLOG #51 (row 14's part (c)), the probabilistic core of the code-capacity threshold argument.
Glossary: https://glossary.constraintsurfacedynamics.com/concatenated-code/
Plain-language, CSD-role and formal statements of concatenated codes, with this module as
the Lean anchor. Kept symmetric by scripts/check-glossary.sh.
A distance-3 code corrects any single error, so an encoded block fails only when two or more
of its n qubits are hit. Under independent noise of rate p that happens with probability at
most C(n, 2) p² (the union bound over pairs). Concatenating the code k times replaces p by
c p² at each level (c = C(n, 2)), giving (c p)^{2^k} / c, which is below p once
c p ≤ 1 and tends to 0 once c p < 1: the threshold p < 1/c.
- ★
measure_pi_two_or_more_le— under the product ofncopies of a probability measure, the patterns with two or more coordinates in a set of measure≤ qhave measure≤ C(n, 2) q²; codeCapacityBound— the recursionp ↦ c p²;codeCapacityBound_eq— the closed form(c p)^{2^k} / c;codeCapacityBound_le— belowpwhenc p ≤ 1; ★tendsto_codeCapacityBound— the threshold: the bound tends to0whenc p < 1;ConcatPat,concatMeasure,concatBad— the error patterns of ak-fold concatenatedn-block code under independent noise, with the bad patterns (an error at level0; two or more bad sub-blocks at levelk + 1), and ★★concatMeasure_concatBad_le— the code-capacity recursion: the bad patterns at levelkhave probability at mostcodeCapacityBound c p k.
The quantum half — that a block whose pattern is not bad is restored by the recovery — is the
consumer's (Empirical/QM/QEC/SteaneThreshold.lean for the Steane code at level 1).
References: E. Knill, R. Laflamme, W. Zurek, Resilient quantum computation, Science 279 (1998);
D. Aharonov, M. Ben-Or, Fault-tolerant quantum computation with constant error rate, SIAM J.
Comput. 38 (2008), §2 (the code-capacity recursion); specs/BACKLOG.md #51;
specs/steane-plan.md.
★ Two or more of n independent events of probability ≤ q occur with probability
≤ C(n, 2) q²: under the product of n copies of a probability measure ν, the patterns with
at least two coordinates satisfying P have measure at most C(n, 2) · q² when ν {P} ≤ q
(the union bound over the pairs of coordinates, each pair cylinder having measure ν {P}²).
The code-capacity recursion: p ↦ c p², iterated k times from p.
Equations
- codeCapacityBound c p 0 = p
- codeCapacityBound c p k.succ = c * codeCapacityBound c p k ^ 2
Instances For
★ The threshold: below p < 1/c the concatenated failure bound tends to 0.
The independent noise on k-level patterns: ν on each qubit, the product across blocks,
bundled with its probability-measure proof (which the next product needs).
Equations
- concatMeasure n ν 0 = ⟨ν, inst✝⟩
- concatMeasure n ν k.succ = ⟨MeasureTheory.Measure.pi fun (x : Fin n) => ↑(concatMeasure n ν k), ⋯⟩
Instances For
The bad patterns, as a Boolean test: an error at level 0; two or more bad sub-blocks at
level k + 1.
Equations
Instances For
★★ The code-capacity recursion on error patterns. Under independent noise with
per-qubit error probability at most p, the bad patterns of the k-fold concatenated n-block
code have probability at most codeCapacityBound (C(n, 2)) p k = (C(n, 2) p)^{2^k} / C(n, 2).