The ancilla ladder: how a single fault propagates, and why the cat state is needed #
Category: 1-Mathlib (CSD-free). BACKLOG #95, split out of #62 (c2).
SyndromeExtraction.lean (#94) built syndrome extraction as a circuit and
left one thing open in its header: the ancilla is one unverified block, so nothing bounds how far a
single ancilla fault spreads into the data. This file proves what that costs, and what the cat state
buys, in the Heisenberg picture Clifford.lean already supports.
The mechanism, and the two architectures #
A CNOT ladder that measures a weight-w check can be wired two ways:
- shared target — all
wdata qubits are controls onto one ancilla qubit. Cheap, and it is what #94's gadget does; - cat state —
wancilla qubits, each the target of oneCNOT, prepared in|0…0⟩ + |1…1⟩so the parity of their measurements is the check value. Expensive, and it is what fault-tolerant syndrome extraction actually uses.
cnotGate_conj_pauliOp says a CNOT propagates X from control to target and Z from target to
control. So the dangerous direction for a data→ancilla ladder is a Z fault on the ancilla, and
the two architectures differ exactly there — which is the content below.
What is proved #
laddGate anc L— the ladder with controlsLand shared targetanc, built fromcnotGate, with ★cnotGate_laddGate_comm(theCNOTs commute: same target, controls off the target) and ★laddGate_involutive;- ★★★
laddGate_conj_pauliOp— the ladder's Heisenberg action: it conjugates every Pauli to a Pauli with no phase, with theXandZlabel mapsxLadd,zLaddgiven as explicit folds ofcnotFlip. This isClifford.lean's one-gate theorem telescoped along the ladder, by induction; - ★
zLadd_apply_target— the invariant that makes the computation work: the ladder never changes the target's ownZbit; - ★★★
zLadd_bitAt_target_apply— the shared-target cost: a singleZfault on the shared ancilla comes out as aZon the ancilla and on every control in the ladder. With ★★★dataSupport_zLadd_bitAt_targetand ★★card_dataSupport_zLadd_bitAt_target, the data-side support is exactly the control list, of sizeL.length: one fault,wdata errors; - ★★
zLadd_singleton_applyand ★★card_dataSupport_zLadd_singleton— the cat-state cost: with one control per ancilla qubit the same fault reaches exactly one data qubit. The contrast is the whole justification for the cat state; IsCat,catVerify— the cat labels (the constant strings) and the pairwise-agreement verification, with ★catVerify_eq_zero_iff(verification passes exactly on cat labels) and ★★not_isCat_add_bitAt/ ★★catVerify_ne_zero_of_single_flip— a single bit-flip during preparation is flagged, for every register of at least two qubits.
Together: a single ancilla fault either lands on one data qubit (cat architecture) or is caught by
verification — and with the shared ancilla of #94 it lands on w of them, which for a weight-4 check
is past what a distance-3 code can correct.
Honest scope #
⚠️ No fault model, no probabilities, no threshold. "One fault" here means one Pauli inserted at one place, and the conclusions are support statements about where it comes out. Nothing here counts fault locations, assigns them probabilities, or proves any threshold; that is #96 and #97.
⚠️ The cat state is not prepared here. IsCat describes the labels a cat state is supported on and
catVerify is the parity check on them; no preparation circuit is built, no superposition is
constructed, and the X-basis measurement whose parity gives the check value is not assembled. So
this file proves the propagation and flagging content of "verified ancilla", not a verified-ancilla
gadget.
⚠️ Z faults on the ancilla only. That is the dangerous direction for a data→ancilla ladder, and
it is the one the architectures differ on; X faults on the ancilla propagate away from the data
(xLadd moves control bits into the target) and faults on the data are not the ancilla's business.
No claim is made about a general fault at a general location.
⚠️ Weight is not correctability. card_dataSupport_zLadd_bitAt_target says the induced data error
has weight L.length; that a weight-4 error is not corrected by a distance-3 code is not proved
here — what follows is only that the distance-3 guarantee does not apply to it. The weight-1 case is
the one the corpus's recovery theorems cover.
⚠️ One register, one check. The data and the ancilla live in the same Fin n register and one
ladder is analysed; nothing composes rounds, interleaves gates, or tracks a second check.
⚠️ No Steane instance is built here. The theorems are stated for an arbitrary control list, so a Hamming row's weight-4 support is one of their instances, but the embedding of seven data qubits and an ancilla block into a single register is not written down and no Steane-specific number is proved in this file.
References #
Mathlib/QuantumInfo/Clifford.lean (cnotGate_conj_pauliOp, cnotFlip);
Mathlib/QuantumInfo/SyndromeExtraction.lean (#94, whose unverified ancilla this prices);
specs/BACKLOG.md #95, #94, #96, #97, #62; specs/future-work.md.
Single-bit labels #
The ladder #
The ancilla ladder: a CNOT from each control in L into the shared target anc.
Equations
- QuantumInfo.laddGate anc [] x✝ = x✝
- QuantumInfo.laddGate anc (d :: L) x✝ = QuantumInfo.cnotGate d anc (QuantumInfo.laddGate anc L x✝)
Instances For
The X label map of the ladder: each control's bit is added into the target.
Equations
- QuantumInfo.xLadd anc [] x✝ = x✝
- QuantumInfo.xLadd anc (d :: L) x✝ = QuantumInfo.cnotFlip d anc (QuantumInfo.xLadd anc L x✝)
Instances For
The Z label map of the ladder: the target's bit is added into each control. This is the
direction that costs.
Equations
- QuantumInfo.zLadd anc [] x✝ = x✝
- QuantumInfo.zLadd anc (d :: L) x✝ = QuantumInfo.cnotFlip anc d (QuantumInfo.zLadd anc L x✝)
Instances For
The ladder's CNOTs commute #
The ladder's Heisenberg action #
What one Z fault on the shared ancilla costs #
★★★ The shared-target cost. A single Z fault on the shared ancilla comes out of the ladder
as a Z on the ancilla and on every control: with w controls, one fault becomes w data
errors.
What the cat architecture costs instead #
The cat labels and their verification #
The labels a cat state is supported on: the constant strings.
Equations
- QuantumInfo.IsCat z = ∀ (i j : Fin n), z i = z j
Instances For
★★ So a single preparation bit-flip is flagged. The verification measurement is nonzero on it, which is the content of "verified ancilla": one fault inside the preparation either lands on one data qubit or is caught.