§5, eq. (5.11) — each state with has probability
ProvedShorAlgorithms.OrderFinding.outcome_prob_geThere is a threshold such that the following holds for every . Let be coprime to with multiplicative order modulo , let satisfy , let and , and suppose there is an integer with
Then the probability of observing in the final state (5.4) is at least
The hypothesis is the paper's condition (5.12), equivalently (5.11), , where is the residue of modulo in . This per-state bound is what the count of good outcomes turns into the success probability .
Formalization Note The threshold is quantified before , , , and , so it is uniform in all of them, as in the paper's "for sufficiently large ". The condition is stated in the form (5.12) with an integer , which avoids defining the symmetric residue; the two forms are equivalent because .
import Mathlib import Definitions.Def_ShorAlgorithms_OrderFinding_outcomeProb
namespace ShorAlgorithms.OrderFinding
/-- Shor (1997), §5, eqs. (5.11)–(5.12), p. 1500. For all sufficiently large `n` (the threshold
`N` is uniform in `x`, `q`, `c`, `k`): if `x` is coprime to `n` with order `r`, `q = 2^l` with
`n² ≤ q < 2n²`, `0 ≤ k < r`, and there is an integer `d` with `-r/2 ≤ rc - dq ≤ r/2`
(equivalently `-r/2 ≤ {rc}_q ≤ r/2`), then the probability of observing `|c, x^k (mod n)⟩`
is at least `1/(3r²)`. -/
theorem outcome_prob_ge : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → ∀ x : ℕ, Nat.Coprime x n →
∀ q l : ℕ, q = 2 ^ l → n ^ 2 ≤ q → q < 2 * n ^ 2 →
∀ c : Fin q, ∀ k : ℕ, k < orderOf (x : ZMod n) →
(∃ d : ℤ,
-((orderOf (x : ZMod n) : ℝ) / 2) ≤
(orderOf (x : ZMod n) : ℝ) * ((c : ℕ) : ℝ) - (d : ℝ) * (q : ℝ) ∧
(orderOf (x : ZMod n) : ℝ) * ((c : ℕ) : ℝ) - (d : ℝ) * (q : ℝ) ≤
(orderOf (x : ZMod n) : ℝ) / 2) →
1 / (3 * (orderOf (x : ZMod n) : ℝ) ^ 2) ≤ outcomeProb n x q c ((x : ZMod n) ^ k) := by sorry
end ShorAlgorithms.OrderFinding
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.