← Quantum Store · Guides · Lessons · Glossary · About · Türkçe
Beginner course · Lesson 5 / 6 · 10 min
Interference: the hidden power of quantum computers
Amplitudes reinforce or cancel each other like waves. See how two H gates wipe out randomness and learn the secret of quantum algorithms.
When waves add up
Throw two stones into a still lake and the waves reinforce each other in some places (crest meets crest) and cancel in others (crest meets trough). This is called interference.
Quantum amplitudes behave the same way. Probabilities are always positive and can only add up. Amplitudes can be positive or negative, so they can cancel each other.
Two H gates: the randomness disappears
One H gate put the qubit into a coin-flip state. What happens with two H gates in a row? Intuition says “two coin flips, still random”. Look at the “Girişim: geri dönüş” example (interference: going back): the result is 0 every time.
Here is why: after the second H the result 1 is reached by two different paths. One path has amplitude +0.5, the other −0.5; they add up to 0 and 1 vanishes completely. The two paths to 0 have amplitudes +0.5 and +0.5, which add up to 1. This never happens with a classical coin.
The invisible phase
The Z gate flips the sign of the amplitude of state 1. On its own it does not change the measurement probabilities at all, so it seems “invisible”. But put a Z between two H gates and the interference reverses: the result is 1 every time.
The sign (more generally the angle) of an amplitude is called its phase. Phase cannot be measured directly, but through interference it can completely determine the result.
The secret of quantum algorithms
It is a common misconception that a quantum computer “tries all answers at once” and picks the best. Measurement gives only one result. A good quantum algorithm sets up the circuit so that the amplitudes of wrong answers cancel each other and those of the right answer reinforce each other.
Superposition opens up possibilities, entanglement links qubits, and interference brings the right answer forward. In the next lesson you will run a real algorithm that combines all three.
Try it yourself
In the “Girişim: geri dönüş” example see that the result is always 0, and open the amplitude table. Then switch to “Görünmeyen faz” (the invisible phase): because of the Z in the middle the result is always 1. Click the Z to remove it and the result is 0 again.
Open the circuit in your browserThe circuit playground is in Turkish. Button guide: “1000 kez ölç” = measure 1000 times, “Durum vektörünü göster” = show the state vector, “Bu devrenin Qiskit kodu” = this circuit’s Qiskit code, “Geri al” = undo, “Temizle” = clear. Click a gate in the circuit to remove it.
Key points
- Amplitudes can be positive or negative, so they can reinforce or cancel each other.
- Two H gates in a row bring a qubit back to 0 with certainty, thanks to interference.
- Phase is invisible on its own but can completely change the result through interference.
- Quantum algorithms use interference to cancel wrong answers and reinforce the right one.
Test yourself
How do quantum algorithms bring the right answer forward?
- They try every answer one by one and pick the best
- They use interference to cancel the amplitudes of wrong answers and reinforce the right one
- The measurement itself picks the right answer
Show the answer
They use interference to cancel the amplitudes of wrong answers and reinforce the right one. A measurement gives only one result. The algorithm’s job is to raise the probability of the right answer with interference before measuring.
← Entanglement: linked qubits · Your first algorithm: Grover search →