Phase estimation on : output with at the optimal
ProvedShorWiki.phaseEstimation_eigStatequantum-computingshor-algorithm
Let with , , , and . Apply the phase estimation circuit for the modular-multiplication gate, with a -qubit first register, to . Then there is a state of the first register such that:
- the output is the product state ;
- for every with (a nearest integer to ),
This is the guarantee of quantum phase estimation specialised to the eigenstates of .
Formalization Note The article writes , which is meaningful only when is an integer; it is formalized as the probability of any nearest integer to , the "optimal bitstring" of the section Choosing the size of the first register.
Preamble
import Mathlib import Definitions.Def_ShorWiki_Defs open Matrix Kronecker
Formal statement
namespace ShorWiki
theorem phaseEstimation_eigState (N a : ℕ) (ha : 1 < a) (haN : a < N)
(hcop : Nat.Coprime a N) (j : ℕ) (hj : j < ord N a) :
∃ φ : Fin (2 ^ (2 * regBits N)) → ℂ,
phaseEstimationCircuit N a (regBits N) (2 * regBits N) *ᵥ
tensorState (ket (2 ^ (2 * regBits N)) 0) (eigState N a (regBits N) j)
= tensorState φ (eigState N a (regBits N) j) ∧
∀ k : Fin (2 ^ (2 * regBits N)),
|((k : ℕ) : ℝ) / 2 ^ (2 * regBits N) - (j : ℝ) / ord N a|
≤ 1 / 2 ^ (2 * regBits N + 1) →
4 / Real.pi ^ 2 ≤ ‖φ k‖ ^ 2 := by sorry
end ShorWiki
Source
Wikipedia, "Shor's algorithm", revision oldid=1378862216, https://en.wikipedia.org/w/index.php?title=Shor%27s_algorithm&oldid=1378862216, section "Quantum phase estimation" (PDF p. 5)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.