Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 12 (Amplitude Estimation), p. 19 — |ã − a| ≤ 2πk√(a(1−a))/M + k²π²/M² w.p. ≥ 8/π² (k = 1), > 1 − 1/(2(k−1)) (k ≥ 2); exact for a = 0, and for a = 1 with M even

Proved
QAmpEst.Est.theorem_12

by mikedeng1 · Oct 14, 2026 · Mathlib 0df444a (Lean v4.33.1)

amplitude-estimationp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1phase-estimationquantum-algorithmsquantum-computing

Let A\mathcal AA be a unitary on a finite-dimensional Hilbert space with computational basis indexed by ι\iotaι, let χ:ι→{0,1}\chi : \iota \to \{0,1\}χ:ι→{0,1} mark the good basis states, and let a=⟨Ψ1∣Ψ1⟩a = \langle\Psi_1|\Psi_1\ranglea=⟨Ψ1​∣Ψ1​⟩ be the probability that measuring A∣0⟩\mathcal A|0\rangleA∣0⟩ gives a good state. Let M≥1M \ge 1M≥1, and let a~=sin⁡2(πy/M)\tilde a = \sin^2(\pi y/M)a~=sin2(πy/M) be the output of Est_Amp(A,χ,M)\mathbf{Est\_Amp}(\mathcal A,\chi,M)Est_Amp(A,χ,M), where yyy is the measured value of the first register. For every positive integer kkk, the event

∣a~−a∣≤2πk a(1−a)M+k2π2M2|\tilde a - a| \le 2\pi k\,\frac{\sqrt{a(1-a)}}{M} + k^2\frac{\pi^2}{M^2}∣a~−a∣≤2πkMa(1−a)​​+k2M2π2​

has probability

  1. at least 8/π28/\pi^28/π2 when k=1k = 1k=1, and
  2. greater than 1−12(k−1)1 - \frac{1}{2(k-1)}1−2(k−1)1​ when k≥2k \ge 2k≥2.

Moreover,

  1. if a=0a = 0a=0 then a~=0\tilde a = 0a~=0 with certainty, and
  2. if a=1a = 1a=1 and MMM is even, then a~=1\tilde a = 1a~=1 with certainty.

This is the main estimation result of the paper: MMM applications of Q\mathbf QQ give an estimate of aaa with additive error of order a(1−a)/M\sqrt{a(1-a)}/Ma(1−a)​/M, a quadratic improvement over classical sampling.

Formalization Note The probability of an event is the sum, over the outcomes yyy in it, of ∑z∣⟨y,z∣ψfinal⟩∣2\sum_z |\langle y,z|\psi_{\mathrm{final}}\rangle|^2∑z​∣⟨y,z∣ψfinal​⟩∣2, where ψfinal=(FM−1⊗I)ΛM(Q)(FM⊗I)∣0⟩A∣0⟩\psi_{\mathrm{final}} = (F_M^{-1}\otimes I)\Lambda_M(\mathbf Q)(F_M\otimes I)|0\rangle\mathcal A|0\rangleψfinal​=(FM−1​⊗I)ΛM​(Q)(FM​⊗I)∣0⟩A∣0⟩. The clause "it uses exactly MMM evaluations of fff" is not formalized: the matrix model has no oracle whose calls could be counted. 0≤a~≤10 \le \tilde a \le 10≤a~≤1 holds by construction. No restriction 0<a<10 < a < 10<a<1 and no lower bound on MMM is assumed.

Preamble
import Mathlib
import Definitions.Def_QAmpEst_Est_Setting

open scoped Real Kronecker
Formal statement
namespace QAmpEst.Est

/-- Theorem 12 (Amplitude Estimation), arXiv:quant-ph/0005055v1, p. 19: for any positive
integer `k`, the output `ã = sin²(πy/M)` of `Est_Amp(A, χ, M)` satisfies
`|ã − a| ≤ 2πk√(a(1 − a))/M + k²π²/M²` with probability at least `8/π²` when `k = 1` and with
probability greater than `1 − 1/(2(k − 1))` for `k ≥ 2`. If `a = 0` then `ã = 0` with
certainty, and if `a = 1` and `M` is even, then `ã = 1` with certainty.
(The query count "exactly `M` evaluations of `f`" is not formalized.) -/
theorem theorem_12 {ι : Type*} [Fintype ι] [DecidableEq ι] (A : Matrix ι ι ℂ)
    (hA : A ∈ Matrix.unitaryGroup ι ℂ) (χ : ι → Bool) (z0 : ι) (M : ℕ) (hM : 0 < M) (k : ℕ) (hk : 1 ≤ k) :
    let a := succProb A χ z0
    let P := outcomeProb M A χ z0
    let E := Finset.univ.filter (fun y : Fin M =>
      |estimate M y - a| ≤
        2 * π * (k : ℝ) * Real.sqrt (a * (1 - a)) / (M : ℝ) + (k : ℝ) ^ 2 * π ^ 2 / (M : ℝ) ^ 2)
    (k = 1 → 8 / π ^ 2 ≤ ∑ y ∈ E, P y) ∧
      (2 ≤ k → 1 - 1 / (2 * ((k : ℝ) - 1)) < ∑ y ∈ E, P y) ∧
      (a = 0 → ∑ y ∈ Finset.univ.filter (fun y : Fin M => estimate M y = 0), P y = 1) ∧
      (a = 1 → Even M →
        ∑ y ∈ Finset.univ.filter (fun y : Fin M => estimate M y = 1), P y = 1) := by sorry

end QAmpEst.Est
Source
arXiv:quant-ph/0005055v1, Theorem 12, p. 19; Algorithm Est_Amp, p. 18
Human review
  • Endorsed by Shuze Chen · Oct 15, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 15, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me