Quantum phase and interference
The invisible difference that another gate can make visible.
- Distinguish global phase from relative phase.
- Derive the output of an H–phase–H circuit.
Global phase changes no prediction
Section titled “Global phase changes no prediction”Multiplying an entire state by does not change measurement probabilities. For any measurement vector ,
Relative phase is different. Multiplying just one component changes its relationship with the others.
Work the circuit through
Section titled “Work the circuit through”Prepare , apply H, then , then H again:
The final probabilities are
Before the second H, the Z probabilities are always 50/50. The final H recombines amplitudes and exposes the phase difference.
Three checks
Section titled “Three checks”- At 0°, the amplitudes for 1 cancel; the result is 0.
- At 180°, the amplitudes for 0 cancel; the result is 1.
- At 90°, the output probabilities are equal.
Challenge: explain why applying a global minus sign at the middle of the circuit cannot replace the Z gate. Z changes the relative sign; a global minus multiplies both amplitudes.
Follow amplitudes through the whole circuit
Section titled “Follow amplitudes through the whole circuit”The diagram shows two settings of the same interferometer. Before the final H, phase zero and phase pi both give equal Z probabilities. Their signs differ. The last H combines those signed contributions and routes probability to different outputs. A phase operation changes what a later operation can reveal even when an immediate histogram stays fixed.
Think of the two components as contributions to each possible final output. Contributions to the same outcome must be added as complex numbers before taking the squared magnitude. Contributions associated with distinguishable classical alternatives require a different probability calculation. Interference depends on retaining coherence between the alternatives; a recorded intermediate measurement changes that condition.
Worked example: a quarter-turn phase
Section titled “Worked example: a quarter-turn phase”After the first H, both amplitudes are one over the square root of two. A phase of 90 degrees multiplies the one component by i. The final H therefore produces
Each squared magnitude is one half. This is an intermediate case between complete reinforcement at phase zero and complete transfer at phase pi. The output is still a pure state, even though the Z probabilities are equal. Reading only those probabilities would hide the remaining relative phase between the final components.
For a phase of 60 degrees, the final zero probability is three quarters and the one probability is one quarter. You can calculate this from the cosine-squared and sine-squared half-angle expressions, or by inserting the real and imaginary parts of the phase factor. The two methods should agree. Checking both is useful when debugging a sign convention in an implementation.
Why global phase cancels in every basis
Section titled “Why global phase cancels in every basis”Suppose a common phase multiplies the entire input. Linearity carries that common factor through every later unitary operation. Every final amplitude acquires the same factor, whose magnitude is one, so every final probability stays the same. The argument applies to any measurement basis, not only Z. A change that is invisible immediately but becomes visible after H was therefore relative phase, not global phase.
This gives a practical way to compare statevectors. Two vectors that differ only by a common unit-magnitude factor describe the same pure physical state. Comparing their entries for exact equality can produce a false disagreement. You can compare their overlap magnitude or align one nonzero component’s phase before checking the remaining entries. Do not align each component separately: that would remove physical relative phases too.
A minus sign can change its role
Section titled “A minus sign can change its role”On the one basis state, Z produces a global minus sign. On plus, Z changes only one of two nonzero components and produces minus. The same matrix entry can therefore correspond to a global or relative phase depending on the input. Always inspect the whole state before assigning physical meaning to a sign.
The distinction becomes even more important with controlled operations. A phase common to a unitary acting on an isolated system may become conditional when the operation is controlled, making it a relative phase between control branches. You will meet that idea in phase kickback and phase estimation. Keeping track of conventions now avoids treating every printed minus sign as either always observable or always irrelevant.
Run a phase sweep with predictions
Section titled “Run a phase sweep with predictions”Use phases zero, 60, 90 and 180 degrees in that order. For each setting, calculate both probabilities, enter a prediction and reveal the model. Include a short explanation of which output becomes more likely. The table shows the final complex amplitudes; the circuit strip identifies the phase operation before the last H.
Superposition & interference
The circuit is H → P(φ) → H on |0⟩. Relative phase changes interference at the final H. The intermediate and final Z probabilities need not agree.
Prepare your experiment using the controls. Record a prediction, then reveal the statevector or run the experiment.
Changing the preparation or circuit starts a new prediction.
Take it further
Compare φ = 0°, 90° and 180°. Connect the complex amplitude table to the final distribution.
Initial setup · reference state
| Basis | Amplitude a + bi | Magnitude | Phase (rad) | Probability |
|---|---|---|---|---|
| |0⟩ | 1 + 0i | 1.000000 | 0.000000 | 100.0% |
| |1⟩ | 0 + 0i | 0.000000 | undefined | 0.0% |
Signs and complex phases are part of the state. Phase is undefined for a zero amplitude. A shared global phase changes no probabilities; relative phases can affect a later operation. Values are rounded to six decimal places.
Prediction to try: At the selected φ, predict the final state or probabilities. Explain which amplitudes will reinforce or cancel.
Challenge: Compare φ = 0°, 90° and 180°. Connect the complex amplitude table to the final distribution.
Open the live experiment studioAt phase 180 degrees, the zero component should vanish. Its displayed phase is undefined because a zero amplitude has no direction. Near that setting, small numerical values may be rounded to zero. Interpret the state through the theoretical calculation and stated precision rather than treating a rounding artefact as a small physical leakage process.
Practice: can a Z histogram detect every phase?
Section titled “Practice: can a Z histogram detect every phase?”You prepare plus and apply a phase gate, then measure immediately in Z. You obtain approximately equal counts for every phase setting. Has the gate failed? Design an extra operation that makes the phase influence the final distribution, and explain how finite shots affect your conclusion.
Check your reasoning
The observation is expected: a diagonal phase gate preserves the two Z probabilities. Add H before readout to obtain probabilities determined by the phase half-angle. Repeated settings can test the predicted fringe. Finite shots produce fluctuations around that curve; hardware errors may also reduce contrast. Neither a single equal histogram nor a single surprising count is sufficient to identify the cause.
Check your understanding
Section titled “Check your understanding”Use radians in algebra and degrees only when entering this lab’s controls. A quarter turn is 90 degrees or pi over two radians. Confusing those units changes the phase factor and the predicted interference fringe. Write the conversion once in your experiment record so another reader can reproduce the setting without guessing.
In H–P(90°)–H on zero, what are the output probabilities?
Answer: 50% zero and 50% one. The final amplitudes are (1+i)/2 and (1−i)/2; each squared magnitude is 1/2.
Reference: IBM Quantum — Quantum information.
Ready for the next step?
Your progress stays in this browser.