H Then H Interference
Applying H again shows constructive and destructive interference in a finite qubit state.
Calculate the baseline
Start in zero and apply H twice. At the final zero output, the two path contributions add; at the one output they cancel.
Apply gate H twice to (1, 0). What is the final zero probability?
- H² = I — Each of these ideal gates is its own inverse.
- First output = (0.7071067812, 0.7071067812) — Apply the first matrix to the signed amplitudes.
- Second output = (1, 0) — Apply the same matrix again.
- P0 = 1 1 — Square the restored zero amplitude.
- ✓ — Independent check: The identity must preserve the original complementary probability.
Enable JavaScript to control the model and practise.
Compare a second case
Start in one. The signs now select the opposite final basis state. H followed by H restores both inputs.
Apply gate H twice to (0, 1). What is the final zero probability?
- H² = I — Each of these ideal gates is its own inverse.
- First output = (0.7071067812, -0.7071067812) — Apply the first matrix to the signed amplitudes.
- Second output = (0, 1) — Apply the same matrix again.
- P0 = 0 1 — Square the restored zero amplitude.
- ✓ — Independent check: The identity must preserve the original complementary probability.
Enable JavaScript to control the model and practise.
Test the boundary and practise
A non-basis input returns to its initial amplitudes too. Inspect both intermediate and final states before squaring.
Apply gate H twice to (0.6, 0.8). What is the final zero probability?
- H² = I — Each of these ideal gates is its own inverse.
- First output = (0.9899494937, -0.1414213562) — Apply the first matrix to the signed amplitudes.
- Second output = (0.6, 0.8) — Apply the same matrix again.
- P0 = 0.36 1 — Square the restored zero amplitude.
- ✓ — Independent check: The identity must preserve the original complementary probability.
Enable JavaScript to control the model and practise.
Recap
- Add path amplitudes before probabilities.
- H² is the identity on every input.
- Interference includes destructive cancellation.