Interactive Demonstration of Shor's Algorithm

This simulator illustrates the classical steps behind Shor’s algorithm. A real quantum computer would detect the period using the Quantum Fourier Transform.


Step 1 — Choose number to factor
Enter N (≤ 999):
Step 2 — Choose value of a
a:
Step 3 — Search for the period

Attempt x used a^x mod N

Visualizing the sequence a^x mod N

Step 4 — Extract factors