Lesson A: What makes a computer quantum
Single particles of light, two routes, and chances that cancel
The interactive version checks every answer, gives hints and saves your progress in this browser. This page is the same lesson on one page, with the answers folded away.
1 / 7 · Learn
Before you start
Welcome. This lesson is about the idea at the heart of quantum computing, and it starts from a real experiment with single particles of light that you can run here. You need nothing beyond a little arithmetic.
Check yourself
A warm-up: make a guess before reading on. The lesson comes back to it.
Light comes in tiny particles called photons. In an experiment, photons are sent one at a time through a set of mirrors, and each photon has two different routes to a detector called B. With one route blocked, B clicks for about 1 photon in 4; the rest are stopped by the block or go elsewhere. What happens at B once both routes are open?
- AIt clicks for about 1 photon in 2: two routes, twice the chance
- BStill about 1 in 4: each photon can only take one route anyway
- CIt can’t be predicted: the photons behave randomly
- DIt never clicks
Show the answer
Answer: D. It never clicks
With both routes open, B never clicks. Each route on its own gives B a chance, but for quantum objects the contributions of the two routes can cancel, and at B they cancel exactly.
Why not the others
- A. That is what everyday chances predict: each route alone gives about 1 in 4, so two routes should give about 1 in 4 plus 1 in 4. Photons don’t follow that rule. With both routes open B never clicks, because the two routes cancel there.
- B. Opening the route changes much more than that: with both routes open, B never clicks, because the two routes cancel there. Even the everyday picture predicts a change, since the block no longer stops any photons.
- C. Single photons do behave randomly in many ways, but this outcome is certain: with both routes open, B never clicks, because the two routes cancel there.
2 / 7 · Explore
Two routes to one detector
Here is the experiment from the opening question. A source sends out photons one at a time. Each meets a splitter, a half-silvered mirror that lets half the light through and reflects the other half. Two mirrors bring the two routes back together at a second splitter, and two detectors, A and B, wait beyond it.
A photon is never split into pieces: each one makes exactly one click, at A or at B, unless a block stops it on the way.
Check yourself
With the upper route blocked, B counts about 25 of every 100 photons. What happens to B’s count when you open that route too? Try it in the experiment above.
- AIt stays at about 25 in 100
- BIt roughly doubles, to about 50 in 100
- CIt drops to 0: B stops clicking
Hints
- In the experiment above, choose Both open.
- Fire 100 photons and read the count on detector B.
Show the answer
Answer: C. It drops to 0: B stops clicking
With both routes open, B counts none of the photons: every one of them arrives at A.
Why not the others
- A. Opening the route does change B’s count. Even if each photon took just one route, the photons the block used to stop would now get through, and some would reach B. Choose Both open, fire 100 photons and watch B: it stays at 0.
- B. That is what adding the two routes’ chances predicts, 1 in 4 plus 1 in 4. Choose Both open, fire 100 photons and watch B: it stays at 0.
Check yourself
The photons go through one at a time, with nothing else in the experiment. What does that tell you about why B stays silent?
- AEach photon on its own is affected by both routes, even though it clicks in only one place.
- BNothing in particular: B just doesn’t work while both routes are open.
- CPhotons from the two routes run into each other and knock each other away from B.
- DEach photon splits in two at the first splitter, and the two halves cancel at B.
Hints
- Is there ever a second photon in the experiment for the first one to meet?
- Blocking one route changes what happens at B, for photons sent one at a time.
Show the answer
Answer: A. Each photon on its own is affected by both routes, even though it clicks in only one place.
With one photon at a time, there is nothing else for it to interact with, yet opening the second route changes where it can land. So each photon is affected by both routes.
Why not the others
- B. B works fine: block either route and it clicks again, for about 1 photon in 4. Its silence depends on both routes being open, so it says something about the routes.
- C. There is only ever one photon in the experiment at a time, so there is nothing for it to run into. Whatever keeps B silent happens to each photon by itself.
- D. The detectors never see half a photon: each photon makes one full click, at A or at B. Something about the photon involves both routes, but it is not two pieces of the photon. The next part says what.
3 / 7 · Learn
Chances that cancel
In everyday life, chances only add up. If something can happen in two separate ways, each with a chance of 1 in 4, then the chance it happens one way or the other is 1 in 4 plus 1 in 4: 1 in 2. A chance is never negative, so adding a second way can never lower the total.
Quantum physics keeps a different kind of account. Each way an event can happen has a number called an amplitude, and unlike a chance, an amplitude can be negative. The rule, tested in a great many experiments:
- Add the amplitudes of all the ways the event can happen.
- Multiply the total by itself. That is the chance.
Here is the rule at work on the experiment. Each route on its own gives B a chance of ¼, so its amplitude has size ½, since ½ × ½ = ¼. In this setup the lower route’s amplitude at B is +½ and the upper route’s is −½.
With the upper route blocked, only the lower route’s +½ is left. The total is ½, and the chance is ½ × ½ = ¼: the 1 in 4 you saw.
Check yourself
Now both routes are open, so B has two amplitudes: +½ from the lower route and −½ from the upper route. Using the rule, what is the chance that B clicks?
- A1
- B¼
- C½
- D0
Hints
- Step 1: add the two amplitudes, +½ and −½.
- Step 2: multiply the total by itself.
Show the answer
Answer: D. 0
Add the amplitudes: ½ − ½ = 0. Then 0 × 0 = 0, so B never clicks, as you saw. At A both amplitudes are +½, so the total is 1, the chance is 1 × 1 = 1, and every photon goes there.
Why not the others
- A. That would be right if both amplitudes were +½. At B the upper route’s is −½, so the total is ½ − ½ = 0, and 0 × 0 = 0.
- B. That is the chance with one route open. With both open there are two amplitudes to add: ½ − ½ = 0, and 0 × 0 = 0.
- C. That adds the chances, ¼ + ¼, the everyday way. The rule adds the amplitudes first: +½ and −½ make 0, and 0 × 0 = 0.
Amplitudes drawn as arrows laid end to end: a plus amplitude points right, a minus one points left. The total runs from the start to where the last arrow ends, and the chance is the total multiplied by itself, as in the top row’s ½ × ½ = ¼.
In general an amplitude is like an arrow that can point in any direction, not only left or right. The chance is then the length of the total arrow multiplied by itself. So two routes can cancel completely, add up completely, or anything in between, depending on how their arrows line up.
Check yourself
Now block the lower route instead, so only the upper route reaches B, with amplitude −½. What is the chance that B clicks?
- A0
- B¼
- C−¼
- D½
Hints
- Only one route is open. What is the total amplitude at B?
- The chance is the total multiplied by itself.
- A minus times a minus is a plus.
Show the answer
Answer: B. ¼
Only one amplitude is left, so the total is −½ and the chance is (−½) × (−½) = ¼. Blocking either route gives B the same ¼; the sign matters only when two amplitudes meet.
Why not the others
- A. A minus sign on its own doesn’t cancel anything: it needs another amplitude to cancel against. With one route open the total is just −½, and the chance is (−½) × (−½) = ¼.
- C. A chance is never negative. Multiply the total by itself: (−½) × (−½) = ¼, because a minus times a minus is a plus.
- D. That is the size of the amplitude, not the chance. The chance is the total multiplied by itself: (−½) × (−½) = ¼.
Where does the minus sign come from?
Light also behaves as a wave, and an amplitude keeps track of where in its rise and fall the wave is when it arrives. If one route were half a wavelength longer than the other, the peaks from one route would meet the troughs from the other. The splitters and mirrors shift the wave too. This setup is tuned so that the two routes arrive exactly out of step at B and exactly in step at A. Make one route slightly longer and B starts clicking some of the time: the arrows no longer point exactly opposite ways. Lessons 1 and 2 give amplitudes their full form.
4 / 7 · Explore
Watching the routes
What you have seen so far: with the upper route blocked, about half the photons are stopped by the block, and the ones that get through on the lower route split evenly between A and B. With both routes open, B never clicks.
Check yourself
A friend suggests: “Each photon really takes one route or the other. We just don’t know which.” If that were true, what would B do with both routes open?
- ANever click, just as you saw
- BClick for about 1 photon in 2
- CClick for about 1 photon in 4, as with one route blocked
Hints
- On the friend’s picture, a photon on the lower route doesn’t care whether the upper route is open. So it behaves as it did with the upper route blocked: where does it go?
- It goes to A or B evenly. A photon on the upper route does the same, by the same argument.
- No photon is stopped now, and each one, whichever route it took, goes to A or B evenly. What share reaches B?
Show the answer
Answer: B. Click for about 1 photon in 2
On the friend’s picture, every photon reaches the second splitter by one route and goes on to A or B evenly, so B would click for about half of them. B never clicks, so the picture is wrong: each photon is affected by both routes.
Why not the others
- A. If each photon took a single route, the other route couldn’t affect it. A photon on the lower route would behave just as it does when the upper route is blocked, and reach B half the time. Silence at B needs both routes to count for each photon.
- C. With a route blocked, half the photons are stopped. With both open none are, so on the friend’s picture every photon reaches the second splitter by one route, and half of them go on to B.
You can make the friend’s picture come true. Put a watcher on the upper route: an ideal detector that notes each photon going past and lets it carry on unharmed (physicists call it a which-path detector). Then every photon’s route is on record: the watcher either clicked or it didn’t.
Predict, then see
Both routes are open, and the watcher is on the upper route. What happens at B?
- AB still never clicks: both routes are open.
- BB clicks for about 1 photon in 2.
- CB clicks for about 1 photon in 4, as with a route blocked.
Show what happens
What happens: B. B clicks for about 1 photon in 2.
With the watcher on, each photon’s route is recorded, so the two routes are no longer two ways to one outcome. Each photon is on a known route, and the second splitter sends it to A or B evenly: B clicks for about half of them, and the watcher for about half too (the photons on the upper route). Switch the watcher off and B goes silent again. Cancellation needs the routes to be indistinguishable: nothing anywhere may hold a record of which one the photon took.
Why not the others
- A. Both routes are open, but they no longer act as two ways to the same outcome: the watcher’s record says which one each photon took. With the route known, nothing cancels.
- C. The watcher doesn’t stop any photons, unlike a block, so every photon reaches the second splitter. Each then goes to A or B evenly, so B gets about half.
Check yourself
Both routes are open and B is silent. Which change makes B start clicking, with both routes still open?
- AA label that marks each photon on the upper route, without stopping it, slowing it or turning it aside
- BMaking the source ten times brighter
- CNone of these: only blocking a route can make B click
- DSending the photons ten times further apart in time
Hints
- The watcher made B click without stopping a single photon. What did it do instead?
- It left a record of each photon’s route. Which of these changes also leaves a record of the route?
Show the answer
Answer: A. A label that marks each photon on the upper route, without stopping it, slowing it or turning it aside
The label makes each photon’s route knowable, and that alone removes the cancellation, so B clicks for about half the photons. Brighter light or wider spacing leaves the two routes indistinguishable.
Why not the others
- B. More photons means more clicks at A, but B stays silent: each photon still has two routes that nothing tells apart, and they still cancel at B.
- C. Blocking works, but it isn’t needed. A label that records the route is enough: once the route could be known, the two routes stop cancelling, even though no photon is stopped.
- D. The photons already go one at a time, and each one is affected by both routes by itself, so spacing them out further changes nothing at B.
5 / 7 · Learn
What a quantum computer does with this
A bit, the unit of an ordinary computer’s memory, is 0 or 1. A qubit is a quantum object that, when measured, gives one of two outcomes, also called 0 and 1. The photon in this lesson can serve as one: its two routes play the parts of 0 and 1, and some quantum computers built from light store qubits in just this way.
A qubit has an amplitude for 0 and an amplitude for 1. Measuring it gives 0 or 1, one plain bit, with chances set by those amplitudes, just as each photon gave one click. Between measurements, steps like the splitters make amplitudes meet, so they can cancel or add up.
With more qubits there is an amplitude for every combination of 0s and 1s: four for two qubits, eight for three, and the count doubles with each qubit added. Lesson B looks at how fast that grows.
Check yourself
Which statement about one qubit is right?
- AMeasured, it gives 0 or 1, like a bit. Before that it has an amplitude for each, and amplitudes can cancel or add up.
- BIt holds a number between 0 and 1, which a careful measurement can read.
- CIt is already 0 or 1, and measuring it just reveals which.
- DIt holds 0 and 1 at the same time, and measuring it shows you both.
Show the answer
Answer: A. Measured, it gives 0 or 1, like a bit. Before that it has an amplitude for each, and amplitudes can cancel or add up.
A qubit gives one bit when measured, 0 or 1. What makes it quantum is what happens before: its amplitudes can cancel or add up, which a bit that is secretly 0 or 1 can’t do.
Why not the others
- B. Amplitudes can take many values, but a measurement never reads them out: it gives just 0 or 1. Lesson 1 shows how little one qubit can reveal.
- C. That is the friend’s picture of the photon, secretly on one route. It predicts that B clicks about half the time, yet B stayed silent. A qubit’s amplitudes can cancel, which a hidden 0 or 1 can’t.
- D. A measurement of one qubit gives one result, 0 or 1, like the single click of each photon. Whatever its amplitudes were, one qubit never shows you both values.
Check yourself
A quantum computer’s qubits hold equal amplitudes for each of a million possible answers. You measure them. What do you get?
- AAll million answers at once
- BThe best of the million answers
- COne of the million answers, picked at random, each about equally likely
- DThe million amplitudes, as a list of numbers
Show the answer
Answer: C. One of the million answers, picked at random, each about equally likely
A measurement gives one outcome. With equal amplitudes, every one of the million answers is equally likely, so on its own this is a random guess.
Why not the others
- A. A measurement gives one outcome, as each photon gave one click. The million amplitudes stay hidden: you see only the answer that came up.
- B. Nothing in a measurement looks for the best answer. It picks one outcome at random, with chances set by the amplitudes, and here they are all equal.
- D. Amplitudes are never read out directly: a measurement returns 0s and 1s, and the amplitudes only set the chances. Even estimating them would take many runs.
So where does an advantage come from? From the experiment you just ran. A quantum algorithm is a sequence of steps, like the splitters, chosen so that the routes leading to wrong answers cancel, as at B, while the routes leading to the right answer add up, as at A. Then the one answer a measurement gives is very likely to be right.
Arranging that is hard, and it is only known to be possible for problems with special structure. That is why quantum computers are expected to be much faster for some problems, somewhat faster for others, and no help for most everyday tasks. Lesson C sorts out which is which.
6 / 7 · Mastery check
Mastery check
Check yourself
In the two-route experiment with both routes open, B never clicks. Now you block one of the routes. What happens at B?
- AB stays silent: blocking a route only takes away a way to reach it
- BB clicks for about 1 photon in 2
- CB starts clicking, for about 1 photon in 4
- DIt depends on which route you block
Show the answer
Answer: C. B starts clicking, for about 1 photon in 4
Blocking a route removes one of the two amplitudes that were cancelling at B. The one left has size ½, so B clicks with chance ½ × ½ = ¼, about 1 photon in 4.
Why not the others
- A. That is how everyday chances behave, where fewer ways can only mean a smaller chance. Amplitudes are different: with both routes open they cancel at B, and blocking one removes the amplitude that was cancelling the other. One amplitude of size ½ gives a chance of ½ × ½ = ¼.
- B. The block stops about half the photons, and those never reach any detector. Of the rest, half go to B, so B gets about 1 in 4. (1 in 2 is what B gets with both routes open and a watcher on one of them.)
- D. Either route alone gives B the same chance. The lower route’s amplitude at B is +½ and the upper route’s is −½, and both give ½ × ½ = ¼: a sign only matters when two amplitudes meet.
Check yourself
With both routes open, a watcher on one route makes B click for about half the photons. Why?
- AIts record shows which route each photon took, so the two routes no longer cancel
- BIt stops half the photons, as a block does
- CIt knocks the photons it detects toward B
Show the answer
Answer: A. Its record shows which route each photon took, so the two routes no longer cancel
Cancellation needs the two routes to be indistinguishable. A record of the route makes them distinguishable, so each photon behaves as if it took one route, and the second splitter sends it to A or B evenly.
Why not the others
- B. The watcher lets every photon through: A and B together still get all of them. It changes things by recording the route, not by stopping anything.
- C. Labelling the route without pushing the photon at all, for example by changing its polarization, has the same effect. What matters is that the route could be known.
Check yourself
At the end of a run, a quantum computer’s qubits have amplitudes spread over many possible answers. What does measuring them give you?
- AOne answer, picked at random, with chances set by the amplitudes
- BAn average of all the answers
- CEvery answer, each with its amplitude
- DThe answer with the largest amplitude, every time
Show the answer
Answer: A. One answer, picked at random, with chances set by the amplitudes
A measurement gives a single outcome, chosen at random; the amplitudes set the chances. That is why an algorithm has to make the right answer likely before it measures.
Why not the others
- B. A measurement never blends answers together. It gives one of them, as each photon makes one click at A or at B.
- C. A measurement gives one outcome, never the whole list. The amplitudes only decide how likely each answer is to come up.
- D. The answer with the largest amplitude is the most likely one, not a certain one. Any answer whose amplitude isn’t 0 can come up.
Check yourself
Which is the most accurate description of how a quantum algorithm gets an advantage?
- AIt speeds up any program, because qubits hold more than bits
- BIts steps make the amplitudes of wrong answers cancel and those of right answers add up, so a measurement is likely to give a right answer
- CIt tries every possible answer at the same time and reads off the right one
- DEach of its steps runs faster than a step on an ordinary chip
Show the answer
Answer: B. Its steps make the amplitudes of wrong answers cancel and those of right answers add up, so a measurement is likely to give a right answer
A quantum algorithm choreographs interference: wrong answers cancel, right ones add up, and only then does it measure. This works only for some problems.
Why not the others
- A. Making wrong answers cancel is only known to be possible for problems with special structure. For most everyday tasks a quantum computer is no help.
- C. Amplitudes can be spread over every answer, but a measurement then gives one answer at random, no better than a guess. The gain comes from making the wrong answers cancel before measuring.
- D. Speed of each step isn’t where the advantage comes from. Where there is a gain, it is in needing far fewer steps, thanks to interference.
7 / 7 · Recap
Recap
Key ideas
Photons sent one at a time can reach B by two routes. With either route alone, B clicks for about 1 photon in 4; with both open, it never clicks.
Each way an event can happen has an amplitude. Add the amplitudes, then multiply the total by itself to get the chance. Amplitudes can be negative, so they can cancel: that is interference.
If anything records which route a photon took, the routes stop cancelling.
A qubit, like a bit, gives 0 or 1 when measured. A measurement gives one answer, never a list of all of them.
Quantum algorithms arrange for wrong answers to cancel and right ones to add up, which is only known to work for some problems.
Go further
Free resources for when you want more than this lesson covers.
- What makes quantum computing so hard to explain?Scott Aaronson, Quanta Magazine · Article
Why “it tries every answer at once” misleads, and how a quantum algorithm makes the wrong answers cancel instead.
- Quantum computers, explained with quantum physicsQuanta Magazine · Video
Scott Aaronson, John Preskill and Dorit Aharonov on the physics a quantum computer runs on, a companion to the article above.
- Build a Mach–Zehnder interferometerQuVis, University of St Andrews · Interactive
Put the mirrors and the second splitter in place yourself, then send single photons through and see which detectors click.