A fault-tolerant circuit simulates the ideal circuit with errors at the bad ExRecs
OpenQAlgorithms.GottesmanIntro.output_eq_tildeFix an quantum code together with fault-tolerant gadgets for preparation of , standard-basis measurement, the gates , , CNOT, the wait location, and error correction (Definitions 2–5), all location gadgets having a common depth. Let be a circuit on qubits divided into time steps as in Definition 6 (no input, every qubit prepared first and measured last), and let be its fault-tolerant circuit, obtained by replacing every location by its gadget and inserting EC gadgets between consecutive locations. Let be a -decoder for the ideal decoder, i.e. a unitary from a code block to one qubit a syndrome register whose syndrome-discarded version is the ideal decoder.
Let a Pauli fault arrangement be placed on the locations of , and let be the set of locations of whose extended rectangles are bad, assigned from the end of the circuit by the truncation procedure of Definition 10. Then there are an initial state of syndrome registers (one per qubit of ) and a circuit obtained from as follows:
- at a location , the ideal operation of on the data, followed by some quantum operation acting only on the syndrome registers of the qubits of ;
- at a location , the ideal operation followed by some quantum operation on the qubits of together with their syndrome registers,
such that
The output of is decoded classically, block by block, by the decoding of the measurement gadgets. The theorem says that a fault-tolerant circuit behaves like the ideal circuit with errors only at the bad extended rectangles, and is the basis of the level-reduction theorem.
Formalization Note The error “from eq. (82)” is whatever makes that diagram hold, so it is quantified existentially; the syndrome registers of are the -decoder syndromes, which is why good locations may act on them by the operation of eq. (83).
import Definitions.Def_QAlgorithms_Defs_FTCircuit import Definitions.Def_QAlgorithms_GottesmanIntro_Ch05b_Model set_option autoImplicit false
namespace QAlgorithms.GottesmanIntro
/-- Gottesman intro p.39, Theorem 8: "Suppose we have a fault-tolerant circuit `C′` for `C`.
Assign good and bad extended rectangles to `C′`, and produce a circuit `C̃` as follows: If the
ExRec for `C_i` is good, include `C_i` unchanged in `C̃`. If the ExRec for `C_i` is bad, replace
`C_i` by the erroneous gate `U′` from eq. (82) … The circuit `C̃` uses ancilla registers to
control the types of `U′` errors. Then the output distribution of `C′` is the same as the output
distribution of `C̃`."
Let `P` be a fault-tolerant protocol, `C` a Def. 6 circuit, `fa` a Pauli fault arrangement on
`C′ = ftCircuit P C`, and `W` a *-decoder for the ideal decoder with syndrome register `Fin σ`.
Let `B` be the set of bad locations of `C` assigned by Def. 10 from the faulty locations of `C′`.
Then there are an initial state `σ0` of the syndrome registers (one per qubit of `C`) and errors
forming a circuit `C̃` (`IsTildeErrors`: at a good location, the ideal operation on the data
followed by some operation `V` on the syndrome registers of its qubits only; at a bad location,
the ideal operation followed by an arbitrary quantum operation `U′` on its qubits and their
syndrome registers) such that the decoded output distribution of the faulty `C′` equals the output
distribution of `C̃`. -/
theorem output_eq_tilde (P : FTProtocol) (hP : P.IsFaultTolerant) (hdepth : P.HasUniformDepth)
{N : ℕ} (C : LocCircuit N) (hC : C.IsIdealCircuit) (fa : PauliArrangement) {σ : ℕ}
(W : Matrix (Bool × Fin σ) (Qubits P.n) ℂ) (hW : IsStarDecoder P.dec W) :
∃ (σ0 : Matrix (Fin N → Fin σ) (Fin N → Fin σ) ℂ) (err : ErrAssign N (Fin N → Fin σ)),
IsDensityMatrix σ0 ∧
IsTildeErrors C (badAssignment P C (faultyLocs (ftCircuit P C) fa)) σ err ∧
pushDist (ftDecode P C) ((ftCircuit P C).outDist (pauliErr (ftCircuit P C) fa) 1) =
C.outDist err σ0 := by
sorry
end QAlgorithms.GottesmanIntro
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Data. The statement takes:
- a fault-tolerant protocol ;
- a circuit of locations on wires;
- an arbitrary Pauli fault arrangement ;
- a natural number ;
- a complex matrix with rows indexed by and columns indexed by -bit strings.
The protocol . It consists of:
- natural numbers ;
- a subspace , the code;
- a matrix ;
- a superoperator from -qubit matrices to matrices, the decoder;
- for each location kind , a gadget circuit on wires, where and the other kinds have arity ;
- an error-correction circuit on wires;
- a classical decoding map from bit lists to bits.
Block , position is wire . Positions are data wires and the rest are ancillas.
Fault semantics. A Pauli fault arrangement assigns to some location ids a pair of Paulis . At a location of the circuit, it acts as conjugation by the Pauli string that has on the location's first wire and on its others. This Pauli acts after the location's ideal action, or before it at a measurement. The faults carry a trivial one-dimensional environment.
For any , write for the number of locations of at which is defined. Every gadget superoperator is computed the same way:
- the input is placed on the data wires with all ancillas in ;
- the gadget is run with these Pauli faults;
- the outputs are summed over all measurement records;
- the ancillas are traced out.
This yields the following superoperators:
- on blocks;
- on one block;
- the matrix , obtained by starting from on all wires;
- the functional , the trace of the meas-gadget output summed only over records with .
Let be conjugation by the orthogonal projection onto . Let denote the tensor product of superoperators, defined on matrix units and extended linearly.
Hypothesis " is fault tolerant". All of the following hold:
- . Every operator acting nontrivially on at most qubits is detectable: is the same constant for all unit .
- and .
- is a channel with a finite Kraus family satisfying . For every in the complex span of Pauli strings of weight and every unit ,
-
Each gadget is well formed with respect to its live wires:
- goes from no live wires to the data wires;
- goes from the data wires to none;
- go from data wires to data wires.
Well formed means that in each step, locations touch disjoint wires and every live wire is touched. Preparations act only on non-live wires and other locations only on live wires. Preparations add live wires and measurements remove them, and the final live set is the stated one.
-
Meas. Whenever , for all and :
- Prep A. If , then .
- Prep B. If , then .
- Gate A. For and with , where :
- Gate B. Under the same conditions:
Here is, respectively, the Hadamard, , CNOT with the first wire as control, or the identity. 10. EC A. If , then . 11. EC B. If , then .
Further hypotheses.
- Uniform depth: every gadget has as many time steps as .
- is ideal: it is well formed from no live wires to no live wires, and every location's classical condition is constantly true.
- is a -decoder for : , , and for all , where traces out the -dimensional factor. In particular, this forces . For the hypothesis is unsatisfiable.
The circuits. is the fault-tolerant circuit on wires. Each time step of becomes two phases:
- a gadget phase, in which each location is replaced by its gadget on the blocks of its wires;
- an EC phase, in which runs on the block of every wire whose location at that step is not a measurement.
Gadget conditions are conjoined with the original location's condition evaluated on decoded logical outcomes.
maps a record to the list, over the measurement locations of in order, of applied to the outcomes of that location's meas gadget. Missing outcomes are read as false. For a decoding map , the push-forward of a distribution is
Output distributions. is of the classical–quantum run of at record . The run starts from with the empty record. The error superoperator is applied after location , or before it at a measurement.
The bad set. is defined for a set of locations, scanning the steps of from last to first. A location of is bad if more than elements of lie in its ExRec. The ExRec of consists of:
- 's gadget;
- the EC instances on 's wires from the preceding step, if is not a preparation;
- the EC instances on 's wires from the same step, if is not a measurement, omitting wires that are also wires of a bad location in the next step.
Conclusion. There exist a matrix on the environment indexed by (one -dimensional register per wire) and an error assignment such that:
- is a density matrix (PSD with trace );
- is a "tilde" error assignment for , defined as follows:
- is absent wherever has no location;
- at each location , is some channel acting on 's wires together with their -registers, extended by the identity elsewhere;
- if , then for some channel on the -registers alone;
- the decoded faulty output equals the output of under these errors:
No bound on the number of faults in is assumed.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.