Documentation

LeanPool.SingleCopyStabilizer.ExactResources

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.

Instances For
    @[reducible, inline]

    The classical difference and correction coin recorded for one round.

    Equations
    Instances For

      Actual targets in the simultaneous pivot-controlled CNOT circuit.

      Equations
      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
            theorem LeanPool.SingleCopyStabilizer.ExactResources.roundGateCount_of_ne {ι : Type u_1} [Fintype ι] [DecidableEq ι] (outcome : RoundOutcome ι) (hzero : outcome.1 ≠ 0) :
            roundGateCount outcome = (cnotTargets outcome.1 (binaryPivot outcome.1 hzero)).card + 1 + if outcome.2 = 0 then 0 else 1

            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
                  Instances For
                    theorem LeanPool.SingleCopyStabilizer.ExactResources.protocolCopyCount_cons {ι : Type u_1} (outcome : RoundOutcome ι) (outcomes : List (RoundOutcome ι)) :
                    protocolCopyCount (outcome :: outcomes) = protocolCopyCount outcomes + 2

                    Appending a round always consumes exactly two additional copies.

                    theorem LeanPool.SingleCopyStabilizer.ExactResources.protocolCopyCount_eq {ι : Type u_1} (outcomes : List (RoundOutcome ι)) (T : ℕ) (hT : outcomes.length = T) :
                    protocolCopyCount outcomes = 2 * T + 1

                    The protocol's exact total copy count.