Home / Play / Q-Day Machine
Q-Day Machine
Make a lock from two primes, find the rhythm hidden inside it, then read the beat the way a quantum computer would and watch the lock open.
Watch the 1-min video, then play the step under it.
Step 1 of 6 Β· classical
Multiplying is easy. Going backwards is hard.
1Watch the 1-minute version
Full episode, script and sources β2Now play with it
Tap two numbers. Multiplying them takes one step. Finding them again from the answer is the lock behind , which helps secure websites, email and banking.
Try this
- Tap two primes to make a new lock.
- Press Go backwards again. Count the tries.
- Pick 29 and 31. Does splitting get harder?
3Prove it (10 seconds)
Real names
Splitting a number back into its primes = factoring. The lock number = the RSA modulus, the public part of an RSA key. Trying every number in turn = trial division.
Quick one, optional: what taught you more in this part?
Step 2 of 6 Β· the key idea
Every lock hides a rhythm.
Pick a number and keep multiplying it. The remainders repeat, like a song on loop. Know the length of that loop, and the factors fall out.
Pick a number a. Multiply by a again and again, keeping only the after dividing by the lock. The values loop, and the loop length r is the key.
Find the rhythm, and the lock opens.
Try this
- Pick a different number a.
- Pick a different lock.
- Find a loop that is 10 steps or longer.
Real names
The length of the loop = the period, also called the order of a. Multiplying again and again and keeping the remainder = modular exponentiation.
Step 3 of 6 Β· classical
A normal computer walks the loop, one step at a time.
Finding the loop is the hard part. A normal computer has to walk it, one step at a time.
It works out each value and asks: back to 1 yet? For lock 21 that takes 6 steps. For a 617-digit lock, the loop length itself can have hundreds of digits. Walking it is hopeless.
Fair play: cleverer classical methods exist. You will race the best known one in step 6.
Try this
- Press Walk the loop. Watch the count.
- Press One step.
- Keep stepping until it is back to 1.
Real names
Finding the length of the loop = order finding. Walking every step = brute force. No fast way to do this on a normal computer is known.
Step 4 of 6 Β· quantum
A quantum computer makes the rhythm show up.
1Watch the 1-minute version
Full episode, script and sources β2Now play with it
It sets up every x at once (). Then waves cancel on wrong answers and add up on right ones (). Reading it gives one random answer, most likely on a spike.
Not magic: it does not try every answer and hand you the best one. Without interference you would read a random x, which tells you nothing. The speedup comes from the waves, and each run gives just one reading.
Try this
- Replay the interference. Watch the beat stand out.
- Press Measure to read one beat.
- Measure 5 times. Where do the readings land?
3Prove it (10 seconds)
Real names
The step that makes the beat stand out = the quantum Fourier transform. A reading = a measurement. The whole recipe = Shor's algorithm, found by Peter Shor in 1994.
Quick one, optional: what taught you more in this part?
Step 5 of 6 Β· the answer
From one reading to two primes.
You read one beat. Ordinary maths turns it into the length of the loop. Then the factors fall out.
Your reading sits near a simple . Its bottom number is the rhythm r. One old trick, the , then splits the lock.
Who did what: the quantum computer only found the rhythm. Everything on this card is ordinary math.
Try this
- Open a lock. Follow the three lines.
- Go back to step 2, pick lock 21 and a = 4. Not every a works.
- Open a second lock.
Real names
Turning the reading into a fraction = continued fractions. The old trick = the greatest common divisor, found with Euclid's method. This part needs no quantum computer.
Step 6 of 6 Β· classical vs quantum
The race: watch how the cost grows.
1Watch the 1-minute version
Full episode, script and sources β2Now play with it
On tiny locks, walking the loop is quick, so classical wins. The real story is what happens as locks get bigger. Drag the slider between tiny locks and RSA size.
Try this
- Race lock 899. Who does less work?
- Drag the slider down to 20 digits or fewer.
- Go back up to 617 digits. Which count is smallest now?
3Prove it (10 seconds)
Real names
Try every divisor = trial division. Best known classical = the general number field sieve. A 617-digit lock = RSA-2048. The quantum recipe = Shor's algorithm.
Quick one, optional: what taught you more in this part?
Reality check
This page simulates a machine nobody has built yet.
- Real hardware has only factored tiny numbers this way. Published runs of Shor's algorithm on real hardware have factored small numbers such as 15 [1] and 21 [2]. Some early demos used circuits simplified with knowledge of the answer [3].
- RSA-2048 is out of reach today. Its lock number has 617 digits. Breaking it needs a large, error-corrected quantum computer, and none exists yet.
- The fix is already here. In August 2024 NIST finalized new post-quantum standards, FIPS 203, 204 and 205 [4].
- Vandersypen et al., "Experimental realization of Shor's quantum factoring algorithm using nuclear magnetic resonance", Nature 414, 883β887 (2001). arxiv.org/abs/quant-ph/0112176
- MartΓn-LΓ³pez et al., "Experimental realisation of Shor's quantum factoring algorithm using qubit recycling", Nature Photonics 6, 773β776 (2012). arxiv.org/abs/1111.4147
- Smolin, Smith and Vargo, "Oversimplifying quantum factoring", Nature 499, 163β165 (2013). doi.org/10.1038/nature12290
- NIST, FIPS 203, 204 and 205, released August 2024. csrc.nist.gov/pubs/fips/203/final
What's next
Want the next doorway into quantum?
Short, plain-English explainers on qubits, error correction and what quantum computers can really do.
Follow @quantum_with_kiranFree play
Any odd lock up to 1023 that is not prime and not a power of one prime, like 391 or 899. Leave a blank to let the machine guess. The seed replays the same run.
Behind the sim
What I simplified
The quantum part is simulated on your device: the bars are the exact odds for a perfect, noise-free quantum computer, and each reading is drawn from them with seeded randomness. The locks here are tiny (1023 at most), while a real RSA lock has 617 digits. The race chart uses textbook growth formulas with the constants dropped and no error-correction overhead, so it shows a shape, not a stopwatch.
Sources (6)
- Shor, "Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer" (1995)arxiv.org
- Gidney, "How to factor 2048 bit RSA integers with less than a million noisy qubits" (2025)arxiv.org
- Willsch et al., "Large-Scale Simulation of Shor's Quantum Factoring Algorithm" (2023)arxiv.org
- Smolin, Smith and Vargo, "Oversimplifying quantum factoring", Nature 499 (2013)doi.org
- NIST FIPS 203, Module-Lattice-Based Key-Encapsulation Mechanism Standard (August 2024)csrc.nist.gov
- Boudot et al., "Comparing the difficulty of factorization and discrete logarithm: a 240-digit experiment" (2020)arxiv.org
One new quantum idea, every week
The next episode in your inbox, with its sources. Free, and one click to unsubscribe.
Next: check your inbox for a one-click confirm email from QWK Newsletter (peek in Promotions or Spam). Click it and you're in.