Jordan form of the Grover matrix:
ProvedGroverWiki.groverMatrix_jordan_formgrover-algorithmquantum-computingquantum-search
Let , , and let
be the matrix of in the spanning set and the change-of-basis matrix. Then is invertible and
- ;
- for every , .
The diagonal form gives a closed formula for the state after any number of Grover iterations.
Formalization Note M⁻¹ is Mathlib's matrix inverse, which is the zero matrix for a singular matrix; for one has , so . The hypothesis excludes , where is singular.
Preamble
import Mathlib import Definitions.Def_GroverWiki_Defs open Matrix
Formal statement
namespace GroverWiki
/-- Algebraic proof: Jordan form of the matrix of `U_s U_ω` in the basis `{|ω⟩, |s⟩}`, and of its
`r`-th power. With `t = arcsin(1/√N)` and `M = [[-i, i], [e^{it}, e^{-it}]]`,
`U_s U_ω = M diag(e^{2it}, e^{-2it}) M⁻¹` and `(U_s U_ω)^r = M diag(e^{2rit}, e^{-2rit}) M⁻¹`. -/
theorem groverMatrix_jordan_form {N : ℕ} (hN : 2 ≤ N) :
let t : ℝ := Real.arcsin (1 / Real.sqrt N)
let A : Matrix (Fin 2) (Fin 2) ℂ :=
!![1, 2 / (Real.sqrt N : ℂ); -2 / (Real.sqrt N : ℂ), 1 - 4 / (N : ℂ)]
let M : Matrix (Fin 2) (Fin 2) ℂ :=
!![-Complex.I, Complex.I; Complex.exp (t * Complex.I), Complex.exp (-(t * Complex.I))]
A = M * !![Complex.exp (2 * t * Complex.I), 0; 0, Complex.exp (-(2 * t * Complex.I))] * M⁻¹ ∧
∀ r : ℕ, A ^ r =
M * !![Complex.exp (2 * r * t * Complex.I), 0;
0, Complex.exp (-(2 * r * t * Complex.I))] * M⁻¹ := 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.