Powers of Two and Qubits: What a Game of 2048 Can (and Can't) Teach About Quantum Computing
I built Qubits 2048 as a playful corner of this site: slide matching tiles together and watch powers of 2, 3, or 5 climb. It isn't a quantum computer, and I don't want to pretend it is. But the numbers on those tiles point at one of the most important ideas in quantum computing, and a game is a friendly place to start.
How the game works
The board is a 4×4 grid. Pick a base, and new tiles appear as that base or its square. When two equal tiles meet, they merge into the next power: in base 2, two 23 tiles become one 24. The run ends when the board is full and no merge is left, and the game tells you the wave function has collapsed. It's a pun, but it's also a small invitation to ask what that phrase actually means.
Why powers of two show up in quantum computing
A classical bit is 0 or 1. A register of n bits holds exactly one of 2n possible values at a time. Three bits can store any one of 8 patterns, from 000 to 111.
A qubit is different. Its state is described by two complex numbers called amplitudes, one for 0 and one for 1. To describe n qubits in general, you need an amplitude for every one of the 2n patterns at once. Every qubit you add doubles the number of amplitudes, exactly like climbing one more power on a base-2 tile. That doubling is part of why simulating large quantum systems on ordinary computers gets hard so quickly, and part of why people became interested in building quantum computers in the first place.
The game's other bases have a real counterpart too. Physicists also study qudits, systems with more than two levels. A three-level system is called a qutrit, and n qutrits need 3n amplitudes, which is a fun way to think about base 3 on the board.
What "collapse" means
You never read amplitudes off directly. When you measure a qubit, you get an ordinary 0 or 1. The probability of each outcome is the squared magnitude of its amplitude, a rule known as the Born rule. After the measurement, the qubit is left in the state you observed. That's the "collapse" the game's ending jokes about.
This is also where the analogy to the game breaks down, and it's worth being honest about it. Having 2n amplitudes doesn't mean a quantum computer can try 2n answers and read them all out. A measurement gives you one outcome. The real skill in quantum algorithms is arranging the amplitudes so that interference makes useful answers likely and wrong answers cancel out.
See it yourself in a few lines of Python
You don't need special hardware to build intuition. Two qubits are just a vector of four amplitudes, and quantum gates are matrices. Here's a small NumPy sketch that applies a Hadamard gate and then a CNOT, the same pair drawn in the circuit card on the Quantum Arcade page:
import numpy as np
H = np.array([[1, 1], [1, -1]]) / np.sqrt(2) # Hadamard
I = np.eye(2)
CNOT = np.array([[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 0, 1],
[0, 0, 1, 0]])
state = np.array([1, 0, 0, 0]) # both qubits start at |00>
state = np.kron(H, I) @ state # put the first qubit in superposition
state = CNOT @ state # entangle the second with the first
probs = np.abs(state) ** 2
for label, p in zip(["00", "01", "10", "11"], probs):
print(label, round(p, 3))
Run it and you'll see a 50% chance of 00, a 50% chance of 11, and no chance of 01 or 10. That's an entangled Bell state: the two qubits always agree when measured, even though neither one has a definite value beforehand. Change a gate, rerun it, and see what happens. That kind of play is how the linear algebra starts to feel natural.
Where the real advantages are
It's easy to overstate what quantum computers do, so I'll stick to two well-established results. In 1994, Peter Shor published an algorithm that would let a large, error-corrected quantum computer factor integers efficiently, which is why quantum computing matters for cryptography. In 1996, Lov Grover described a search algorithm with a quadratic speedup over checking possibilities one by one. Both depend on interference, not on reading out every possibility. Building machines reliable enough to run them at useful scale is still active work.
Play is part of learning
I made Qubits 2048 because I learn best when I'm playing. A game lets you notice patterns before you have words for them. Then the math gives those patterns a name. I think that's part of the creative process I'm grateful for, a gift worth using, and one more reason to keep building small things in public.
This is also a great place to use AI as a lever. Ask a model to explain why the Hadamard matrix looks the way it does, or why measurement probabilities are squared. Then check its answer with a few lines of code like the ones above. The tool speeds you up. The understanding, and the joy of the moment it clicks, are yours.
If you build on this, whether it's a new gate in the Python sketch or your own little quantum game, I'd love to see it. That's how a community of learners grows.