2.6.1 Interference
One of the most important physical effects used in quantum computing is interference – the interaction between overlapping waves or oscillations. One way you can observe interference is by looking at water waves created by two boats that are passing each other by, or by simultaneously throwing two rocks in a still lake. When the waves amplify each other, we call the interference constructive, and when they cancel each other out, we call it destructive (see Fig. 2.7).
Interference also occurs in other contexts, for example with sound waves. A familiar example might be the destructive interference in noise-cancelling headphones. They operate by capturing the background noise and playing it back to you, but with an opposite direction of oscillation. When this recorded sound overlaps with the original noise, they cancel each other out: . If the headphones would not invert the direction of oscillation but instead play the sound back to you as it is, you would hear a much louder noise: . This would turn your headphones into a hearing aid!
An important way in which quantum computation differs from probabilistic computation is that it can make use of both types of interference – constructive and destructive – while probabilistic computation can use only constructive interference. To illustrate this mathematically, recall the probabilistic flip operation and the Hadamard operation from Eqs. 1.28 and 2.34:
Apart from the square roots, the two operations are almost identical. However, notice that has a plus sign while has a minus sign. This may seem like a small difference but it can have big consequences.
Let us consider the action of these two operations on the uniform distribution and its quantum analogue, the plus state . The probabilistic flip operation acts on the uniform distribution as follows:
where we used linearity, Eq. 2.38, and collected the probabilities at states and . Note how the probabilities at from both terms amplify each other, resulting in the final probability of . This is very intuitive: if you flip a uniformly random bit then it stays uniformly random.
However, consider now the action of the Hadamard operation on the plus state :
The calculation is almost identical but the outcome is very different – the amplitudes at completely cancel each other and we are left only with . Such destructive interference is impossible with probabilistic bits because probabilities are always positive – they can only amplify each other but can never cancel.
While probabilistic and quantum bits are quite similar, this example illustrates how they can behave differently thanks to destructive interference. Many of the quantum surprises that you will encounter in further weeks are in some way a consequence of this phenomenon. The ability to perform destructive interference is exactly what gives a quantum computer an advantage over classical computers – it allows the quantum computer to output just the right answer, while the wrong answers are cancelled out by destructive interference. As we will see in more detail in Section 5.2, this is often achieved by the Hadamard gate, which therefore plays a central role in many quantum algorithms.