The concatenated Steane code: the quantum recovery at level k #
Category: 3-Local (Empirical, QM twin). BACKLOG #86, the second half of #61: the quantum
statement at every level of concatenation, where SteaneThreshold.lean (#51) had it at level one and
the pattern recursion (concatMeasure_concatBad_le) at every level.
One level up, over any register #
concatEnc W = blockKron (fun _ => W) * steaneEnc puts seven W-encoded blocks under one Steane
layer; it is an isometry when W is (concatEnc_conjTranspose_mul). The engine is
★★ exists_concatEnc_step: if a pair of block-wise errors acts as a scalar on the encoded qubit of
every block but at most two named ones, it acts as a scalar one level up. The good blocks give
their scalars, and the tensor of the two remaining logical operators is scalar because the Steane code
has distance three (exists_steaneEnc_blockKron in SteaneEncoder.lean). Two blocks, not one: the
Knill–Laflamme condition is a condition on pairs of errors, and each error of the pair may spend its
one arbitrary block somewhere else.
The tower #
cLabel is the label space (cLabel 0 = Fin 2, cLabel (k+1) = Fin 7 → cLabel k, literally
recursive, with its Fintype/DecidableEq by recursion), cEnc the encoder, cProj the code
projector, and cFam/cErr the error family: a level-k error in every block and optionally one
block carrying an arbitrary operator, addressed by a matrix unit. Then
- ★★★
encoderKL_cErr: Knill–Laflamme at every level, in the encoder form ofMathlib/QuantumInfo/KnillLaflamme.lean—cEnc kᴴ Eᵢᴴ Eⱼ cEnc k = γ • 1. The induction is the step above, with the two named blocks the arbitrary blocks of the two errors; - ★★★
exists_cErr_recovery: one recovery channel per level for that family.
The patterns, and the failure bound #
PatErr k x E says E is an error of the pattern x: a tensor over the tree with the identity at
every unhit leaf and an arbitrary operator at every hit one. isBad 7 k x = false — at most one bad
sub-block at every level — is the good event of the code-capacity recursion, and
- ★★
patErr_mem_span: every good pattern's errors lie in the span of the family. The good blocks are spans by induction, the one bad block is a combination of matrix units (Matrix.matrix_eq_sum_single), andblockKronis multilinear (blockKron_sum_smul), so the tensor expands over exactlycErr (k + 1); - ★★★
exists_concat_recovery: the recovery returns the code state up to a scalar for every good pattern, through #61's span step (exists_smul_recovery_apply_of_eq_lin_comb); - ★★★
exists_concat_recovery_unitary: for a unitary error the scalar is1(smul_eq_one_of_unitary: the error and the channel both preserve the trace), so the level-kcode restores every code state exactly from every good pattern. What it says nothing about isconcatBad 7 k(good_eq_compl_concatBad), whose probability under independent noise of ratepis at most(21 p)^{2^k}/21(steane_concatBad_le) — the encoded failure bound at every level.
Honest scope #
⚠️ Code capacity still: the noise is on the data qubits, the recovery is applied once, and the
gates of the encoder and of the recovery are perfect. Faulty gates, error propagation and extended
rectangles are BACKLOG #62, deliberately not claimed.
⚠️ The recovery is a Knill–Laflamme channel, not the block-by-block decoder a compiler would
run: what is proved is that a correcting channel exists at every level (and is the one
exists_recovery_of_encoderKL builds), not that the hierarchical decoder is optimal or efficient.
⚠️ The scalar of exists_concat_recovery is existential, as in #61: for a non-unitary error the
recovery returns the code state with a weight, and nothing here normalises it.
⚠️ ρ.trace ≠ 0 in the unitary statement is what turns "up to a scalar" into "exactly"; a density
operator has trace one, so it is no restriction in use.
⚠️ The family cErr addresses its one arbitrary block by matrix units, a spanning set, not by
Paulis. That is enough for the span argument and avoids Pauli bookkeeping at every level; the price is
that the family is larger than it needs to be.
Source #
A. Steane, Error correcting codes in quantum theory, PRL 77 (1996); E. Knill, R. Laflamme, W. Zurek,
Science 279 (1998) 342 (concatenation and the threshold); M. Nielsen, I. Chuang, §10.6.1;
Mathlib/QuantumInfo/BlockKron.lean, Mathlib/QuantumInfo/KnillLaflamme.lean (the encoder form and
the span step), Empirical/QM/QEC/SteaneEncoder.lean, Empirical/QM/QEC/SteaneArbitrary.lean (#61),
Empirical/QM/QEC/SteaneThreshold.lean (#51), Mathlib/Probability/CodeCapacityThreshold.lean;
specs/BACKLOG.md #86; specs/steane-plan.md; specs/future-work.md.
One level up #
One level up: seven blocks, each carrying the encoder W, then the Steane encoder on the
seven encoded qubits.
Equations
- CSD.Empirical.QM.QEC.Steane.concatEnc W = (QuantumInfo.blockKron fun (x : Fin 7) => W) * CSD.Empirical.QM.QEC.Steane.steaneEnc
Instances For
The level-up encoder is an isometry if W is.
★★ The induction step. A pair of block-wise errors whose logical actions are scalars on
every block but at most two named ones acts as a scalar on the qubit encoded one level up: the good
blocks contribute their scalars and the tensor of the remaining logical operators is scalar by the
Steane code's distance (exists_steaneEnc_blockKron).
The tower of concatenated registers #
The label space of the level-k concatenated register: one qubit at level 0, seven blocks of
the previous level after that.
Equations
Instances For
Equations
- CSD.Empirical.QM.QEC.Steane.instFintypeCLabel 0 = { elems := CSD.Empirical.QM.QEC.Steane.instFintypeCLabel._aux_1, complete := CSD.Empirical.QM.QEC.Steane.instFintypeCLabel._proof_3 }
- CSD.Empirical.QM.QEC.Steane.instFintypeCLabel k.succ = { elems := CSD.Empirical.QM.QEC.Steane.instFintypeCLabel._aux_4 k (CSD.Empirical.QM.QEC.Steane.instFintypeCLabel k), complete := ⋯ }
The encoder of the level-k concatenated code: nothing at level 0, one more Steane layer at
every step.
Equations
Instances For
The code projector of the level-k code.
Equations
Instances For
The error family of the level-k code #
The index of the level-k error family: at level k + 1, a level-k error in every block and
optionally one block carrying an arbitrary operator, addressed by a matrix unit.
Equations
Instances For
Equations
- CSD.Empirical.QM.QEC.Steane.instFintypeCFam 0 = { elems := CSD.Empirical.QM.QEC.Steane.instFintypeCFam._aux_1, complete := CSD.Empirical.QM.QEC.Steane.instFintypeCFam._proof_3 }
- CSD.Empirical.QM.QEC.Steane.instFintypeCFam k.succ = { elems := CSD.Empirical.QM.QEC.Steane.instFintypeCFam._aux_4 k (CSD.Empirical.QM.QEC.Steane.instFintypeCFam k), complete := ⋯ }
The level-k error family.
Equations
- CSD.Empirical.QM.QEC.Steane.cErr 0 x_2 = 1
- CSD.Empirical.QM.QEC.Steane.cErr k.succ (g, none) = QuantumInfo.blockKron fun (b : Fin 7) => CSD.Empirical.QM.QEC.Steane.cErr k (g b)
- CSD.Empirical.QM.QEC.Steane.cErr k.succ (g, some (b₀, u, v)) = QuantumInfo.blockKron fun (b : Fin 7) => if b = b₀ then Matrix.single u v 1 else CSD.Empirical.QM.QEC.Steane.cErr k (g b)
Instances For
★★★ Knill–Laflamme at every level, in encoder form. Every pair of the level-k family acts
on the encoded qubit as a scalar: the good blocks by induction, the one arbitrary block of each error
by the Steane code's distance.
★★★ The recovery of the level-k concatenated code. One channel corrects the whole family:
a level-k error in every block and one arbitrary block at every level.
The errors of a pattern #
The errors of an error pattern: at level 0 the identity unless the qubit is hit, and at
level k + 1 a tensor over the blocks whose factors are errors of the sub-patterns. The operators at
the hit leaves are arbitrary — this is the error set the code capacity argument counts.
Equations
- One or more equations did not get rendered due to their size.
- CSD.Empirical.QM.QEC.Steane.PatErr 0 x_3 E = (x_3 = false → E = 1)
Instances For
A filler index of the level-k family: the identity error.
Equations
Instances For
The per-block spanning family of the span argument: the level-k family for the good blocks,
and the matrix units for the one block treated as arbitrary.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The coefficients of the span argument: the good blocks use the coefficients the induction gives, the one arbitrary block the entries of its own operator.
Equations
- One or more equations did not get rendered due to their size.
Instances For
★★ Every good pattern's errors lie in the span of the family. A pattern with at most one bad
sub-block at every level: the good blocks are in the span of the level-k family by induction, the
one bad block carries an arbitrary operator and so a combination of matrix units, and blockKron is
multilinear — so the tensor expands over exactly the family cErr (k + 1).
The concatenated quantum recovery #
★★★ The concatenated quantum recovery, up to a scalar. At every level one channel serves every good pattern: for a pattern with at most one bad sub-block at every level, and arbitrary operators on the hit leaves, the recovery returns the code state up to a scalar.
★★★ The concatenated quantum recovery, exactly. For a unitary error the scalar is 1: the
level-k code restores every code state from every good pattern of unitary errors. The patterns for
which this says nothing are concatBad 7 k, whose probability under independent noise of rate p is
at most (21 p)^{2^k}/21 (steane_concatBad_le, good_eq_compl_concatBad) — so the quantum
statement holds at every level, where the chain's document had it at level one.