Steane error correction: final errors lie only on the fault locations
OpenQAlgorithms.GottesmanIntro.steaneEC_claim1This is the key claim in the proof that Steane error correction satisfies property EC A (Gottesman intro p.28).
Let be binary linear codes with , and let be their CSS code, spanned by the states for . Steane error correction is applied to a data block in an arbitrary state . The state may be entangled with a reference system , and its incoming error is unrestricted. The procedure runs as follows:
- A phase ancilla is prepared in the encoded and a bit-flip ancilla in the encoded .
- A transversal CNOT is applied with the phase ancilla as control and the data as target. Then a transversal CNOT is applied with the data as control and the bit-flip ancilla as target.
- The phase ancilla is measured in the Hadamard-rotated basis, giving a word . The bit-flip ancilla is measured in the standard basis, giving .
- Classical decoders return with the same -syndrome as and with the same -syndrome as . Then is applied on the qubits of and on the qubits of . This correction step is error-free.
The faults are arbitrary operators. They may act within on the prepared ancillas, and within the pairs (data qubit , ancilla qubit ) for , resp. , right after the two CNOTs. During the Hadamard and measurement of the phase ancilla they act within , and during the measurement of the bit-flip ancilla within . Put . Then for every pair of outcomes the corrected (unnormalized) data–reference state satisfies
and moreover .
In words: after Steane error correction, the data is a codeword (possibly a different logical state) with errors only on the qubits where faults occurred during error correction. This gives EC A when .
Formalization Note The circuit is the chunk-local definition steaneECOutput. It returns the post-measurement branch for the given outcomes, i.e. the amplitude of the ancillas on . In that branch the map is linear, so the arbitrary fault operators per Kraus branch and the arbitrary incoming vector cover the source's 'no restrictions as to the types of errors'. The hypothesis of EC A is omitted because the claim's proof never uses it.
import Definitions.Def_QAlgorithms_Defs_BinaryStabilizer import Definitions.Def_QAlgorithms_GottesmanIntro_Ch04_Model set_option autoImplicit false
namespace QAlgorithms.GottesmanIntro
/-- Gottesman intro p.28, Claim 1 (Steane error correction, proof of EC A): let `C1, C2 ⊆ F_2^n`
be binary linear codes with `C2⊥ ⊆ C1` and let `C` be their CSS code (p.11). Run Steane error
correction (p.27, Figure 3) on an arbitrary incoming data vector `ψ`, possibly entangled with a
reference system `R`, with classical decoders returning an error with the same syndrome as the
measured word (`decP` for `C2`, `decB` for `C1`, p.28). Let the faults be arbitrary operators:
`FP`, `FB` on the prepared phase and bit-flip ancillas, acting within the qubit sets `fP`, `fB`;
`GP`, `GB` at the transversal CNOTs, acting within qubit `i` of the data block and of the
ancilla for `i ∈ gP`, resp. `gB`; `HP`, `HB` during the Hadamard and measurement of the phase
ancilla and the measurement of the bit-flip ancilla, within `hP`, `hB`. Then for every pair of
measurement outcomes the corrected data ⊗ reference state lies in `V_F ⊗ R`, where
`F = fP ∪ fB ∪ gP ∪ gB ∪ hP ∪ hB` and `V_F` is the span of the vectors `E|c⟩` with `c ∈ C` and
`E` acting within `F`: the final state has errors only on the qubits of `F`; and `|F| ≤ s`,
`s = |fP| + |fB| + |gP| + |gB| + |hP| + |hB|`. -/
theorem steaneEC_claim1 {n : ℕ} {R : Type*} [Fintype R] [DecidableEq R]
(C1 C2 : Submodule (ZMod 2) (Fin n → ZMod 2)) (hC : binDual C2 ≤ C1)
(decP decB : (Fin n → ZMod 2) → (Fin n → ZMod 2))
(hdecP : ∀ w : Fin n → ZMod 2, ∀ h ∈ binDual C2, h ⬝ᵥ decP w = h ⬝ᵥ w)
(hdecB : ∀ w : Fin n → ZMod 2, ∀ h ∈ binDual C1, h ⬝ᵥ decB w = h ⬝ᵥ w)
(fP fB gP gB hP hB : Finset (Fin n))
(FP FB HP HB : Matrix (Qubits n) (Qubits n) ℂ)
(GP GB : Matrix (Qubits n × Qubits n) (Qubits n × Qubits n) ℂ)
(hFP : ActsWithin fP FP) (hFB : ActsWithin fB FB)
(hGP : ActsWithinPair gP GP) (hGB : ActsWithinPair gB GB)
(hHP : ActsWithin hP HP) (hHB : ActsWithin hB HB)
(ψ : EuclideanSpace ℂ (Qubits n × R)) (wP wB : Fin n → ZMod 2) :
steaneECOutput C1 C2 decP decB FP FB HP HB GP GB ψ wP wB ∈
errorSpaceWithRef R (cssCode C1 C2) (fP ∪ fB ∪ gP ∪ gB ∪ hP ∪ hB) ∧
(fP ∪ fB ∪ gP ∪ gB ∪ hP ∪ hB).card ≤
fP.card + fB.card + gP.card + gB.card + hP.card + hB.card := by
sorry
end QAlgorithms.GottesmanIntro
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Two names in this statement are not part of the provided definition layer: steaneECOutput and ActsWithinPair. Their bodies are not shown, so this read-back states only what their argument signatures reveal and does not unfold them.
Setting. Fix:
- a natural number (the number of physical qubits; is allowed);
- a finite type with decidable equality, serving as a reference system;
- two binary linear codes , i.e. arbitrary -subspaces.
For a subspace , write for its dual under the standard dot product over . The first hypothesis is
Decoders. Two arbitrary maps are given. They are assumed to preserve syndromes in the following sense:
- for every and every : ;
- for every and every : .
The identity map satisfies both conditions, so these hypotheses are satisfiable.
Wire sets and operators. Further data:
- six arbitrary finite sets of wires ;
- four complex matrices on qubits;
- two complex matrices on two -qubit registers, indexed by .
None of these matrices is assumed unitary or normalized.
What "acts within" means. A matrix on qubits acts within a set if there exist:
- some ,
- an injective map from into the wires, with image contained in , and
- a matrix ,
such that equals the embedding of on wires . That embedding has entries
In words, is on the wires tensored with the identity elsewhere. Because is arbitrary, the zero matrix and scalar multiples of the identity qualify for any .
The hypotheses are:
- acts within and acts within ;
- acts within and acts within ;
- satisfies the undisclosed predicate
ActsWithinPairwith respect to , and with respect to .
Remaining inputs. Also given are an arbitrary vector and two arbitrary bit vectors . The vector is not assumed to be normalized or to lie in any code space.
Conclusion, first part. Let be the vector produced by the undisclosed function steaneECOutput, applied to
Let . The theorem asserts that lies in the error space with reference built from the CSS code of and the wire set . Unfolded:
- The CSS code. For each , the coset state is
where is the computational basis vector of the bit string . This state is unnormalized. The CSS code is the complex linear span of these states over all .
-
The error space. The error space is the complex span of all vectors such that is any -qubit matrix acting within and .
-
The error space with reference. This is the complex span of all product vectors , with and arbitrary. Here .
So the first part reads:
Conclusion, second part. The theorem also asserts
This inequality holds for any six finite sets, independently of every hypothesis.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.