A normal computer checks possibilities one at a time. A quantum computer gives every possibility a score, lets the scores add and cancel like waves, and reads out whatever is left standing. This page builds that idea from ripples in a pond to a search that finds one box out of four in a single try.
Noise-cancelling headphones work by making a second sound wave that is the first one flipped upside down. Added together, they make silence.
Two waves in step make a bigger wave. Two waves out of step make nothing.
The slider shifts the second wave along. At zero shift the two waves sit on top of each other and their sum is twice as tall. At a half-wave shift, which is 180 degrees, one rises exactly where the other falls, and the sum is a flat line. Everything on this page is a way of using that flat line.
On page 1 the arrow could point toward you or away from you without changing the odds. That compass direction is the same thing as the shift of a wave.
Spin the arrow around the vertical axis and a wave slides along with it. The height stays put, so the odds stay put.
Physicists call the compass direction of the arrow its phase, and they call the shift of a wave its phase too. That is not a coincidence. A qubit whose arrow points sideways is a wave, and its hidden direction says where in the cycle that wave is. When two such waves meet, they add or cancel depending on the difference between their directions.
Send a qubit down two roads at once, delay one road, and let the roads rejoin. Which detector lights up depends only on the delay.
Tip sideways to split the arrow onto two roads. Add a phase on one road. Tip sideways again to rejoin. The waves from the two roads add or cancel at the detectors.
Slide the delay. At zero delay the roads rejoin in step and detector 0 fires every time. At 180 degrees they rejoin out of step and detector 1 fires every time. The delay never changed the odds while the qubit was on the road. It only changed what happened at the rejoin. This is the whole trick, and every quantum algorithm uses it.
Two switches make four patterns. Two qubits give each of those four patterns a score. The chance of reading a pattern is its score squared, and scores can be negative.
Chance = score × score. A negative score is just as likely as a positive one, but negative and positive scores can cancel.
Below are four scores, one per pattern. Drag them. The chances update, and they always add to 100 percent, so the page keeps the scores in balance for you. Notice that a score of −0.5 gives the same chance as +0.5. Now read the next section, where a negative score is made to cancel a positive one on purpose.
Four boxes, one prize. Opening boxes one at a time takes 2.25 tries on average. With scores that cancel, it takes one.
Give every box the same score. Flip the sign of the prize box. Flip every score about the average. The prize box ends up with all of the chance.
You are not allowed to see which box has the prize. You are only allowed to ask a machine one question, and the machine answers by flipping the sign of the prize box's score. That sounds useless, since a sign flip does not change any chance. Then the "flip about the average" move turns the one negative score into the only score left. Step through it and watch the bars.
A quantum computer is not a faster computer. It is a different one, and it wins only on problems where the wrong answers can be made to cancel.
The hard part is keeping the scores. Every score on this page lives in the hidden direction of an arrow, and hidden directions get scrambled by every stray field that reaches the qubit. Real quantum computers today keep their scores for a fraction of a second, which is why they hold only a few hundred to a few thousand qubits and make mistakes. Page 3 shows that the same fragility, turned around, makes a qubit a superb sensor.
Next: A Qubit as a Sensor, where the fragile phase becomes the point. Let the world turn the arrow, and reading it tells you the field the qubit sits in.