Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§4, p. 16 — the accumulated error of Tolerant RAA: δ_t ≤ π/8 + 9γ/8

Proved
QuantumWalkSearch.ApproxRAA.drift_total

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

amplitude-amplificationerror-analysisp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-algorithms

Under the hypotheses of Lemma 1 with 0<γ≤1/400<\gamma\le1/400<γ≤1/40, let ttt be the smallest non-negative integer with 3tsin⁡−1pM∈[π/4,3π/4]3^t\sin^{-1}\sqrt{p_M}\in[\pi/4,3\pi/4]3tsin−1pM​​∈[π/4,3π/4], and run Tolerant RAA with T≥tT\ge tT≥t registers. Let ∣ψt⟩=At∣νt−1⊥⟩|\psi_t\rangle=A_t|\nu^\perp_{t-1}\rangle∣ψt​⟩=At​∣νt−1⊥​⟩ be the state after Step 4 of attempt ttt and ∣φt⟩=At∣π⟩∣0S⟩|\varphi_t\rangle=A_t|\pi\rangle|0^S\rangle∣φt​⟩=At​∣π⟩∣0S⟩. Then

δt=∥∣ψt⟩−∣φt⟩∥≤π8+9γ8.\delta_t=\big\||\psi_t\rangle-|\varphi_t\rangle\big\|\le\frac\pi8+\frac{9\gamma}8 .δt​=​∣ψt​⟩−∣φt​⟩​≤8π​+89γ​.

Re-using the leftover state of a failed attempt instead of a fresh copy of ∣π⟩∣0S⟩|\pi\rangle|0^S\rangle∣π⟩∣0S⟩ costs at most this much at the decisive attempt ttt; combined with Lemma 1 it leaves a marked projection of length at least 1/12−3γ1/\sqrt{12}-3\gamma1/12​−3γ.

Formalization Note The paper states this under pM<1/2p_M<1/2pM​<1/2, which makes t≥1t\ge1t≥1. The Lean statement does not assume it: when pM≥1/2p_M\ge1/2pM​≥1/2 one has t=0t=0t=0 and ∣ψ0⟩=∣φ0⟩|\psi_0\rangle=|\varphi_0\rangle∣ψ0​⟩=∣φ0​⟩, so the bound holds trivially. At t=0t=0t=0 the formula At∣νt−1⊥⟩A_t|\nu^\perp_{t-1}\rangleAt​∣νt−1⊥​⟩ reads ∣φ0⟩|\varphi_0\rangle∣φ0​⟩.

Preamble
import Mathlib
import Definitions.Def_QuantumWalkSearch_ApproxRAA_Setting
import Definitions.Def_QuantumWalkSearch_ApproxRAA_Circuit
import Definitions.Def_QuantumWalkSearch_ApproxRAA_Tolerant
Formal statement
namespace QuantumWalkSearch.ApproxRAA

/-- The accumulated error (§4, p. 16, proof of Lemma 2). With `T ≥ t` registers, `t` as in
Lemma 1 and `0 < γ ≤ 1/40`, the drift at attempt `t` of Tolerant RAA satisfies
`δ_t = ‖|ψ_t⟩ − |φ_t⟩‖ ≤ π/8 + 9γ/8`. -/
theorem drift_total {X : Type*} [Fintype X] [DecidableEq X] {κ : ℕ → Type*}
    [∀ i, Fintype (κ i)] [∀ i, DecidableEq (κ i)]
    (M : Finset X) (piState : EuclideanSpace ℂ (X × X)) (hπ : ‖piState‖ = 1)
    (z : ∀ i, κ i) (R : ∀ i, Matrix (X × X × κ i) (X × X × κ i) ℂ)
    (γ : ℝ) (hγ : 0 < γ) (hγ' : γ ≤ 1 / 40) (hR : ApproxReflections piState z R γ) (t : ℕ)
    (ht : IsFirstHit (Real.arcsin (Real.sqrt (markedWeight M piState))) t) (T : ℕ)
    (htT : t ≤ T) :
    ‖tolState M z R piState T t - phi M z R piState T t‖ ≤ Real.pi / 8 + 9 * γ / 8 := by sorry

end QuantumWalkSearch.ApproxRAA
Source
Magniez, Nayak, Roland, Santha, Search via Quantum Walk, arXiv:quant-ph/0608026v4, p. 16, §4, proof of Lemma 2 (last line of the display after Eq. (5))
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 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