Level reduction, and the probabilistic join #
Category: 1-Mathlib (CSD-free). BACKLOG #97, split out of #62 (d2) — the last of that row's remainder.
Three things were deliberately left out of #94, #95 and #96, and they are what this file supplies:
the recursion (a level-k gadget is a level-(k−1) circuit), the fault count, and the
join of the deterministic and probabilistic halves into one statement.
The deterministic half is #62 (d1)'s ★★★ correctedRun_eq_idealRun; the arithmetic half is #51's
codeCapacityBound with ★★ concatMeasure_concatBad_le, the code-capacity recursion on error
patterns. Neither is re-proved here. What is new is the lifting, the union bound, and the step from
"the good event has large probability" to "the output is exactly the ideal one with large
probability".
Level reduction #
- ★★★
isCorrectedStep_correctedRun— a corrected circuit is a corrected step one level up: if every gadget ofcis corrected andidealRun cis the gadget the next level wants, thencorrectedRun cis a corrected step for it. Thepreserveshalf comes free fromisCodeState_idealRun, so no extra hypothesis is needed; IsCorrectedAtLevel P k ideal impl— the recursive simulation: at level0a corrected step, and at levelk + 1the corrected run of a circuit whose gadgets are corrected at levelk;- ★★★
isCorrectedStep_of_isCorrectedAtLevel— correctness at every level follows from correctness at level 0, by induction on the tower. This is the recursion the threshold theorem runs on, and with it ★★★correctedRun_eq_idealRun_of_level: a circuit of level-kgadgets computes the ideal circuit's output.
The probabilistic join #
★★★
one_sub_le_measure_output_eq— the join, with no measurability hypotheses at all: if the output is the ideal one on every pattern that makes no gadget bad, and each gadget is bad with probability at mostq, then the output is ideal with probability at least1 − N · q. Subadditivity does all the work —1 ≤ μ s + μ sᶜholds for arbitrary sets — so nothing has to be shown measurable;ConcatPat-valued circuit patterns,circuitMeasure, and ★circuitMeasure_coord, the one-coordinate marginal of the product (which does need measurability, supplied by ★measurableSet_of_concatPat: every set of patterns is measurable, since the pattern spaces are finite with measurable singletons);★★★
one_sub_le_measure_output_eq_concat— the row's statement: for a circuit ofNlevel-kconcatenated gadgets under independent noise of rate at mostp,μ {output = ideal} ≥ 1 − N · (C(n,2) · p)^(2^k) / C(n,2),which is
1 − N (cp)^{2^k}/cwithc = C(n, 2). The deterministic input is the hypothesis that a pattern making no gadget bad gives the ideal output — exactly what #96's good extended rectangles andisCorrectedStep_of_isCorrectedAtLeveldeliver;★★
tendsto_one_sub_codeCapacityBound— and below threshold the bound tends to1as the level grows, from #51'stendsto_codeCapacityBound.
Honest scope #
⚠️ The deterministic input is a hypothesis, and this file does not discharge it. hgood says a
pattern with no bad gadget yields the ideal output. For a concrete code that is what #96's rectangles
plus the level recursion above give — but no concrete gadget set is plugged in here, so nothing
below is a threshold theorem for the Steane code. The row's statement is proved with its
deterministic premise named, not assumed away.
⚠️ "Bad" is a pattern predicate, not a physical fault model. isBad counts two-or-more bad
sub-blocks recursively; nothing here derives it from a circuit's fault locations, and the
correspondence between a gadget's faults and a ConcatPat is not constructed. The locality
assumption — that a gadget's failure depends only on its own block's pattern — is built into the
product measure and is a modelling choice, visible in the statement as the independence of
circuitMeasure.
⚠️ Independent noise. circuitMeasure is a product across gadgets and across blocks. Correlated
noise is outside everything below, and so is any adversarial or non-Markovian model.
⚠️ No gate counts and no overhead. N is the number of gadgets, given; nothing bounds the
circuit size needed to simulate a given computation, and no polylogarithmic-overhead claim is made or
implied. That is the part of a threshold theorem this file does not touch.
⚠️ The constant is C(n, 2), from the two-or-more union bound. It is not claimed sharp, and no
optimised threshold value follows from it.
⚠️ Maps, not channels, as in #62 (d1) and #96: no positivity or trace preservation is imposed anywhere, so "output" means the value of a map on a matrix.
References #
Mathlib/QuantumInfo/FaultTolerantComposition.lean (#62 (d1));
Mathlib/QuantumInfo/ExtendedRectangle.lean (#96);
Mathlib/Probability/CodeCapacityThreshold.lean (#51, codeCapacityBound,
concatMeasure_concatBad_le); specs/BACKLOG.md #97, #96, #95, #94, #86, #62, #51;
specs/future-work.md.
Level reduction #
★★★ A corrected circuit is a corrected step one level up. The hypothesis is only that the
circuit's ideal run is the gadget the next level wants; preserves then comes free from
isCodeState_idealRun. This is the lifting the recursive simulation runs on.
The recursive simulation. At level 0 a gadget is a corrected step; at level k + 1 it is
the corrected run of a circuit whose gadgets are corrected at level k.
Equations
- One or more equations did not get rendered due to their size.
- QuantumInfo.IsCorrectedAtLevel P 0 x✝¹ x✝ = QuantumInfo.IsCorrectedStep P x✝¹ x✝
Instances For
★★★ Correctness at every level follows from correctness at level 0. The induction over the
tower: each level's circuit is corrected because its gadgets are, and then the level above is a
corrected step by isCorrectedStep_correctedRun.
★★★ A circuit of level-k gadgets computes the ideal circuit's output.
The join: a large good event gives a correct output #
★★★ The probabilistic join. If the output is the ideal one whenever no gadget is bad, and each
of the N gadgets is bad with probability at most q, then the output is ideal with probability at
least 1 − N · q.
⚠️ No measurability hypotheses: subadditivity gives 1 ≤ μ s + μ sᶜ for arbitrary sets, and
monotonicity does the rest.
The concatenated instance #
Equations
- QuantumInfo.instFintypeConcatPat n 0 = { elems := QuantumInfo.instFintypeConcatPat._aux_1 n, complete := ⋯ }
- QuantumInfo.instFintypeConcatPat n k.succ = { elems := QuantumInfo.instFintypeConcatPat._aux_4 n k (QuantumInfo.instFintypeConcatPat n k), complete := ⋯ }
★ Every set of patterns is measurable: the pattern spaces are finite and have measurable singletons.
The fault patterns of a circuit of N gadgets, each a level-k concatenated block.
Equations
- QuantumInfo.CircuitPat N n k = (Fin N → ConcatPat n k)
Instances For
Independent noise across the gadgets of the circuit. ⚠️ Independence is a modelling choice, and it is visible here.
Equations
- QuantumInfo.circuitMeasure N n ν k = MeasureTheory.Measure.pi fun (x : Fin N) => ↑(concatMeasure n ν k)
Instances For
★ The one-coordinate marginal of the circuit's noise is one gadget's noise.
★★★ The threshold statement. For a circuit of N gadgets, each a level-k concatenated
block under independent noise of rate at most p, the output is exactly the ideal one with
probability at least
1 − N · (C(n,2) · p)^(2^k) / C(n,2),
which is the row's 1 − N (cp)^{2^k}/c. The deterministic premise hgood — a pattern with no bad
gadget gives the ideal output — is what #96's good extended rectangles and
isCorrectedStep_of_isCorrectedAtLevel supply for a concrete gadget set; it is named here, not
assumed away.
★★ Below threshold the bound tends to 1. With C(n,2) · p < 1, raising the concatenation
level drives the failure probability to 0, so the output is ideal with probability tending to 1.
From #51's tendsto_codeCapacityBound; the limit is of the bound, not of the measure.