Shor's Algorithm: Period-Finding Visualizer
Interactive 3D simulator of the quantum period-finding step behind Shor's algorithm: watch the quantum Fourier transform turn a collapsed register into sharp interference peaks, then use continued fractions to recover the period and factor a composite number.
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.
Simulate the quantum period-finding step behind Shor's algorithm: collapse a register on a measured residue, apply an exact quantum Fourier transform to see interference peaks emerge, and recover the period via continued fractions to factor a composite number.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install