Superposition
A combination of amplitudes is more than uncertainty about a hidden bit.
- Construct the plus and minus states using H and Z.
- Explain why an equal mixture differs from a coherent superposition.
A useful starting state
Section titled “A useful starting state”Apply H to :
Both Z outcomes have probability . The state is a coherent combination of amplitudes relative to this basis. Superposition is basis-dependent: is itself one basis vector in the X basis.
Why a coin is an incomplete analogy
Section titled “Why a coin is an incomplete analogy”A classical random bit can also produce equal 0/1 counts. Those counts alone do not distinguish it from . The difference appears when you apply another operation.
Applying H again maps to deterministically. An equal classical mixture of and stays 50/50 under H. The coherent state has a stable relative phase; the mixture does not.
Turn a phase into an outcome
Section titled “Turn a phase into an outcome”Insert Z between the two H gates. It changes into . The second H now gives . The intermediate Z-basis probabilities did not change, but the final outcome did.
Practise
Section titled “Practise”Compare phase settings 0°, 90° and 180°. Calculate or read the final probability of 1 for each. You should find 0, and 1. Explain the result using amplitudes rather than a claim that measurement reads both possibilities.
Superposition gives algorithms a state space to transform. It does not by itself reveal exponentially many answers, eliminate data-loading costs or guarantee a speedup.
Compare two preparation procedures
Section titled “Compare two preparation procedures”Procedure A prepares zero and applies H every time. Procedure B uses a classical random choice to prepare zero on half the trials and one on the others. Both procedures give equal Z frequencies. They do not prepare the same state. Procedure A has a stable phase relationship between its basis components; procedure B has classical uncertainty about which basis state was prepared.
This distinction is operational. Add H before the final readout. Procedure A returns zero with certainty in the ideal model. For procedure B, H maps either possible input into a state with equal Z probabilities, so the overall output remains half-and-half. The diagram compares these experiments. Calling both preparations “a fifty-fifty qubit” would conceal the information needed to predict the second stage.
Worked example: keep the cross term
Section titled “Worked example: keep the cross term”For a real state with amplitudes a and b, H gives a zero amplitude of their sum divided by the square root of two. Its probability is
When a and b are equal positive amplitudes of a plus state, the cross term supplies the extra one half that raises the zero probability from one half to one. For a minus state, the cross term is negative and the zero probability falls to zero. A classical mixture combines probabilities from its alternative preparations and does not include this coherent cross term between them.
For complex amplitudes, the corresponding cross term uses the real part of the conjugate product. This generalisation explains why a 90-degree relative phase gives no preference for zero after a final H, while a 180-degree phase swaps the constructive and destructive outputs. You can understand the effect first as vector addition in the complex plane, then use the formula to calculate it precisely.
Superposition depends on the basis
Section titled “Superposition depends on the basis”The plus state is a superposition of zero and one, but it is a single definite vector in the X basis. Conversely, zero is an equal superposition of plus and minus. A statement that a qubit “is in superposition” therefore needs a reference basis. The physical state has not changed when you rewrite its coordinates; the description has changed.
A gate and a coordinate rewrite are different actions. Re-expressing plus in the X basis does not physically apply H. Applying H transforms plus into zero in the original computational basis. The two calculations use closely related matrices, which can make the distinction easy to miss. In an experiment, identify whether a basis change is part of the apparatus or simply part of your mathematical account.
What a measurement removes
Section titled “What a measurement removes”If you measure the plus state in Z and forget the outcome, later trials behave like the classical mixture described above. If you keep the outcome, you know which basis state remains on each trial. In either case, applying H afterward does not reconstruct the original uninterrupted two-H experiment. Recovering a coherent state would require a new preparation or an appropriately modelled control process; a missing phase relationship cannot be restored by relabelling probabilities.
This observation matters for debugging. Looking at a simulated statevector is harmless because it is a classical data structure. Measuring an actual qubit halfway through a circuit changes the physical process. A simulator interface that exposes amplitudes is therefore a teaching aid with more access than a hardware operator has. Keep that difference visible when moving from exercises to programming real devices.
Use the interference circuit
Section titled “Use the interference circuit”The lab prepares zero, applies H, applies a selected phase and applies H again. At phase zero, predict the final zero outcome. At phase 180 degrees, predict the final one outcome. Enter each prediction before revealing the model. The phase setting describes the coherent intermediate state; the displayed amplitude table describes the final state after the complete circuit.
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 studioFor a third trial, choose phase 90 degrees. Work out the two final complex amplitudes and their squared magnitudes. Compare these with the equal-probability result from the classical mixture, while remembering that matching one histogram does not establish that the states match. You would need an appropriate additional setting to investigate other components of the state.
Practice: choose a distinguishing experiment
Section titled “Practice: choose a distinguishing experiment”A preparation is either the coherent plus state or an equal classical mixture of zero and one. You can request many fresh preparations. Explain why Z measurements alone are insufficient and propose a test using H. What conclusion can a finite number of observations support?
Check your reasoning
Both candidates give equal Z probabilities. H before readout makes the coherent plus preparation deterministic zero, while the mixture stays half-and-half. Observing a one rules out the ideal plus model for that trial, but a finite all-zero sample does not logically exclude the mixture: it has a small nonzero probability. State preparation and gate errors would require a more realistic statistical comparison.
Check your understanding
Section titled “Check your understanding”How does H readout distinguish plus from an equal zero/one mixture?
Answer: Plus returns zero; the mixture remains half-and-half. The coherent plus components interfere constructively at zero. The mixture averages two equal-probability outputs.
Reference: IBM Quantum — Quantum mechanics basics.
Ready for the next step?
Your progress stays in this browser.