Documentation

LeanPool.LeanQuantumAlg.Primitives.AmplitudeAmplification

Amplitude amplification in the good/bad plane #

Amplitude amplification reduces to a two-dimensional invariant plane spanned by an orthonormal bad state and good state. If the initial state has angle θ from the bad axis, one amplification iterate rotates that plane by ; after k iterations the good amplitude is sin((2k+1)θ) [dW19, qcnotes.tex:2954].

This module formalizes exactly that two-dimensional core. The ambient register is the quotient plane, represented as one qubit: |0⟩ is the bad axis and |1⟩ is the good axis. Concrete algorithms provide reflections whose product agrees with amplitudeAmplificationStep θ on this plane.

Main results #

The angle after k amplitude-amplification iterates: (2k+1)θ.

Equations
Instances For

    The good/bad-plane state with bad amplitude cos((2k+1)θ) and good amplitude sin((2k+1)θ). In this two-dimensional model, |0⟩ is the bad axis and |1⟩ is the good axis.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def QuantumAlg.amplitudeAmplificationState (θ : ) (k : ) :

      The good/bad-plane state with bad amplitude cos((2k+1)θ) and good amplitude sin((2k+1)θ). In this two-dimensional model, |0⟩ is the bad axis and |1⟩ is the good axis.

      Equations
      Instances For
        noncomputable def QuantumAlg.amplitudeAmplificationStep (θ : ) :

        One amplitude-amplification iterate on the good/bad plane: rotation by . Since rotY φ rotates the real plane by φ/2, this is rotY (4θ).

        Equations
        Instances For

          The plane rotation used by amplitude amplification is unitary.

          One amplitude-amplification step increases the good/bad-plane angle by .

          Iterating the abstract amplification step gives the standard closed form cos((2k+1)θ)|bad⟩ + sin((2k+1)θ)|good⟩.

          An amplitude-amplification instance on the two-dimensional good/bad plane. The fields are deliberately explicit: a good-state reflection, a start-state reflection, and the proof that their product restricts to the standard rotation on this plane.

          • θ :

            Initial angle from the bad axis; the initial good probability is sin θ ^ 2.

          • goodReflection : Gate 1

            Reflection that flips the good component and fixes the bad component.

          • startReflection : Gate 1

            Reflection through the prepared start state.

          • The product of the two reflections acts as the amplification rotation on the invariant good/bad plane.

          Instances For

            Source-level reflection-product wrapper for the public amplitude- amplification statement. In the good/bad plane, ket0 is the bad axis |ψ₀⟩ and ket1 is the good axis |ψ₁⟩. The preparation gate packages A|0⟩ = sin θ |ψ₁⟩ + cos θ |ψ₀⟩, while iterate_eq records the source iterate A S₀ A† S_good as the standard plane rotation.

            Instances For

              Forget the source-level preparation wrapper and expose the existing two-dimensional amplitude-amplification model.

              Equations
              Instances For

                The source preparation statement is the initial good/bad-plane state used by the core amplitude-amplification theorem.

                Amplitude amplification correctness in the accepted two-dimensional scope: if the reflection product acts as the standard good/bad-plane rotation, then k iterations produce the closed-form amplified state.

                Source-level reflection-product form of amplitude amplification. This states the public A S₀ A† S_good iterate through the same proved two-dimensional rotation theorem.

                Closed-form public-order source reflection statement: (A S₀ A† S_good)^k A|0⟩ = sin((2k+1)θ)|ψ₁⟩ + cos((2k+1)θ)|ψ₀⟩ in the good/bad plane.

                The success probability of the closed-form amplitude-amplified state is the squared good amplitude.

                Amplitude amplification success probability after k reflection-product iterations.

                The state after k amplification iterates, annotated with iterate cost k.

                Equations
                Instances For

                  Amplitude-amplification correctness, phrased through the TimeM return value.