Documentation

CsdLean4.Empirical.CSD.Algorithms.CircuitFlow

Empirical/CSD: a quantum circuit is a flow on Σ, and its readout is a record basin #

Category: 3-Local (CSD-side companion to Empirical/QM/Algorithms/; the generic engine the algorithm twins GroverFlow.lean and ShorFlow.lean instantiate).

A quantum circuit on a register indexed by ι is a unitary U on EuclideanSpace ℂ ι. On the CSD side the register's state space is the sector Σ = ℂℙ^{card ι − 1} (cpSectorData), the circuit is the flow x ↦ U • x on it, running the circuit k times is the flow iterated k times, and the readout of the computational-basis measurement is the record basin of the outcome (RecordLayer/GlobalBasin.lean) or, on the density-operator side, the de-isolation channel (LF6/DecoherenceChannel.lean). Nothing here is specific to an algorithm: the pattern is Empirical/CSD/QEC/RegisterFlow.lean's, factored out.

Helpers, index-generic: toEuclideanLin_pow_apply, toEuclideanLin_reindex_piLpCongrLeft.

⚠️ Honest scope. A circuit is its unitary; no gate decomposition, timing, or Hamiltonian generating U is modelled (the flow is the time-one map of the projective action, as in RegisterFlow.lean, and R-015 applies). The readout is the corpus's computational-basis record basin, context-fixed and kinematic (globalBasin_born's own scope note).

References: Empirical/CSD/QEC/RegisterFlow.lean (the pattern); LF2/FlowChannel.lean (IsUnitaryLift, barycenter_flow); RecordLayer/GlobalBasin.lean (globalBasin_born); LF6/DecoherenceChannel.lean; specs/BACKLOG.md #34; specs/future-work.md.

Index-generic helpers #

toEuclideanLin of a power is the iterate: @[simp] Matrix.toLpLin_pow applied to a vector.

theorem CSD.Empirical.CSDBridge.Algorithms.piLpCongrLeft_apply_apply {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] (e : ι ≃ κ) (v : EuclideanSpace ℂ ι) (i : ι) :

The coordinate of a reindexed vector at a reindexed index.

The register's sector and representative #

A circuit on the register indexed by ι: a unitary on EuclideanSpace ℂ ι.

Instances For

    A nonempty register has a nonzero number of basis states.

    @[reducible, inline]
    noncomputable abbrev CSD.Empirical.CSDBridge.Algorithms.idx (ι : Type u_2) [Fintype ι] :

    The enumeration of the register's index that places its sector at ℂℙ^{card ι − 1}.

    Equations
    Instances For
      @[reducible, inline]

      The register's sector, Σ = ℂℙ^{card ι − 1}.

      Equations
      Instances For

        The register representative: the canonical measurable unit section of the sector, read in the register's own index.

        Equations
        Instances For

          The circuit as a flow #

          The circuit's unitary, enumerated, as an element of U(card ι).

          Equations
          Instances For

            The enumerated unitary of k runs is the reindexed U ^ k.

            The circuit as a flow on Σ: the projective action of its unitary on the register's sector. A flow of the corpus's cpSectorData (Σ = P = ℂℙ^{card ι − 1}, π = id).

            Equations
            Instances For

              k runs of the circuit are the flow iterated k times: the projective action of U ^ k.

              ★ The flow lifts the enumerated unitary through the canonical unit section, with no hypothesis.

              ★ The flow lifts the circuit's own unitary through the register representative.

              ★★ The density operator after k runs is U^k ρ (U^k)ᴴ, for every preparation on the sector, derived from the ontic flow: the Schrödinger picture of the circuit.

              The point reached from the ray of ψ by k runs is the ray of U^k ψ.

              ★★ The readout on Σ. At the point reached from the ray of a unit vector ψ by k runs of the circuit, the record basin of the computational-basis outcome i (the apparatus's context-fixed basin, globalBasin) has Born weight ‖(U^k ψ) i‖².

              The readout channel #

              noncomputable def CSD.Empirical.CSDBridge.Algorithms.readout {M : ℕ} [NeZero M] (ρ : Matrix (Fin M) (Fin M) ℂ) (i : Fin M) :

              The readout: the weight the de-isolation channel assigns to the computational-basis outcome i of a density operator ρ, the diagonal entry of the channel's output.

              Equations
              Instances For

                On a pure input the readout is the Born weight.

                After a unitary, the readout of a pure input is the Born weight of the image.

                The density operator of a preparation concentrated at one point is the projector of that point's representative.