Period as the lcm of two reduced denominators (corrected: coprime numerators of , )
ProvedFowlerLSQC.Shor.period_eq_lcm_dennumber-theoryp2o-correctedp2o-gran-per-chapterp2o-plan-bookp2o-strengthenedp2o-v1shor-algorithm
Let be a positive integer and let be integers with , and . Write and for the denominators of and in lowest terms. Then
In Shor's algorithm and (in lowest terms) are convergents of two useful outcomes, so two runs whose underlying numerators are coprime recover the period as the least common multiple of the two convergent denominators.
Formalization Note The denominator of in lowest terms is the denominator of the rational number .
Differences from the source:
- correction: "If a pair exists such that and are divisors of then " (coprime convergent numerators) → coprime numerators of , before reduction, with the reduced denominators; reason: as printed it is false: , , , ; (useful, ) has the convergent and (useful, ) has the convergent ; the numerators are coprime and divide , but
- generalization: the period of → any positive integer ; reason: the identity is arithmetic in and the period is a special case
Preamble
import Mathlib
Formal statement
namespace FowlerLSQC.Shor
/-- Recovering the period as a least common multiple (corrected), Fowler, *Towards Large-Scale
Quantum Computation*, arXiv:quant-ph/0506126v1, Ch. 7, p.81 (PDF 99). The book: "If a pair
c_mn, c_m′n′ exists such that gcd(c_mn, c_m′n′) = 1 and d_mn, d_m′n′ are divisors of r then
r = lcm(d_mn, d_m′n′)". As printed (coprime convergent numerators) this is false; the corrected
statement asks for coprime `c, c′` in the useful outcomes `c/r`, `c′/r`, whose reduced
denominators `d = r / gcd(c, r)`, `d′ = r / gcd(c′, r)` are the convergent denominators the
procedure finds: for `0 < c, c′ < r` with `gcd(c, c′) = 1`, `r = lcm(d, d′)`.
**Formalization Note** The reduced denominator of `c/r` is `((c : ℚ) / r).den`. The statement is
for every `r`, not only the period of some `m^k mod N`. -/
theorem period_eq_lcm_den (r c c' : ℕ) (hc0 : 0 < c) (hcr : c < r) (hc'0 : 0 < c') (hc'r : c' < r)
(hcop : Nat.Coprime c c') :
Nat.lcm ((c : ℚ) / r).den ((c' : ℚ) / r).den = r := by sorry
end FowlerLSQC.Shor
Source
Fowler, Towards Large-Scale Quantum Computation, arXiv:quant-ph/0506126v1, Ch. 7, p.81 (PDF p.99)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.