Quantum Random Walk

Classical vs quantum: same walk, wildly different spread - interference changes everything

Loading interactive simulation...

from random walks to quantum search 🖖

The quantum walk's quadratic speedup comes from interference, not probability. At each step the Hadamard puts the coin into superposition, so the shift operator moves amplitude left and right simultaneously. Over many steps, amplitude near the center cancels—left-moving and right-moving contributions arrive with opposite phases—while amplitude near ±N/√2 reinforces constructively. This is why the distribution peaks at the edges rather than the middle. The same mechanism drives Grover's search (a walk on a hypercube) and Childs's exponential-speedup graph traversal: quantum walks reach distant nodes far faster than any diffusive process can.

diffusion versus a ballistic sprint 🖖

A random walk is just repeated coin flips: heads step right, tails step left. Done classically, the steps blur into a bell curve — after 100 flips you rarely land more than about 10 sites from the start, because the spread grows like √N. Swap in a quantum coin and the walker stops averaging out and instead streaks outward, reaching toward ~70 sites after those same 100 steps. Physicists call this ballistic spreading: it grows linearly with N instead of as its square root.

a quantum walk never forgets 🖖

A classical random walk is a Markov process: it steadily loses track of where it began, and from the final cloud alone you can't reconstruct the starting point. The quantum walk is unitary, so every step is perfectly reversible. Run the exact Hadamard-and-shift sequence backwards and all that scattered amplitude reconverges into a single spike at the origin — no information is lost, and the walk has no equilibrium distribution to relax into. Diffusion erases history; a quantum walk merely hides it.

Problem solved in full

  1. Spreads for 2 walkers over 10 steps 9 steps

    10 steps, 2 walkers. One tosses a fair coin each step and moves ±1. The other starts in coin state |0⟩ and has the Hadamard gate applied to its coin before every move. Work out both spreads exactly, then say how many steps the classical walker needs to cover the same ground.

    1. Classical steps are independent, and each one contributes a variance of exactly 1, so the variances add. That single line is the whole classical answer — and it is why the panel above prints a square root rather than a simulation.

    2. The quantum walker never picks a branch. Carry 2 amplitudes at every site, one per coin value; the Hadamard replaces them with their sum and their difference, and then the |0⟩ half moves left while the |1⟩ half moves right. A site can receive from both neighbours, so amplitudes add — and a difference can come out 0.

    3. Start at the origin with (1, 0) and run 2 steps. Pull the factor 1/√2 out of each step and the amplitudes stay whole numbers, so after step n the pairs below are all divided by 2n/2.

    4. Step 3 is where the symmetry dies. The site at the origin holds (1, 1): it sends 1 + 1 = 2 leftward and 1 − 1 = 0 rightward. The minus sign in the Hadamard's bottom row has erased that site's entire rightward contribution, and x = −1 now carries 5 times the probability of x = +1.

    5. Keep cranking to step 10. Amplitudes are still whole numbers over 25, so every probability is a whole number over 1024 — the 11 numerators below are exact, and they sum to 1024.

    6. Read the largest numerator straight off the list. It is 449, and it sits at x = −6, well away from both the origin and the far edge.

    7. The mean is not 0. |0⟩ is the half of the coin that moves left, and step 3 already showed it taking the larger share, so the whole distribution leans that way.

    8. Variance is the mean square minus the square of the mean, and both sums come from the same 11 numerators — no new information is needed.

    9. Divide by the classical spread from step 1.

    Answer

    σq = 4.8924 against σc = 3.1623 — a ratio of 1.5471 — with the quantum peak at pq(−6) = 0.4385. Now read that variance as a step count. A classical walker's spread is √M, so matching 4.8924 takes M = σq2 = 23.9, call it 24 steps: 2.4 times the work for the same reach after 10. The classical step count is the square of the spread ratio, and that is the part worth keeping — a 2× advantage in spread is a 4× advantage in steps.

References (2)

Example problems

  • 10 steps - 10 steps — asymmetric double peaks already visible
  • 30 steps - 30 steps — quantum spread dramatically wider than classical
  • 50 steps - 50 steps — O(N) quantum spread vs O(√N) classical
  • Balanced coin - 20 steps, balanced coin — symmetric double-peaked distribution