A fault-tolerant circuit with only good ExRecs has the ideal output distribution
OpenQAlgorithms.GottesmanIntro.output_eq_of_all_goodThis theorem says that a fault-tolerant simulation is exact as long as no extended rectangle has too many faults.
Let be a quantum circuit of preparation, gate (, , CNOT), measurement and wait locations, organized in time steps as in Definition 6: it takes no input, every qubit is first prepared and finally measured, and at each time step every live qubit is in exactly one location. Fix an code with ideal decoder and fault-tolerant gadgets satisfying Definitions 2–5, all location gadgets having the same depth. Let be the fault-tolerant circuit for : each location replaced by its gadget, with EC gadgets inserted between consecutive locations.
Let a Pauli fault arrangement be given on such that every extended rectangle of contains at most faulty locations. Write for the distribution of the measurement record of the faulty , decoded classically to one bit per measurement location of by the measurement gadgets' classical decoding, and for the output distribution of the ideal circuit . Then
This is the first form of the statement that fault tolerance protects a computation; Theorem 8 extends it to circuits with bad extended rectangles.
Formalization Note The fault-tolerant circuit is ftCircuit P C; its measurement record is pushed forward along ftDecode P C. The common gadget depth (HasUniformDepth) is the layer's modelling hypothesis that lets the gadgets of one time step of run in parallel without extra unprotected waiting locations.
import Definitions.Def_QAlgorithms_Defs_FTCircuit set_option autoImplicit false
namespace QAlgorithms.GottesmanIntro
/-- Gottesman intro p.36, Theorem 7: "Suppose a fault-tolerant circuit for `C` contains only
good extended rectangles. Then the output distribution of the fault-tolerant protocol is the same
as the output distribution of `C`." Let `P` be a fault-tolerant protocol (Defs. 2–5) whose
location gadgets have a common depth, and `C` a circuit of preparation, gate, measurement and
wait locations as in Def. 6 (no input, every qubit prepared first and measured last). Let `fa`
be a Pauli fault arrangement on the fault-tolerant circuit `C′ = ftCircuit P C` such that every
(full) ExRec of `C′` contains at most `t` faulty locations. Then the distribution of the
measurement record of the faulty `C′`, decoded classically by the measurement gadgets'
decoding (`ftDecode`), equals the output distribution of the ideal circuit `C`. -/
theorem output_eq_of_all_good (P : FTProtocol) (hP : P.IsFaultTolerant)
(hdepth : P.HasUniformDepth) {N : ℕ} (C : LocCircuit N) (hC : C.IsIdealCircuit)
(fa : PauliArrangement)
(hgood : ∀ ℓ ∈ C.locs, (faultyLocs (ftCircuit P C) fa ∩ exRecLocs P C ℓ ∅).card ≤ P.t) :
pushDist (ftDecode P C) ((ftCircuit P C).outDist (pauliErr (ftCircuit P C) fa) 1) =
C.idealOutDist := by
sorry
end QAlgorithms.GottesmanIntro
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The protocol. is a fault-tolerant protocol: a code , an encoding , a decoder , gadgets for the six location kinds (prep, , , CNOT, meas, wait), an EC circuit on qubits, a classical decoding , and a parameter .
The hypothesis . It is the full fault-tolerance condition:
- is 2-dimensional and every operator supported on qubits is detectable on it.
- is an isometry onto .
- is a Kraus channel that, for every in the span of weight- Pauli strings, maps to .
- The gadgets are well-formed with the expected live-qubit flows (prep: none→data; meas: data→none; gates, wait and EC: data→data).
- The properties Meas, Prep A/B, Gate A/B and EC A/B hold, stated with the -filters (compression onto the span of weight- Paulis applied to ) and the gadget superoperators under Pauli fault arrangements. Each such property holds whenever the relevant fault count, plus filter levels, is . For example, Gate B reads
and EC B reads .
The further hypotheses.
- . All six gadgets have the same number of time steps as the preparation gadget.
- . is an ideal circuit on qubits. It is well-formed starting and ending with no live qubits: each step uses disjoint qubits and touches all live qubits; preparations act only on dead qubits and other locations only on live ones. Every location's classical condition is constantly true.
- . An arbitrary Pauli fault arrangement on location ids of . It places a conjugation by on the first wire and on the other wire at each location where it gives , after the ideal action, or before it for measurements.
The circuit . It acts on qubits, and qubit of owns the block .
- Each step of becomes steps. Here is the maximum gadget depth and is the EC depth.
- In the first steps, every location of step is replaced in parallel by its gadget on the blocks of its qubits.
- In the next steps, is run on the block of every qubit touched at step by a non-measurement location.
- Gadget conditions read outcomes through their global ids. The conditions of gate locations of are conjoined, evaluated on decoded logical outcomes.
ExRec locations. For a location (at step ) of , is the set of locations of belonging to:
- the gadget instance of ;
- the EC instance of step on a qubit of , provided is not a preparation;
- the EC instance of step on a qubit of , provided is not a measurement.
Hypothesis . For every location of , at most locations of in are faulty under .
The output distributions.
- . The distribution of on bit vectors of length equal to the number of measurements in . It is the real part of the trace of the classical–quantum state obtained by running from , with a trivial 1-dimensional environment and the faults of , at measurement record .
- . For each measurement location of , in record order, this applies to the outcomes of at that location's measurement-gadget measurements. Missing outcomes are read as .
- . The ideal distribution of : the same construction with no errors and trivial environment.
Statement. For every (a bit vector indexed by the measurements of ):
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.