$ The central demonstration
Factor N using a real simulated quantum period-finding circuit, then recover the factors with the classical continued-fractions post-processing -- run the full pipeline, not a hardcoded answer.
three orbits, three speeds -- periodically they land in the same place at the same time. that's the signal a period-finding measurement is built to catch.
N here is deliberately tiny (15–65), so the entire pipeline -- simulation, measurement, and classical post-processing -- runs end to end in real time. See Resource Estimation for what a real RSA-2048 key would actually require.
0. Watch it work, step by step
try your own N and a — the whole diagram below recomputes for real
Step 1 of 5: Superposition. Put the counting register into every value 0–15 at once, instead of picking just one.
Hsuperposition●–●controlled opQFT⁻¹inverse Fourier⌒↗measurement
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
every one of the 16 states carries the same amplitude — 0.250
01Put the counting register into every value 0–15 at once, instead of picking just one.
The actual code behind this step
quantum/shor.py:121-122hover a dotted line for what it does
for q in control_qubits:register.apply_gate(H, q)
1. Pick a starting point
Failure-mode gallery
Four real, curated (N, a) pairs -- one for each outcome this algorithm can actually produce. Click one to load it above, then run it yourself.
Loading available backends…