Alphabeta Math
AlgorithmAlgorithm: Literature-sourcedProof: Not applicablePipeline-generated
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Modular order finding with rational reconstruction

Definition

Input. An integer N≥3, the standard representative x∈{1,…,N−1} of a unit class modulo N, and an integer b≥1 specifying target failure probability δ=2−b.

The representative is the unique one in 0≤x<N by For n≥1, every class in Z/n has one representative r with 0≤r<n, so ∣Z/n∣=n; while Z/0 is in bijection with Z; unit membership is equivalent to gcd⁡(x,N)=1 by The unit group (Z/n)× and Euler's totient φ(n)=∣(Z/n)×∣ for n≥1 and For n≥1, [a]n is a unit if and only if gcd⁡(a,n)=1. The register ket ∣1⟩ uses Dirac Notation Conversion. The superposition output law for applying the QPE gate list to this non-eigenvector input is supplied by Phase estimation on a superposition of eigenspaces.

Output. An accepted candidate, or FAIL.

Instructions. Set n=⌈log⁡2N⌉, m=2n+3, Q=2m, and t=4(n+1)b. The inequality Q>4N2 follows from N≤2n. Compute the inverse constant by the following binary-integer loop. Initialize (R,S,U,V):=(N,x,0,1). While S>0, use division with remainder to compute q,r with R=qS+r and 0≤r<S, compute the least residue h=(U−qV) mod N, and simultaneously replace (R,S,U,V) by (S,r,V,h). Division and least residues use Division with remainder in Z: for a∈Z and b>0 there are unique q,r∈Z with a=qb+r and 0≤r<b and For n≥1, every class in Z/n has one representative r with 0≤r<n, so ∣Z/n∣=n; while Z/0 is in bijection with Z; use schoolbook binary arithmetic for every update. When the loop stops, return FAIL if R≠1; otherwise set b0:=U and a0:=x. The inverse identity, termination, and preprocessing bit cost are established in Gate and bit cost of modular multiplication and powering. For j=0,…,m−2, compute aj+1=aj2 mod N and bj+1=bj2 mod N. Then aj=x2j mod N and bj=aj−1 mod N for all j<m.

Repeat independently for samples s=1,…,t. Initialize the system register to the valid residue ∣1⟩ and apply the QPE phase-estimation circuit with phase-register length m. Its controlled Ux2j gate is implemented by the explicit controlled modular-multiplication circuit for aj from Reversible modular multiplication by a unit. This procedure uses the QPE gate list on ∣1⟩; it does not assert that ∣1⟩ is an eigenvector. Measure the phase register to obtain y. Run Rational reconstruction from a phase sample with (N,Q,y). If it returns FAIL, retain no denominator from this sample. If it returns p/q, compute xq mod N as follows: set v:=1, a:=x, e:=q; while e>0, if e is odd set v:=va mod N, then set a:=a2 mod N and e:=⌊e/2⌋. Retain q exactly when the final v=1.

After all samples, return the smallest retained positive denominator; return FAIL if none was retained. A passing candidate is not called the order unless it is minimal. The exact criterion xq=1 iff the order divides q is If ord⁡(g)=n then gk=e iff k is an integer multiple of n, the powers g0,…,gn−1 are distinct, and ⟨g⟩ has exactly n elements; if g has infinite order then gj=gk only for j=k. The separate item thm-qa-modular-order-finding-success proves the probability guarantee and the fact that every retained candidate is an order multiple.

Depends on

Used by

Dependency tree · two levels

108 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources