Home▸Quantum Computing▸Shor's Algorithm (2D)

⚛️ Shor's Algorithm (2D)

A 2D Canvas companion to Shor's algorithm: watch the real a^x mod N sequence, detect its period r, and run the real gcd(a^(r/2)±1, N) classical post-processing step that factors N.

Quantum Computing2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-shor-algorithm ↗ Open standalone
⚙ Under the hood

Explore Shor's algorithm in 2D: compute the real a^x mod N sequence, detect its period r from a bar chart, then run the real classical gcd(a^(r/2)±1, N) post-processing step to factor N. Choose N (15, 21, or 35), pick or randomize a coprime base a, and step through real period-finding and factoring.

quantum computingshor's algorithmnumber theorycryptographyfactoringmodular arithmetic

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)