An ordinary computer stores everything as bits, each one either 0 or 1, held as a high or low voltage in a transistor. A quantum computer uses qubits instead. The word sounds exotic, but a qubit can be built from many familiar things: the spin of an electron, two energy levels of a single atom, the polarization of a photon, or the direction of current in a tiny superconducting loop. What matters is that it follows quantum rules. Two of those rules, superposition and measurement, are what matter for information.
From bits to qubits
A qubit is a two-level quantum system that can be in a superposition of 0 and 1, described by two numbers called amplitudes. The amplitudes set the odds of getting 0 or 1 when the qubit is measured. When you do measure, you always get a plain 0 or a plain 1, never something in between, and the superposition is gone. So far a qubit might sound like a coin spinning in the air, which lands heads or tails. The analogy breaks down at the most important point.
Amplitudes are not probabilities
Probabilities are always positive, and they only add up. Amplitudes can be positive or negative (in general, complex numbers), and so different ways of reaching the same outcome can reinforce each other or wipe each other out. Unlike ordinary probabilities, amplitudes can cancel each other out, an effect called interference. Water waves do the same thing when crest meets trough. Interference is the real engine of quantum computing.
Many qubits
One qubit needs two amplitudes. Two qubits need four, one for each pattern 00, 01, 10 and 11. Every extra qubit doubles the count. Describing a general state of n qubits takes 2 multiplied by itself n times, or 2 to the power n, amplitudes. For 300 qubits that is more numbers than there are atoms in the observable universe, which is why ordinary computers struggle to simulate large quantum systems. Some of those states are entangled, meaning the qubits share a joint state that cannot be split into separate descriptions of each one.
The myth of trying every answer at once
Popular articles often say a quantum computer works by trying every possible answer at the same time. That is misleading. Yes, a register of qubits can be in a superposition of many patterns. But measuring gives just one random outcome, so a quantum computer cannot simply read out all the answers it seemed to hold. The computer scientist Scott Aaronson has spent years correcting this picture. The real trick is subtler: a good quantum algorithm arranges interference so that the amplitudes of wrong answers cancel out and those of right answers reinforce. Only some problems have the hidden structure that lets this choreography work, which is why quantum computers help with some tasks and not others.
Gates, circuits and shots
A quantum program is a circuit: a sequence of operations called gates, each applied to one or two qubits, usually by carefully timed pulses of microwaves or laser light. A gate rotates the qubits' amplitudes in a precise way. At the end, the qubits are measured. Because the results are probabilistic, quantum programs are usually run many times, often thousands, and the outcomes are tallied; each run is called a shot.
Fragile by nature
The great enemy is the outside world. A stray vibration, a flicker of heat, a passing magnetic field: anything that interacts with a qubit can carry off some of its quantum information. Decoherence is the leaking of a qubit's quantum information into its surroundings, which destroys superposition and interference. Depending on the technology, qubits keep their coherence for anywhere from millionths of a second to many seconds. Every computation must finish, or be protected, before decoherence wins.
Where the idea came from
In a 1981 lecture, published in 1982, Richard Feynman argued that simulating quantum nature efficiently might need a computer that is itself quantum. In 1985 David Deutsch in Oxford described a universal quantum computer, one that could in principle carry out any quantum computation.
Worked example: the coin that un-flips
Start with a qubit in 0. Apply a standard operation, the Hadamard gate, which turns 0 into an equal superposition: two equal amplitudes, both positive, so measuring now gives 0 or 1 with even odds. It looks like a coin flip. Now apply the same gate again, without measuring. If this were a real coin, flipping a random coin again would leave it random. But the qubit returns to 0 with certainty. Why? The gate sends each branch to both outcomes, but with one twist: the path from 1 to 1 picks up a minus sign. The two paths leading to 0 are both positive and add up. The two paths leading to 1 are one positive, one negative, and they cancel exactly. Now spoil the experiment by measuring in the middle, or by letting heat in so the environment effectively measures. The cancellation vanishes and the final result is random. That small demonstration contains the whole story of this level: amplitudes, interference, measurement and decoherence. A real algorithm does the same thing with many qubits and a cleverly designed pattern of minus signs.
