Level 2, Tinkerer

Interference

Once both Hadamards have acted, each route contributes an amplitude of 0.50. The two contributions to a reading of 0 add to 1, and the two contributions to a reading of 1 cancel.

Interference is what happens when two routes toward the same reading contribute amplitudes that meet. Matching signs reinforce that reading, and opposite signs can cancel it, which is why a second Hadamard puts the |+⟩ state back to the state certain to read 0.

The slogan about trying every answer at once has nowhere to write a minus sign. Malcolm considers that a full review of the slogan, and he has stopped delivering the review at a shout.

An example

Start with a qubit certain to read 0 and press H twice. The first H gives two amplitudes of about 0.71, one for 0 and one for 1. Each 0.71 is one over the square root of 2, so 0.71 × 0.71 is a half.

The second H sends each amplitude down two routes, one toward 0 and one toward 1, and multiplies by 0.71 on the way. The route from 1 to 1 also picks up a minus sign. That sign is part of the H rule.

Add up what arrives at 0. That is 0.5 + 0.5 = 1. Add up what arrives at 1. That is 0.5 − 0.5 = 0. The qubit reads 0 every time.

Now put a Z between the two H gates. Z flips the sign of the amplitude for 1, so it starts the second H as −0.71. The routes to 0 now give 0.5 − 0.5 = 0, and the routes to 1 give 0.5 + 0.5 = 1. One hidden minus turned a certain 0 into a certain 1.

What it is not

Interference is not the machine checking every answer and picking the best. It is arithmetic on amplitudes. A good circuit is built so that the routes to wrong answers mostly cancel and the routes to the right one add.

It also cannot happen with plain chances. Chances are never negative, so adding them can only pile up. Two fair coin tosses in a row still give 0 half the time. Each route above has a chance of 0.25, and adding chances gives 0.5 for each reading. Only signed amplitudes can reach 1 and 0.

Each number on a route is an amplitude, and its sign is the phase. The routes come from the Hadamard gate, and the hidden minus comes from the Z gate. Grover’s search does the same adding and cancelling on a larger list. The note The sign is what cancels works through these sums, and the puzzle asks you to reach a certain 1 with no X key.

Used in

All the words