Documentation

LeanPool.LeanQuantumAlg.Algorithms.QPE

Quantum phase estimation (exact, dyadic eigenphase) #

Quantum phase estimation (QPE) reads the eigenphase of a unitary U into a t-qubit register [Lin22, phaseestimation.tex:510; CEMM98, cemm6.tex:574]. This module formalizes the exact dyadic regime, where the eigenphase is phi = j / 2^t for some j : Fin (2^t).

The phase-register superposition is kept at the StateVector layer: it is a linear combination of basis states whose unit-norm proof is not needed until a result is packaged as a PureState. The readout theorem says that inverse QFT maps that raw phase vector to the computational-basis vector |j>.

Main results #

Eigenstates under gate powers #

theorem QuantumAlg.Gate.applyVec_pow_eigenstate {n : } {U : Gate n} {u : PureState n} {lam : } (hu : U.applyVec u.vec = lam u.vec) (m : ) :
(U ^ m).applyVec u.vec = lam ^ m u.vec

An eigenstate of U is an eigenstate of every power U ^ m, with the eigenvalue raised to the same power. This is stated at the raw-vector layer because lam • u is not itself a PureState unless a unit-norm proof is supplied.

Per-qubit phase kickback (QPE ladder) #

Per-control-qubit phase kickback for the QPE ladder. The control qubit s controls U^{2^s}. On |+> ⊗ |u> with eigenvalue exp(2*pi*i*phi), the controlled power leaves |u> fixed and writes the relative phase exp(2*pi*i*phi*2^s) onto the |1> branch.

Source-level exact-QPE input: an n-qubit unitary, an eigenstate, and its eigenphase. The controlled powers of unitary are the oracle calls used by the phase-estimation ladder.

Instances For

    The per-control-qubit kickbacks available from a source-level QPE input.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Phase superposition and the Fourier bridge #

      noncomputable def QuantumAlg.phaseState (t : ) (phi : ) :

      The QPE phase superposition on a t-qubit register for eigenphase phi: (1/sqrt N) * sum_k exp(2*pi*i*phi*k) |k>.

      Equations
      Instances For
        @[simp]
        theorem QuantumAlg.phaseState_apply (t : ) (phi : ) (k : Fin (2 ^ t)) :
        (phaseState t phi).ofLp k = invSqrtN t * Complex.exp (2 * Real.pi * phi * k * Complex.I)
        theorem QuantumAlg.phaseState_eq_qftApplyKet (t : ) (j : Fin (2 ^ t)) :
        phaseState t (j / 2 ^ t) = ((QFT t).apply (PureState.ket j)).vec

        Dyadic/Fourier bridge: when the eigenphase is j / 2^t, the QPE phase superposition is exactly QFT t |j>.

        Inverse-QFT readout #

        noncomputable def QuantumAlg.invQFT (t : ) :

        The inverse quantum Fourier transform, QFT†.

        Equations
        Instances For
          theorem QuantumAlg.qpe_readout (t : ) (j : Fin (2 ^ t)) :

          The inverse QFT undoes the QFT on a basis ket.

          Raw-vector form of the inverse-QFT readout.

          Exact QPE #

          theorem QuantumAlg.QuantumPhaseEstimation.main_exact_dyadic (t : ) (j : Fin (2 ^ t)) (phi : ) (hphi : phi = j / 2 ^ t) :

          Exact quantum phase estimation. If the eigenphase is the dyadic rational phi = j / 2^t, then applying inverse QFT to the QPE phase superposition returns the computational-basis vector |j> exactly.

          theorem QuantumAlg.QuantumPhaseEstimation.main_exact_probability_one (t : ) (j : Fin (2 ^ t)) (phi : ) (_hphi : phi = j / 2 ^ t) :

          The exact readout has deterministic basis outcome j.

          Trusted decoupled phase-register resource profile for exact dyadic QPE.

          Equations
          Instances For
            theorem QuantumAlg.QuantumPhaseEstimation.main_exact_dyadic_with_resources (t : ) (j : Fin (2 ^ t)) (phi : ) (hphi : phi = j / 2 ^ t) :

            Exact QPE readout with the decoupled phase-register resource profile.

            Exact QPE from the source-level eigenstate/access assumptions, paired with the trusted controlled-power resource profile.

            theorem QuantumAlg.QuantumPhaseEstimation.main {n : } (P : QPEEigenstateInput n) (t : ) (j : Fin (2 ^ t)) (eps eta : ) (heps : 0 eps) (heta : 0 eta) (hphase : P.phase = j / 2 ^ t) :

            Exact QPE from the source-level eigenstate/access assumptions, phrased as an exact estimate theorem. In the dyadic regime the phase estimate has zero error, so it satisfies any nonnegative precision and failure-probability thresholds.