Quantum Walk Lab
Flip a quantum coin, take a step, and watch interference reshape the walk. Compare the Hadamard walk with a classical random walk, see why it spreads in proportion to the number of steps, find out why it never settles on a ring, and run a continuous-time walk with no coin at all. Every amplitude is tracked exactly in your browser.
Reviewed December 2026. New to this? Open the Quantum against classical tab and slide the steps from 5 to 150.
Each step flips the coin, then moves the walker one site left or right depending on the coin. The bars show the chance of finding the walker at each site after t steps. Hover a bar for its value.
Numbers
Total chance: 1.000000
Average position: -0.00
Spread (standard deviation): 32.48, which is 0.541 × t.
Classical walk spread: 7.75 (√t).
Largest bars at -40 and 40.
Chance of being 15 or more sites from the start: quantum 83.1%, classical 5.2%.
What to look for
The walk is symmetric and the bars pile up near the two edges, close to 0.7 × t, just inside the 0.71 × t limit, with a dip in the middle. A classical walk would give a single bell curve of width √t. The quantum spread grows in proportion to t, not √t.
A five-minute path
- Walk on a line: set the steps to 3 and the start to |L⟩. The chance at −1 is 62.5 percent, not the classical 37.5.
- Switch to the balanced start and raise the steps to 100. The distribution is symmetric, flat in the middle and sharp at the edges.
- Change the coin to Identity, then Swap, then the 30-degree rotation, and see how the coin controls the spread.
- Quantum against classical tab: slide the steps and watch the ratio of the two spreads grow.
- Walk on a cycle: use 11 sites. The classical bars flatten and the quantum bars keep changing.
- Continuous-time walk: raise t and compare the two variances with 2t² and 2t.
What the lab does and does not do
- It simulates the full quantum state with perfect gates. There is no noise, and noise would push the walk back toward the classical one.
- It shows walks on a line and a ring. The algorithms that use quantum walks run on more complex graphs, which the lab does not simulate.
- The plotted distribution is the distribution of final position measurements, not the path of a single walker.
- The classical comparison is an exact fair-coin walk, with no approximation.
Reference tables
Computed by the same code as the lab.
| Coin | Row 1 | Row 2 | Effect |
|---|---|---|---|
| Hadamard | 0.7071, 0.7071 | 0.7071, -0.7071 | Mixes the two directions evenly, with a sign |
| Swap (Pauli X) | 0, 1.0000 | 1.0000, 0 | Swaps directions each step: the walker bounces |
| Identity (no mixing) | 1.0000, 0 | 0, 1.0000 | No mixing: the walker runs in a straight line |
| Biased rotation (30 degrees) | 0.8660, 0.5000 | -0.5000, 0.8660 | Partial mixing: keeps its direction more often, edges farther out |
| t | x = -4 | x = -3 | x = -2 | x = -1 | x = 0 | x = 1 | x = 2 | x = 3 | x = 4 |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0.5000 | 0 | 0.5000 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0.2500 | 0 | 0.5000 | 0 | 0.2500 | 0 | 0 |
| 3 | 0 | 0.1250 | 0 | 0.6250 | 0 | 0.1250 | 0 | 0.1250 | 0 |
| 4 | 0.0625 | 0 | 0.6250 | 0 | 0.1250 | 0 | 0.1250 | 0 | 0.0625 |
| Steps t | Quantum | Quantum / t | Classical (√t) | Ratio |
|---|---|---|---|---|
| 10 | 5.47 | 0.5473 | 3.16 | 1.73 |
| 25 | 13.55 | 0.5421 | 5.00 | 2.71 |
| 50 | 27.07 | 0.5414 | 7.07 | 3.83 |
| 100 | 54.12 | 0.5412 | 10.00 | 5.41 |
| 200 | 108.24 | 0.5412 | 14.14 | 7.65 |
| 400 | 216.48 | 0.5412 | 20.00 | 10.82 |
| Distance d | Quantum | Classical |
|---|---|---|
| 10 | 94.28% | 36.8202% |
| 20 | 87.49% | 5.6888% |
| 30 | 80.24% | 0.3518% |
| 50 | 62.23% | 0.0001% |
| Steps t | Quantum at step t | Classical at step t | Quantum, averaged over steps 0 to t |
|---|---|---|---|
| 5 | 0.5739 | 0.5739 | 0.3580 |
| 10 | 0.3436 | 0.4361 | 0.1124 |
| 25 | 0.2455 | 0.2259 | 0.0499 |
| 50 | 0.2531 | 0.0808 | 0.0215 |
| 100 | 0.3471 | 0.0102 | 0.0193 |
| 200 | 0.4861 | 0.0002 | 0.0069 |
| Time t | Quantum | 2t² | Classical | 2t |
|---|---|---|---|---|
| 2 | 8.00 | 8 | 4.00 | 4 |
| 5 | 50.00 | 50 | 10.00 | 10 |
| 10 | 200.00 | 200 | 20.00 | 20 |
| 20 | 800.00 | 800 | 40.00 | 40 |
Eight guides
What is a quantum walk?
9 min read
A quantum walk is the quantum version of a random walk: instead of one walker taking random steps, amplitudes move over many paths at once and interfere. The result spreads very differently.
The Hadamard walk, step by step
10 min read
Work through the first three steps of the Hadamard walk by hand, see where each amplitude goes, and learn why the distribution leans to one side when the coin starts pointing left.
Why quantum walks spread faster than random walks
9 min read
The spread of a quantum walk grows in proportion to the number of steps, against the square root for a classical walk. See the numbers, the shape and the cause.
Choosing the coin and the starting state
8 min read
The coin and the starting coin state shape the whole distribution. This guide compares four coins and three starts, and explains why a symmetric result needs a careful choice.
Quantum walks on cycles: mixing and what never settles
9 min read
A classical walk on a ring settles to the uniform distribution. A quantum walk never does, but its time average gets very close. See the numbers and the reason.
Continuous-time quantum walks
9 min read
No coin, no steps. A continuous-time walk lets amplitude flow along the edges of a graph under a Hamiltonian. Its spread is ballistic, with a variance of 2t² against 2t for the classical version.
What quantum walks are good for
9 min read
Spreading faster on a line is a picture, not an algorithm. The real uses are searching a graph, exploring special graphs exponentially faster than any classical method, and universal computation.
Simulate a quantum walk in code
8 min read
A short NumPy program that reproduces the lab’s numbers for the Hadamard walk, what its output should be, and the mistakes that give a lopsided or non-normalised walk.
Predict, then check
Hadamard walk from |L⟩. What is the chance at site −1 after 3 steps?
62.5 percent. A classical walk would give 37.5 percent. The chance at +1 is only 12.5 percent.
Why are steps 1 and 2 identical to a classical walk?
Each site is reached by only one route, so no two amplitudes can add or cancel.
Hadamard walk, balanced start, 100 steps. How wide is it compared with a classical walk?
Standard deviation 54.1 against 10.0 classically, a ratio of 5.4.
Same walk, but starting from |L⟩. Where is the average position?
About -29.0. Starting from |R⟩ gives the mirror image, +29.0.
On an 11-site ring after 200 steps, which walk is closer to uniform?
The classical one: distance 0.0002 against 0.4861 for the quantum walk. The quantum walk does not settle, though its time average does get close.
Continuous-time walk at t = 10 on a large ring. What are the two variances?
Quantum 200 (2t² = 200), classical 20 (2t = 20).
Related on QuantumAtlas
Frequently asked questions
What is a quantum walk?
The quantum version of a random walk. A walker carries a quantum coin, a coin operation and a shift move amplitude to the left and right, and amplitudes that reach the same site add before the chance is read off. The paths interfere.
How is it different from a random walk?
A classical walk spreads like the square root of the number of steps. A Hadamard quantum walk spreads in proportion to the number of steps, with a standard deviation of about 0.54 times the step count and a flat distribution with sharp edges instead of a bell curve.
Is a quantum walk random?
The evolution is exact and deterministic. Randomness comes only from the final measurement of the position.
Why is the quantum walk lopsided with some starts?
The Hadamard matrix is not symmetric between left and right. Starting the coin in |L⟩ or |R⟩ tilts the distribution. The balanced start (|L⟩ + i|R⟩)/√2 gives a symmetric result.
Does a quantum walk settle down on a ring?
No. A unitary evolution on a finite ring keeps oscillating, so the distribution at a given step never converges. The distribution averaged over time gets close to uniform on an odd ring.
What is a continuous-time quantum walk?
A walk with no coin, driven by a Hamiltonian built from the graph, such as its adjacency matrix. On a line the variance grows like 2t² for the quantum walk and 2t for the classical one.
What are quantum walks used for?
Searching graphs, an exponential oracle speedup on glued trees, element distinctness and, in the continuous-time form, universal quantum computation. The line-spreading picture is an illustration, not an algorithm.
Is the simulation exact?
Yes. The lab tracks every amplitude with no approximation, up to 150 steps on a line and 31 sites on a ring. Totals stay at 1.
Can I run a quantum walk on a quantum computer?
Yes in principle, using a position register, a coin qubit and increment circuits. Only small walks have been shown in experiments. The guide on code gives a NumPy reference to check against.
Where is the connection to Grover’s algorithm?
Walk-based search on suitable graphs reaches the same square-root speed as Grover’s algorithm, and on the complete graph the two coincide.
Sources and further reading
- Y. Aharonov, L. Davidovich and N. Zagury, “Quantum random walks” (1993). The earliest paper usually cited for the idea of a walk whose steps are controlled by a quantum coin.
- E. Farhi and S. Gutmann, “Quantum computation and decision trees” (1998). Introduced the continuous-time quantum walk as a tool for algorithms.
- J. Kempe, “Quantum random walks: an introductory overview” (2003). A widely read survey of discrete-time walks, including the line, the cycle and the hitting-time results.
- N. Konno, work on limit distributions of the Hadamard walk (about 2002). Derived the limiting shape of the distribution and the linear spread. This page quotes the limits from memory and checks them numerically.
- A. Childs et al., “Exponential algorithmic speedup by quantum walk” (2003). A walk on a pair of glued trees that is exponentially faster than any classical algorithm in an oracle setting.
- N. Shenvi, J. Kempe and K. B. Whaley, “A quantum random walk search algorithm” (2003). A walk-based search on the hypercube that reaches Grover’s square-root speed.
- A. Childs, “Universal computation by quantum walk” (2009). Shows that a continuous-time walk on a suitable graph can perform any quantum computation.
References were written from memory of the original works. Check the originals for exact citations.