Alternative oracle:
ProvedGroverWiki.standardOracle_tensor_minusgrover-algorithmquantum-computingquantum-search
Let , let be the standard oracle on , let be the phase oracle, and let . Then for every basis state ,
This shows that Grover's algorithm can be run with either oracle: given , one keeps an ancillary qubit in the state and applies in place of .
Preamble
import Mathlib import Definitions.Def_GroverWiki_Defs open Matrix
Formal statement
namespace GroverWiki
/-- Alternative oracle definition: on `|x⟩ ⊗ |−⟩`, the standard oracle `U_f` acts as the phase
oracle `U_ω` on the main register, leaving the ancilla in `|−⟩`. -/
theorem standardOracle_tensor_minus {N : ℕ} (f : Fin N → Fin 2) (x : Fin N) :
standardOracle f *ᵥ tensorKet (ket x) minusState =
tensorKet (phaseOracle f *ᵥ ket x) minusState := 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 "Alternative oracle definition" (PDF p. 3)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.