Interference: how phase becomes odds
A measurement only sees the arrow's height. Turning a qubit about the z axis changes its phase but not its height, so on its own it doesn't change the odds at all. Yet phase is what quantum algorithms work with. The way they use it is interference: a gate mixes the two amplitudes so that they add up or cancel out, and the phase decides which.
The simplest example takes three gates: H, a turn by an angle φ about z, and H again. Change φ, and measuring 0 at the end goes from certain to impossible.
Step by step
Follow through the three gates.
- H takes to : equal amplitudes, with the arrow on the equator.
- A turn by φ about z changes only the relative phase. The arrow moves around the equator, and the odds stay 50/50, so measuring now would tell you nothing about φ. Up to a global phase, the state is
- H again mixes the amplitudes. The new amplitude of is the sum of the old two, and the new amplitude of is their difference, each divided by :
Adding up and canceling out
The second H gives each new amplitude two contributions, one from the old part and one from the old part. How they combine depends on the angle between them, which is the phase φ:
- φ = 0°: the two contributions point the same way. They add up for and cancel out for , so the qubit ends at : P(0) = 100%. This adding up is called constructive interference, and the canceling out destructive interference.
- φ = 180°: the other way round. They cancel for and add up for , so the qubit ends at .
- In between, they partly cancel:
With gates from the app's gate bar in the middle:
| In the middle | Turn about z, φ | P(0) | P(1) |
|---|---|---|---|
| nothing | 0° | 100% | 0% |
| 45° | 85.4% | 14.6% | |
| 90° | 50% | 50% | |
| 120° | 25% | 75% | |
| 180° | 0% | 100% |
The phase that no measurement could see after step 2 now sets the odds. The app's State panel shows it happening in circle notation: after the turn, the line in the circle points φ around, and after the second H, how full each circle is depends on that angle.
On the sphere
On the Bloch sphere the three gates add up to one turn. H swaps the x and z axes, so a turn about z between two Hadamards becomes the same turn about x (see Hadamard):
A turn by φ about x tilts down by φ, to height , and the rule from Measuring a qubit gives : the same answer as adding up amplitudes. The figure shows it for φ = 60°.
Try it
The second link starts four qubits on the equator, a different phase each, so one H shows the whole table at once. For another case of interference, see the square root of NOT.