Play through quantum’s most famous algorithm
Shor’s algorithm could one day break the encryption that protects the internet. Learn how it works through 3 puzzles.

// Puzzle 1 of 3
Find the rhythm
Your bank connection is safe because splitting a huge number into its two prime factors is extremely hard. Shor’s trick turns that problem into a different one: finding a rhythm.

Let’s split 15
After how many multiplications are you back at 1?
That rhythm is all you need
This works for most starting numbers. When it doesn’t, you pick another one and try again.
// Puzzle 2 of 3
Compose the score
Same rhythm as puzzle 1: powers of 7 on the 15-hour clock. This time, a quantum computer finds it. Its program is written like sheet music: each line is a qubit, read from left to right. Put Shor’s four movements in the right order in six tries or fewer.

- Click the blocks under the staff. Each click fills the next empty slot, left to right. Click a placed block to remove it.
- Press “Check my score” once all four slots are full. You have six tries.
- Read the colors the game gives back for each block:Right block, right place In the score, wrong place Not in the score
Click a block below to place it.
Each block does one job. Its description appears here when you click it.
// Puzzle 3 of 3
Hunt the errors
Qubits make two kinds of mistakes. A bit-flip swaps 0 and 1. A phase-flip flips the hidden sign that interference relies on. Error correction never looks at the data directly: it runs checks that light up when neighbouring qubits disagree. Your job is to find the faulty qubit from the lit checks.

Level A: ordinary qubits
Both kinds of error can happen, so you need both kinds of check, woven into a grid. Each round hides one bit-flip and one phase-flip. Each yellow qubit is watched by the blue checks around it. Tap the yellow qubit that sits between two lit checks of the same color.
