Quantum Computing · Chapter 03
Probability Amplitudes and Interference
How can two steps that each look random combine into a certain result?
Mithilesh Kumar
→ or Space to advance · N for notes · F for fullscreen
3.1
States and Transitions
One notation for what we know about a register and how a step changes it, applied to deterministic, nondeterministic, and probabilistic rules.
States
A one-bit register has two configurations, 0 and 1 (a \(k\)-bit register has \(2^k\)). Inspecting it, we always find exactly one.
A state records what we know before inspecting: a weight \(v_j\) for each configuration \(j\), written as a sum of kets
| What we know | \(v_0\) | \(v_1\) | State |
|---|---|---|---|
| The bit is 0 | 1 | 0 | \(\ket0\) |
| Either value is possible | 1 | 1 | \(\ket0+\ket1\) |
| A fair coin set the bit | \(1/2\) | \(1/2\) | \(\tfrac12\ket0+\tfrac12\ket1\) |
The form is the same; the meaning of the weights differs (possibility, or probability). Terms for the same configuration add: \(\tfrac14\ket0+\tfrac14\ket0=\tfrac12\ket0\). A state with weight 1 on one configuration is definite.
Transitions
A transition rule says which configurations may follow each configuration. Its state diagram has a circle per configuration and a weighted arrow \(i\to j\) for each allowed step.
For a step \(S\), the weight of the arrow from \(i\) to \(j\) is written
Absent arrows have weight 0. For NOT, written \(X\): \(\bra1X\ket0=\bra0X\ket1=1\) and \(\bra0X\ket0=\bra1X\ket1=0\).
A time-expanded diagram copies the configurations once per time step; a run of \(t\) steps is a path from time 0 to time \(t\). From 0, NOT gives the run \(0,1,0\).
Deterministic transitions
| Configuration | Next under NOT | Next under RESET |
|---|---|---|
| 0 | 1 | 0 |
| 1 | 0 | 0 |
From 0: NOT gives \(0,1,0\); RESET gives \(0,0,0\).
In both rules exactly one arrow leaves each configuration, so the start fixes the whole run: the rule is deterministic, and a definite state stays definite.
Tracing backward counts incoming arrows. Under NOT each configuration has one incoming arrow, so the previous configuration is known. Under RESET two arrows enter 0 and none enters 1, so the starting bit is lost.
Definition
A deterministic rule is reversible if every configuration also has exactly one incoming arrow.
Nondeterministic transitions
A nondeterministic rule may allow several successors. KEEP-OR-FLIP allows all four arrows on one bit, so from 0 two steps give four paths:
A path is possible if every step is allowed; a configuration is reachable if some possible path ends there. Both 0 and 1 are reachable at time 2.
Nondeterministic acceptance is existential: accept if some run reaches an accepting configuration.
Nondeterminism is about possibility, not chance: more paths to an endpoint do not make it more likely. Frequencies need probabilities on the arrows.
Probabilistic transitions
Now the weight of \(i\to j\) is the conditional probability of \(j\) given \(i\):
The current configuration contains everything needed to predict the next step (the Markov property).
COIN replaces the bit by a fair coin flip: every arrow has weight \(1/2\). Two steps from 0: each path has probability \(\tfrac12\cdot\tfrac12=\tfrac14\), and two exclusive paths end at each configuration, so
3.2
Sum and Product Rules
All three models compute multi-step results the same way: multiply weights along a path, add the paths that meet.
The product rule along a path
A path \(i\to j\to k\) uses the arrow \(i\to j\) of step \(S\) and then the arrow \(j\to k\) of step \(T\). Its weight is the product
written right to left in the order the steps act.
- Deterministic and nondeterministic rules (weights 0 or 1): the product is 1 exactly when every step on the path is allowed.
- Probabilistic rules: the product is the probability of that history. The factors are conditional probabilities, combined by the Markov property, not independent events.
For COIN every two-step path has weight \(1/4\), and a \(t\)-step path has weight \(2^{-t}\).
The sum rule across paths
The total weight from \(i\) to \(k\) adds the weights of all paths, which differ only in the intermediate configuration \(j\):
Here \(TS\) is the two-step operation, \(S\) first (on the right).
- Deterministic: the sum is 1 at the unique endpoint, 0 elsewhere.
- Nondeterministic: the sum counts possible paths; positive means reachable.
- Probabilistic: \(P_2(k\mid i)=\sum_jP(k\mid j)P(j\mid i)\), the probability of reaching \(k\).
The classical barrier
Every weight is nonnegative, so opening another path to \(k\) can only increase its total weight. No path can cancel another.
States and steps
A step updates a general state \(\sum_iv_i\ket i\) by the same rules: start at \(i\) with weight \(v_i\), follow the arrow to \(j\), and add over \(i\):
In ket form, \(\sum_iv_i\ket i\mapsto\sum_iv_iS\ket i\), collecting terms on each \(\ket j\). For example \(\mathrm{COIN}\ket0=\tfrac12\ket0+\tfrac12\ket1\), and any distribution \((v_0,v_1)\) becomes \((\tfrac12,\tfrac12)\): one coin flip erases the initial state.
A reversible deterministic rule permutes configurations, e.g. CNOT swaps \(\ket{10}\) and \(\ket{11}\). RESET and COIN map different states to the same state, so nothing acting on the result can undo them.
A probabilistic rule can be undone by another probabilistic rule only if it is already a reversible deterministic rule: nonnegative weights cannot re-concentrate a spread-out distribution.
3.3
Signed Weights
Keep the sum and product rules, but allow negative weights: contributions can now cancel.
Negative weights
Keep the diagrams, paths, and both rules, but allow a weight to be negative. Path weights are still products, so signs multiply:
A path with an odd number of negative arrows contributes negatively; an even number, positively. An initial weight \(v_i\) contributes its sign too: the path \(i\to j\to k\) contributes \(\bra kS\ket j\bra jS\ket i\,v_i\).
A negative contribution is not a negative probability or a negative count of paths. It is a signed contribution to the sum at the endpoint, deciding whether the path reinforces or opposes the others arriving there.
For now this is a mathematical extension of the bookkeeping; Section 3.4 connects weights to observed probabilities.
Cancellation across paths
Two paths from \(i\) to \(k\), with weights \(a,c\) along the first and \(b,d\) along the second, give
With \(a=b=c=\tfrac12\) and \(d=-\tfrac12\): \(\tfrac14-\tfrac14=0\). Both paths are present and nonzero, yet the endpoint receives nothing: cancellation.
- Partial: \(\tfrac14-\tfrac18=\tfrac18\). Reinforcing: \(\tfrac14+\tfrac14=\tfrac12\).
- Opening a path can now lower an endpoint’s weight; blocking one can raise it.
- Only contributions at the same endpoint combine: \(\tfrac14\ket0-\tfrac14\ket1\) keeps both terms.
Constructing the Hadamard step
Look for a one-bit step that spreads a definite input over both configurations but undoes itself. Give three arrows weight \(c\) and the arrow \(1\to1\) weight \(-c\).
Two steps from 0:
- to 0: paths \(0\to0\to0\) and \(0\to1\to0\) give \(c^2+c^2=2c^2\);
- to 1: paths \(0\to0\to1\) and \(0\to1\to1\) give \(c^2-c^2=0\).
Returning weight 1 to 0 requires \(2c^2=1\), so \(c=1/\sqrt2\). This is the Hadamard step:
Properties of the Hadamard step
- From 1, the paths to 0 give \(\tfrac12-\tfrac12=0\) and the paths to 1 give \(\tfrac12+\tfrac12=1\). So \(\bra kHH\ket i=1\) if \(k=i\) and 0 otherwise: \(HH=I\).
- In general \(H(v_0\ket0+v_1\ket1)=\frac{v_0+v_1}{\sqrt2}\ket0+\frac{v_0-v_1}{\sqrt2}\ket1\), and a second \(H\) returns \(v_0\ket0+v_1\ket1\).
- Unlike COIN, the state after one step keeps the distinction between inputs in the sign of \(\ket1\). Replace \(-1/\sqrt2\) by \(+1/\sqrt2\), and both inputs map to the same state: cancellation and reversibility are lost.
The weights cannot be probabilities: they can be negative and need not add to 1. But from either input the squared weights do add to one:
This suggests reading probabilities from squared weights while the signed weights govern composition. It motivates the quantum probability rule; it does not derive it.
3.4
Complex Amplitudes and Interference
A square root of NOT forces complex weights; we then state the probability rule, the conditions that preserve it, and the role of phase and path records.
A square root of NOT
Is there a step \(\sqrt X\) with \(\sqrt X\sqrt X=X\)? Neither \(I\) nor \(X\) works, since both square to \(I\).
Try a symmetric step with stay-weight \(a\) and switch-weight \(b\). Two steps return to the start with weight \(a^2+b^2\) and reach the other configuration with weight \(ab+ba\). We need
With real \(a,b\), squares are nonnegative, so \(a=b=0\), contradicting \(2ab=1\). We need numbers whose squares can point in opposite directions.
In the complex plane, \(u+iv\) is the arrow \((u,v)\); multiplying by \(i\) turns an arrow by a quarter turn, so \(i^2=-1\).
Complex amplitudes and the Born rule
Choose
Then \(a^2=\tfrac i2\), \(b^2=-\tfrac i2\), so \(a^2+b^2=0\), and \(2ab=\tfrac{(1+i)(1-i)}{2}=1\). Two steps give NOT exactly. Complex weights are called amplitudes; they obey the same sum and product rules.
Ordinary squares of amplitudes can be imaginary. The conjugate \(z^*=u-iv\) gives a nonnegative number:
Born rule
A configuration with amplitude \(v_j\) is observed with probability \(p(j)=|v_j|^2\).
Probabilities sum to one exactly when the state is normalized:
For \(\sqrt X\): \(|a|^2=|b|^2=\tfrac14+\tfrac14=\tfrac12\), so one step from a definite bit gives probabilities \(\tfrac12,\tfrac12\).
Phase
Write a nonzero amplitude as an arrow of length \(r=|z|\) at angle \(\phi\) from the positive real axis. With Euler’s formula \(e^{i\phi}=\cos\phi+i\sin\phi\),
- \(\phi\) is the phase of the amplitude; multiplying amplitudes along a path adds their phases (angle-addition formulas).
- Probability keeps the magnitude and discards the phase.
- Positive and negative real weights are the phases \(0\) and \(\pi\); complex amplitudes supply every angle between.
Two states with identical probabilities can therefore differ in phase, and that difference can change the probabilities after a later step.
Conservation of probability
Along one path, magnitudes multiply: \(|z_1z_2|^2=|z_1|^2|z_2|^2\). Where paths meet, add amplitudes first, then square: \(|A+B|^2=|A|^2+|B|^2+AB^*+A^*B\).
For any step \(S\), updating \(v'_j=\sum_i\bra jS\ket i\,v_i\) and summing \(|v'_j|^2\) over all outputs \(j\) requires two conditions to keep total probability equal to 1:
Interpreting \((\bra jS\ket i)^*\bra jS\ket k\) as a forward arrow \(k\to j\) followed by a reversed, conjugated arrow \(j\to i\) shows that return paths \(i\to j\to i\) add to 1 and cross paths \(k\to j\to i\) cancel to 0—so conservation of probability automatically makes \(S\) reversible. For \(\sqrt X\): \(a^*b+b^*a=-\tfrac i2+\tfrac i2=0\).
Interference and phase
For an endpoint \(k\): \(p(k)=\bigl|\sum_{\text{paths to }k}\text{amplitude}\bigr|^2\). Two Hadamard steps from 0: paths to 0 give \(\tfrac12+\tfrac12\), paths to 1 give \(\tfrac12-\tfrac12\). Squaring first would give \(\tfrac12\) at each. This is interference.
A common factor \(e^{i\theta}\) on every amplitude (global phase) changes no probability, now or later. A relative phase between amplitudes does. For
\(\phi=0\): \(p(0)=1\); \(\phi=\pi\): 0; \(\phi=\pi/2\): \(\tfrac12\). The phase flip \(Z\) (\(\ket1\mapsto-\ket1\)) adds \(\pi\): \(H,Z,H\) sends 0 to 1 with certainty.
Path information destroys interference
Add a record bit, initially 0. Configurations are now pairs: first bit, then record. Apply \(H\) to the first bit, then CNOT (first bit controls the record):
The contributions \(+\tfrac12\) and \(-\tfrac12\) that used to cancel now end at different configurations, 10 and 11, so they cannot cancel. Probability that the first bit is 1: \(\tfrac14+\tfrac14=\tfrac12\).
Rule
Any part of the system that distinguishes the paths belongs to the configuration. Ignoring the record does not merge 10 and 11.
Restoring interference by uncomputation
Apply a second CNOT before the final \(H\). Since CNOT is its own inverse, \(\ket{00}\mapsto\ket{00}\) and \(\ket{11}\mapsto\ket{10}\): the record returns to 0 on both branches, with amplitudes unchanged.
Now the final \(H\) again has two routes to each endpoint:
- to \(\ket{10}\): \(+\tfrac12-\tfrac12=0\);
- to \(\ket{00}\): \(\tfrac12+\tfrac12=1\).
The run returns to \(\ket{00}\) with certainty. This is why uncomputation (Section 2.4.3) is essential: records must be undone by reversing the gates that made them, not ignored.
Summary
- States assign a weight to each configuration; a step assigns weights \(\bra jS\ket i\) to arrows; multi-step weights follow the product rule along paths and the sum rule across paths.
- With nonnegative weights paths can only add. Signed weights allow cancellation, which yields the self-inverse Hadamard step.
- A square root of NOT needs complex amplitudes; probabilities are \(|v_j|^2\), and a valid step satisfies normalization and the cross-sum condition.
- Relative phase steers interference; any record that distinguishes paths destroys it unless it is uncomputed.