Measuring the first register: each appears with probability
ProvedShorWiki.measureFirst_orderFindingOutputquantum-computingshor-algorithm
Let with , and . Let be the probability of outcome when the first register of the order-finding output state (phase estimation applied to ) is measured, and let be the corresponding probability for the output of phase estimation applied to . Then for every ,
So the measurement on the actual input behaves as if a uniformly random had been chosen first and phase estimation then run on .
Preamble
import Mathlib import Definitions.Def_ShorWiki_Defs open Matrix Kronecker
Formal statement
namespace ShorWiki
theorem measureFirst_orderFindingOutput (N a : ℕ) (ha : 1 < a) (haN : a < N)
(hcop : Nat.Coprime a N) (k : Fin (2 ^ (2 * regBits N))) :
measureFirst (orderFindingOutput N a) k
= (1 / (ord N a : ℝ)) * ∑ j ∈ Finset.range (ord N a),
measureFirst (phaseEstimationCircuit N a (regBits N) (2 * regBits N) *ᵥ
tensorState (ket (2 ^ (2 * regBits N)) 0) (eigState N a (regBits N) j)) k := 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.