Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Each Grover iteration UsUωU_sU_\omegaUs​Uω​ rotates the plane by θ=2arcsin⁡(1/N)\theta = 2\arcsin(1/\sqrt N)θ=2arcsin(1/N​)

Proved
GroverWiki.groverIteration_rotation

by Lucas · Oct 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

grover-algorithmquantum-computingquantum-search

Let N≥2N \ge 2N≥2, let f ⁣:{0,…,N−1}→{0,1}f\colon\{0,\dots,N-1\}\to\{0,1\}f:{0,…,N−1}→{0,1} have exactly one index ω\omegaω with f(ω)=1f(\omega) = 1f(ω)=1, let ∣s′⟩=1N−1∑x≠ω∣x⟩|s'\rangle = \frac{1}{\sqrt{N-1}}\sum_{x\ne\omega}|x\rangle∣s′⟩=N−1​1​∑x=ω​∣x⟩, and let θ=2arcsin⁡1N\theta = 2\arcsin\frac{1}{\sqrt N}θ=2arcsinN​1​. Then for every angle φ∈R\varphi \in \mathbb Rφ∈R,

UsUω(cos⁡φ ∣s′⟩+sin⁡φ ∣ω⟩)=cos⁡(φ+θ) ∣s′⟩+sin⁡(φ+θ) ∣ω⟩.U_sU_\omega\bigl(\cos\varphi\,|s'\rangle + \sin\varphi\,|\omega\rangle\bigr) = \cos(\varphi+\theta)\,|s'\rangle + \sin(\varphi+\theta)\,|\omega\rangle .Us​Uω​(cosφ∣s′⟩+sinφ∣ω⟩)=cos(φ+θ)∣s′⟩+sin(φ+θ)∣ω⟩.

In the orthonormal basis {∣s′⟩,∣ω⟩}\{|s'\rangle, |\omega\rangle\}{∣s′⟩,∣ω⟩} of the plane, one Grover iteration is the rotation by the angle θ\thetaθ towards ∣ω⟩|\omega\rangle∣ω⟩.

Preamble
import Mathlib
import Definitions.Def_GroverWiki_Defs

open Matrix
Formal statement
namespace GroverWiki

/-- The Grover iteration `U_s U_ω` rotates every state `cos φ |s'⟩ + sin φ |ω⟩` of the plane
by the angle `θ = 2 arcsin(1/√N)`. -/
theorem groverIteration_rotation {N : ℕ} (hN : 2 ≤ N) (f : Fin N → Fin 2) (ω : Fin N)
    (hω : ∀ x, f x = 1 ↔ x = ω) (φ : ℝ) :
    groverIteration f *ᵥ
        ((Real.cos φ : ℂ) • perpState ω + (Real.sin φ : ℂ) • ket ω) =
      (Real.cos (φ + 2 * Real.arcsin (1 / Real.sqrt N)) : ℂ) • perpState ω +
        (Real.sin (φ + 2 * Real.arcsin (1 / Real.sqrt N)) : ℂ) • ket ω := by sorry

end GroverWiki
Source
Wikipedia, "Grover's algorithm", revision oldid=1373498442, https://en.wikipedia.org/w/index.php?title=Grover%27s_algorithm&oldid=1373498442, section "Geometric proof" (PDF p. 5)
Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 13, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me