Householder form of the oracle:
ProvedGroverWiki.phaseOracle_eq_householdergrover-algorithmquantum-computingquantum-search
Let have exactly one index with , and let be the phase oracle. Then is the Householder reflection
This identifies the oracle as a reflection, the first ingredient of the geometric picture of Grover's algorithm.
Preamble
import Mathlib import Definitions.Def_GroverWiki_Defs open Matrix
Formal statement
namespace GroverWiki
/-- Householder form of the oracle: if `ω` is the unique index with `f(ω) = 1`, then
`U_ω = I - 2|ω⟩⟨ω|`. -/
theorem phaseOracle_eq_householder {N : ℕ} (f : Fin N → Fin 2) (ω : Fin N)
(hω : ∀ x, f x = 1 ↔ x = ω) :
phaseOracle f = 1 - (2 : ℂ) • vecMulVec (ket ω) (star (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. 4)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.