True period peaks (Q/r) QFT probability P(k) Measured outcome
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Shor's Algorithm: Period-Finding Visualizer

Shor's algorithm is the reason a large enough quantum computer would break RSA encryption — and its entire quantum advantage lives in one step: finding the period of a modular-exponentiation function through quantum interference. This simulator runs that step's real mathematics classically: pick a composite N and a coprime base a, collapse the input register onto the periodic residue class left behind by measuring aˣ mod N, then apply an exact quantum Fourier transform and watch sharp interference peaks emerge at multiples of Q/r. A live continued-fraction extraction turns a single sampled outcome into an estimated period, and — when the period is even — the classical gcd step that actually factors N.