Correctness for the ideal decoder implies correctness for a *-decoder
OpenQAlgorithms.GottesmanIntro.exRecCorrectStar_of_exRecCorrectThis lemma lets the level-reduction argument keep track of error syndromes.
Fix a fault-tolerant protocol for an code with ideal decoder . A *-decoder is a unitary from one code block to one qubit together with a syndrome register , such that discarding the syndrome gives the ideal decoder:
Let an ExRec of any type be given, with a fixed Pauli fault arrangement, either full or with some trailing EC steps removed. If the ExRec is correct for the ideal decoder, then it is correct for :
- Gate or wait ExRec with gate on blocks: there is a quantum operation on the syndrome registers such that , with (eq. (83)). The operation may depend on the faults and on .
- Preparation ExRec: for some syndrome state .
- Measurement ExRec: the syndrome is discarded immediately, so the condition is diagram (74) with in place of .
All equalities are of superoperators.
Formalization Note The truncation set may be empty (the lemma as stated) or not: the source says on p.39 that Lemma 2 'also works for truncated ExRecs', and Lemma 3 uses it that way. The fault-tolerance hypothesis on the protocol is the section's standing context (the ExRec is built from fault-tolerant gadgets).
import Definitions.Def_QAlgorithms_Defs_FTCircuit set_option autoImplicit false
namespace QAlgorithms.GottesmanIntro
/-- Gottesman intro p.38, Lemma 2: "If an ExRec is correct for an ideal decoder, it is correct
for a *-decoder." Let `P` be a fault-tolerant protocol and `W` a *-decoder for its ideal decoder
(a unitary from a block to one qubit ⊗ a syndrome register `Fin σ` whose syndrome-discarded
version is `P.dec`, p.37–38). For every ExRec type `κ`, every Pauli fault arrangement `F` and
every set `trunc` of removed trailing ECs (`∅` for a full ExRec; p.39: Lemma 2 "also works for
truncated ExRecs"), if the ExRec is correct for the ideal decoder then it is correct for `W`:
for a gate or wait ExRec, eq. (83) holds for some quantum operation `V` on the syndrome
registers (chosen after the faults); for a preparation ExRec, the *-decoded output is
`|0⟩⟨0| ⊗ τ` for some syndrome state `τ`; for a measurement ExRec, the syndrome is discarded. -/
theorem exRecCorrectStar_of_exRecCorrect (P : FTProtocol) (hP : P.IsFaultTolerant) {σ : ℕ}
(W : Matrix (Bool × Fin σ) (Qubits P.n) ℂ) (hW : IsStarDecoder P.dec W) (κ : LocKind)
(F : ExRecFaults κ) (trunc : Finset (Fin κ.trailCount)) (hcorr : ExRecCorrect P κ F trunc) :
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 protocol. is a protocol (code , encoder , decoder , gadgets , EC circuit, classical decoding , parameter ) satisfying the full fault-tolerance condition . This condition comprises:
- the code is 2-dimensional and detects every operator supported on qubits;
- is an isometry onto ;
- is a Kraus channel that perfectly decodes encoded states hit by any operator in the span of weight- Pauli strings, up to the factor ;
- all gadgets are well-formed with the expected live-qubit flows;
- the properties Meas, Prep A/B, Gate A/B and EC A/B hold under fault counts plus filter levels .
The matrix . is a natural number and is a complex matrix, with rows indexed by pairs (bit, element of ). The hypothesis says is a -decoder for :
- and , so is unitary, which forces ;
- for every , where traces out the -dimensional factor.
The remaining data. is any location kind, and is ExRec fault data for :
- leading EC arrangements , one per input block (none for prep);
- a gadget arrangement ;
- trailing arrangements , one per output block (none for meas).
is any truncation set of output blocks. The hypothesis is that the ExRec is correct with truncation , meaning:
- prep: , with if and otherwise.
- meas: for both , .
- gate/wait:
The objects in these conditions are defined as follows.
- . runs the EC gadget under the Pauli faults of , with ancillas in ; it sums over measurement records and traces out the ancillas.
- .
- , and . These are the analogous gadget maps. is the trace of the outcome weight over records decoding by to .
- . Conjugation by , , CNOT (first wire is the control), or for wait.
Statement. The -ExRec is correct, i.e.:
- prep: there is a density matrix on (PSD, trace 1) with
- meas: for both ,
- gate/wait: there is a channel (finite Kraus form) on the -fold product of -dimensional systems such that
Here on each block. regroups the pairs into (all bits, all -parts), applies , conjugates by , and regroups back.
No bound on fault counts is assumed.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.