A good truncated ExRec is correct for ideal decoders and *-decoders
OpenQAlgorithms.GottesmanIntro.good_truncated_exRec_correctThis lemma extends Theorem 6 to the truncated extended rectangles that appear when bad rectangles are pushed through in level reduction.
Fix an code with ideal decoder and fault-tolerant gadgets satisfying Definitions 2–5, with Pauli faults. A truncated ExRec is an ExRec of type from which the trailing EC steps on a nonempty set of output blocks have been removed (Definition 10). Only ExRecs with trailing ECs can be truncated: gate, wait and preparation ExRecs. It is good if the remaining locations contain at most faults:
Then:
- the truncated ExRec is correct for the ideal decoder, i.e. diagrams (72)/(73) hold with the removed trailing EC steps deleted;
- for every *-decoder of , the truncated ExRec is correct for (eq. (83) and its preparation version, with the removed trailing EC steps deleted).
Formalization Note The truncation set is a nonempty Finset of output blocks. For a measurement ExRec there are no output blocks, so the hypothesis cannot hold, matching the source.
import Definitions.Def_QAlgorithms_Defs_FTCircuit set_option autoImplicit false
namespace QAlgorithms.GottesmanIntro
/-- Gottesman intro p.38, Lemma 3: "A good truncated ExRec is correct for both ideal decoders and
*-decoders." Let `P` be a fault-tolerant protocol (Defs. 2–5). For every ExRec type `κ`, every
nonempty set `trunc` of output blocks whose trailing EC is removed (a truncated ExRec, Def. 10;
measurement ExRecs have no trailing EC, so for them the hypothesis is void), and every Pauli
fault arrangement `F` with at most `t` faults in the remaining locations (good, Def. 10), the
truncated ExRec is correct for the ideal decoder, and it is correct for every *-decoder `W` of
the ideal decoder. -/
theorem good_truncated_exRec_correct (P : FTProtocol) (hP : P.IsFaultTolerant) (κ : LocKind)
(F : ExRecFaults κ) (trunc : Finset (Fin κ.trailCount)) (htrunc : trunc.Nonempty)
(hgood : F.count P trunc ≤ P.t) :
ExRecCorrect P κ F trunc ∧
∀ (σ : ℕ) (W : Matrix (Bool × Fin σ) (Qubits P.n) ℂ), IsStarDecoder P.dec W →
ExRecCorrectStar P W κ F trunc := by
sorry
end QAlgorithms.GottesmanIntro
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The data.
- . A protocol (code , encoder, decoder , gadgets , EC circuit , classical decoding , parameter ) satisfying the full fault-tolerance condition. This condition comprises:
- a 2-dimensional code detecting all operators on qubits;
- an isometric encoding onto ;
- a Kraus-channel decoder that perfectly decodes encoded states hit by operators in the span of weight- Paulis;
- well-formed gadgets with the expected live-qubit flows;
- the properties Meas, Prep A/B, Gate A/B and EC A/B, whenever fault counts plus filter levels are .
- . Any location kind.
- . ExRec fault data: leading EC arrangements (none for prep), a gadget arrangement , and trailing EC arrangements (none for meas).
- . A nonempty set of output-block indices.
- For meas there are no output blocks, so this hypothesis cannot hold and the statement is vacuous for meas.
- For prep it forces .
- Hypothesis .
where is the number of locations of at which places a Pauli pair.
Conclusion, part 1: the truncated ExRec is correct.
- prep: . The trailing EC is omitted, since .
- gate/wait (, , CNOT, wait):
Here:
- applies the identity on blocks and on the others;
- the gadget maps run the gadget under the Pauli faults with ancillas in , sum over measurement records, and trace out the ancillas;
- is conjugation by , , CNOT (first wire is the control), or .
Conclusion, part 2: the -version holds for every -decoder. Take every and every matrix with , and for all . Then:
- prep: there is a density matrix on with .
- gate/wait: there is a Kraus channel on the -parts such that
Here on each block. applies to the joint -parts and conjugates the joint bit-parts by .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.