Register size:
ProvedShorWiki.register_size_boundquantum-computingshor-algorithm
Let with , and . Then
This is why a first register of qubits suffices: an optimal outcome approximates to within , which is within the range of the continued fraction theorem.
Preamble
import Mathlib import Definitions.Def_ShorWiki_Defs open Matrix Kronecker
Formal statement
namespace ShorWiki
theorem register_size_bound (N a : ℕ) (ha : 1 < a) (haN : a < N)
(hcop : Nat.Coprime a N) :
(1 : ℝ) / 2 ^ (2 * regBits N + 1) ≤ 1 / (2 * (N : ℝ) ^ 2) ∧
1 / (2 * (N : ℝ) ^ 2) ≤ 1 / (2 * (ord N a : ℝ) ^ 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 "Choosing the size of the first register" (PDF p. 6)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.