The Steane code corrects an arbitrary error on one qubit #
Category: 3-Local (Empirical, QM twin). BACKLOG #61, its discretization step; it closes the gap
SteaneRecovery.lean's honest scope named ("Pauli errors only").
★★★ steane_recovery_arbitrary: one channel corrects an arbitrary 2 × 2 error on any one of the
seven qubits, returning the code state scaled by tr(MᴴM)/2; and ★★★
steane_recovery_unitary_qubit: for a unitary error that scalar is 1, so the state is restored
exactly.
Two steps, and the first is general. In KnillLaflamme.lean, ★★ recovery_apply_lin_comb: the
correction property is bilinear in the two error slots and a channel is linear, so a recovery
that corrects a family corrects every linear combination of it, up to the scalar the coefficients
give. For a stabiliser code the family's Knill–Laflamme matrix is the identity
(stabMat_knillLaflamme), so the cross terms vanish and the scalar is ∑ᵢ |aᵢ|².
The second step is the Steane instance. gateOf q M, the 2 × 2 matrix M acting on qubit q of
the register, is linear in M (gateOf_add, gateOf_smul) and sends the four Paulis to the four
single-qubit Pauli strings of the code's error family (gateOf_one_eq_pauliMat,
gateOf_pX_eq_pauliMat, gateOf_pZ_eq_pauliMat, gateOf_pXZ_eq_pauliMat, through
eq_add_unitErr_iff and bdot_unitErr). With ErrorDiscretization.lean's pauli_decomposition
that gives ★ gateOf_eq_sum_pauliMat: an arbitrary error on one qubit is a combination of the
code's own errors, with coefficients read off the entries of M. Summing their squares
(sum_singleCoeff_sq) turns ∑ᵢ |aᵢ|² into tr(MᴴM)/2.
eq_add_unitErr_iff,bdot_unitErr— the label arithmetic of a single-qubit Pauli;gateOf_one_eq_pauliMat,gateOf_pX_eq_pauliMat,gateOf_pZ_eq_pauliMat,gateOf_pXZ_eq_pauliMat— the four Paulis at one position as Pauli strings;singleCoeff, ★gateOf_eq_sum_pauliMat,sum_singleCoeff_sq;exists_steane_recovery_cross— the recovery with its cross terms, which is what the span step consumes;- ★★★
steane_recovery_arbitrary, ★★★steane_recovery_unitary_qubit.
Honest scope #
⚠️ One qubit still. This removes the Pauli restriction, not the weight-one restriction: two
qubits in error are outside the Steane code's reach at level one, as before.
⚠️ The scalar tr(MᴴM)/2 is the honest statement for a general M: an error that is not unitary is
trace-decreasing, and the recovery returns the code state with that weight. Nothing here normalises
it away.
⚠️ This is the discretization step of BACKLOG #61, not the row: the concatenated quantum recovery
at level k is SteaneConcat.lean (BACKLOG #86, 2026-09-27), which adds the tensor layer over the
blocks (Mathlib/QuantumInfo/BlockKron.lean) and the induction. What this file gives that induction
is exactly the step it needs: an arbitrary logical error on one block is corrected by the next
level up, because the Paulis span the operators of a qubit.
References: E. Knill, R. Laflamme, W. Zurek, Science 279 (1998); M. Nielsen, I. Chuang, Quantum
Computation and Quantum Information §10.6; Mathlib/QuantumInfo/KnillLaflamme.lean;
Empirical/QM/QEC/SteaneRecovery.lean; Empirical/QM/QEC/ErrorDiscretization.lean;
specs/BACKLOG.md #61; specs/steane-plan.md.
The four single-qubit Paulis at one position, as Pauli strings #
An arbitrary single-qubit operator is a combination of the four #
★ Discretization on the Steane register: an arbitrary operator on one qubit is a combination of the code's own error family.
The recovery, with its cross terms #
The Steane recovery with the full Knill–Laflamme correction property, cross terms included: the error labels are distinguishable, so the matrix of scalars is the identity.
An arbitrary error on one qubit is corrected #
★★★ The Steane recovery corrects an arbitrary error on one qubit. For every qubit q and
every 2 × 2 matrix M, one channel returns the code state scaled by tr(MᴴM)/2 — the Paulis span
the operators of a qubit, and the Knill–Laflamme correction property is bilinear in the two error
slots, so correcting the four Paulis corrects the whole continuum.
★★★ A unitary error on one qubit is undone exactly. The scalar of
steane_recovery_arbitrary is tr(MᴴM)/2 = 1 for a unitary block.