Symbolic gate and copy costs of the exact protocol #
An outcome list determines explicit symbolic CNOT/S/H instructions. Costs count those instructions and their repeated execution on fresh copies. These are not running-time claims about Lean's noncomputable state simulation.
Elementary instructions counted by the protocol's gate model.
- cnot {ι : Type u_1} (control target : ι) : Instruction ι
- phase {ι : Type u_1} (site : ι) : Instruction ι
- hadamard {ι : Type u_1} (site : ι) : Instruction ι
Instances For
The classical difference and correction coin recorded for one round.
Equations
Instances For
Actual targets in the simultaneous pivot-controlled CNOT circuit.
Equations
- LeanPool.SingleCopyStabilizer.ExactResources.cnotTargets u pivot = {j : ι | j ≠ pivot ∧ u j = 1}
Instances For
The pivot itself is never a CNOT target.
In chronological order: the pivot CNOTs, optional S, then H. A zero computational difference appends no gates.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Gate cost is the length of the actual symbolic instruction list.
Equations
Instances For
The nonzero branch has exactly the chosen CNOTs, one H, and at most one S.
One round appends at most n+1 gates, including both possible corrections.
The accumulated circuit appends each round's instructions in order.
Equations
Instances For
The accumulated gate count is the sum of all appended round costs.
Equations
Instances For
The sum-based cost equals the length of the actual flattened gate list.
A circuit accumulated over T rounds has at most (n+1)T gates.
Prefix circuits have a gate count linear in the prefix index.
Total gate applications: execute the current prefix twice in every round, then execute the complete circuit once for the final computational readout.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Twice the triangular sum plus its endpoint equals the square.
Total quantum gate applications are at most (n+1)T², for every possible
outcome history, including unsuccessful histories.
For at least one qubit this is the explicit 2nT² gate-resource bound.
A zero-qubit register can produce no nonzero difference and appends no gates.
The full symbolic circuit is empty on a zero-qubit register.
Zero-qubit executions require no gates, regardless of the round count.
Every round consumes two input copies, and final readout consumes one. Even rounds whose difference is zero consume their two measurement copies.
Equations
- LeanPool.SingleCopyStabilizer.ExactResources.protocolCopyCount outcomes = 2 * outcomes.length + 1
Instances For
Appending a round always consumes exactly two additional copies.
The protocol's exact total copy count.