Watch a hidden phase change become visible
Can a real change in the quantum state be invisible in the measurement probabilities?
You will chain three gates on one qubit: H, then Z, then H again. The middle gate (Z) changes something called the relative phase, which is a property of the quantum state that does not show up directly when you measure. The final H gate converts that hidden change into a result you can see.
After the first H, the qubit is in an equal superposition, and measuring would give 50/50. The Z gate then flips the sign of the |1⟩ branch. If you measured right now, you would still see 50/50 because sign does not affect probability directly. But the second H recombines the two branches, and the flipped sign causes destructive interference on the |0⟩ branch and constructive interference on the |1⟩ branch. The qubit ends up deterministically in |1⟩. A change that was invisible has become completely visible.
H puts the qubit into superposition: (|0⟩+|1⟩)/√2. The Bloch sphere arrow moves to the equator, and the histogram shows equal weight on 0 and 1. This is the starting point for the interference experiment.
Z flips the sign of the |1⟩ component, changing the state from (|0⟩+|1⟩)/√2 to (|0⟩−|1⟩)/√2. Look at the histogram: it has not changed. Both outcomes still show 50% probability. But the Bloch sphere arrow has rotated to point along −X. The state has genuinely changed even though probabilities look the same.
The second H converts the hidden phase difference into a visible outcome. The (|0⟩−|1⟩)/√2 state maps to |1⟩ with certainty. The Bloch sphere arrow moves to the south pole. The histogram now shows 100% weight on |1⟩ and 0% on |0⟩. The invisible change has become completely visible through interference.
It is tempting to think that if the measurement probabilities do not change, nothing happened. The Z gate is a real physical operation that changes the quantum state. Phase is invisible in one measurement basis but becomes visible when a later gate (the second H) converts it into probability differences.
The qubit ends in |1⟩ with certainty. Every shot returns 1. This confirms that the Z gate's phase flip, although invisible after step 2, was converted into a deterministic outcome by the final Hadamard.
This experiment demonstrates the core idea of the Interference and Visible Phase lesson. That lesson explains how quantum amplitudes add (constructive interference) or cancel (destructive interference) depending on their relative phase. What you see here -- a hidden change becoming visible -- is the mechanism behind every quantum algorithm.
Read the full lesson →After H then Z, the measurement probabilities are still 50/50. Does this mean Z did nothing?