Algebraic proof: probability of observing after iterations is
ProvedGroverWiki.groverMatrix_success_amplitudegrover-algorithmquantum-computingquantum-search
Let , , and let be the matrix of in the spanning set . Since and , for every
The left-hand side is the probability of observing after iterations, computed in coordinates; this recovers the formula of the geometric proof, since .
Preamble
import Mathlib import Definitions.Def_GroverWiki_Defs open Matrix
Formal statement
namespace GroverWiki
/-- Algebraic proof: the probability of observing `ω` after `r` iterations, computed from the
`2 × 2` matrix of `U_s U_ω` in the basis `{|ω⟩, |s⟩}`:
`|[⟨ω|ω⟩ ⟨ω|s⟩] (U_s U_ω)^r [0, 1]ᵀ|² = sin²((2r+1)t)` with `t = arcsin(1/√N)`. -/
theorem groverMatrix_success_amplitude {N : ℕ} (hN : 1 ≤ N) (r : ℕ) :
‖![(1 : ℂ), 1 / (Real.sqrt N : ℂ)] ⬝ᵥ
((!![1, 2 / (Real.sqrt N : ℂ); -2 / (Real.sqrt N : ℂ), 1 - 4 / (N : ℂ)] ^ r) *ᵥ
![0, 1])‖ ^ 2 =
Real.sin ((2 * r + 1) * Real.arcsin (1 / Real.sqrt N)) ^ 2 := 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 "Algebraic proof" (PDF p. 6)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.