§6, eq. (6.17) — each good state is observed with probability at least
ProvedShorAlgorithms.DiscreteLog.good_state_prob_geThroughout, is a prime, is a generator of the multiplicative group (an element of order ), is an integer with and (so is the discrete logarithm of ), and is a power of with .
Let be such that is good, i.e. satisfies conditions (6.10) and (6.11), and let be any nonzero residue modulo . Then the probability of observing when the final state (6.3) is measured satisfies
This per-state lower bound, combined with a count of good pairs, gives the constant success probability of the algorithm.
Formalization Note The paper derives the bound from the integral approximation (6.16), whose error term has an unspecified constant, and then states without a threshold on . The statement here is the page's unconditional claim, for every prime .
import Mathlib import Definitions.Def_ShorAlgorithms_DiscreteLog_outcomeProb import Definitions.Def_ShorAlgorithms_DiscreteLog_IsGood
namespace ShorAlgorithms.DiscreteLog
/-- Shor (1997), §6, eq. (6.17), p. 1504: under the hypotheses of §6, every state `|c, d, y⟩`
whose `(c, d)` satisfies (6.10) and (6.11) is observed with probability at least `1/(20 q²)`. -/
theorem good_state_prob_ge (p : ℕ) [hp : Fact p.Prime] (g : (ZMod p)ˣ) (hg : orderOf g = p - 1)
(r : ℕ) (hr : r < p - 1) (q l : ℕ) (hq : q = 2 ^ l) (hpq : p < q) (hqp : q < 2 * p)
(c d : Fin q) (hgood : IsGood p q r c d) (y : (ZMod p)ˣ) :
1 / (20 * (q : ℝ) ^ 2) ≤ outcomeProb p g (g ^ r) q c d y := by sorry
end ShorAlgorithms.DiscreteLog
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.