Level 3 · Algorithms
Quantum Walks: How a Quantum Particle Spreads Faster Than a Random Walker
About 4,863 words · roughly 22 minute read · sources checked December 3, 2026
A random walk is one of the most common ideas in science. A walker stands on a point, flips a coin, steps left or right, and repeats. Random walks describe diffusing smoke, wandering share prices in simple models, and the way search engines were once explained as a surfer clicking links. Many classical algorithms are built from random walks too.
A quantum walk replaces the coin flip and the step by quantum operations. The walker is a quantum system that can be in several places at once, and the paths interfere. The result is startling: instead of spreading out like a bell curve, the probability piles up at the edges and spreads much faster. After the same number of steps, a quantum walker is typically found much farther from the start than a classical one.
This lesson builds the discrete-time quantum walk on a line from scratch. We start with the classical walk and its square-root spreading, then add a quantum coin and a conditional step, follow four steps by hand, and then compute the walk for hundreds of steps on a simulator. We measure the spread, look at how the starting coin tilts the whole distribution, and compare with the continuous-time version. We end with the algorithmic uses, based on three papers whose abstracts I opened.
All numerical results here were computed by me with NumPy. The short program that produced the main results is printed in full in the lesson, and I ran exactly that listing. I did not open the full text of any of the papers, only their abstract pages, and I say what each abstract states and nothing more.
What you will learn
- How a classical random walk spreads, and why its spread grows like the square root of the number of steps.
- How the coin and shift operations of a quantum walk work, with a four-step example you can check by hand.
- Why the quantum walker spreads linearly in the number of steps, with computed numbers.
- Why the walk is not symmetric if you start the coin in a basis state, and how to restore the symmetry.
- What a continuous-time quantum walk is, and its computed spreading rate.
- Where quantum walks are used in algorithms, and what the abstracts I opened say about them.
Helpful first: Quantum Gates, Superposition.
The classical random walk, and why it spreads slowly
Picture a walker standing at position 0 on a line of integers. At each step a fair coin is flipped. Heads, the walker moves one step to the right, tails, one step to the left. After t steps, where is the walker? There is no single answer, because the outcome is random, but we can describe the probabilities exactly.
After t steps the walker has made some number k of right-steps and t − k left-steps, so its position is x = k − (t − k) = 2k − t. The probability of exactly k right-steps is the binomial formula C(t, k)/2ᵗ. For example, after 4 steps the possible positions are −4, −2, 0, 2 and 4, with probabilities 1/16, 4/16, 6/16, 4/16 and 1/16, which are 0.0625, 0.25, 0.375, 0.25 and 0.0625.
Two facts about this distribution matter for the rest of the lesson. First, it is a bell shape, centred on 0, with the highest probability at the starting point. Second, its width, measured by the standard deviation, is exactly √t. After 100 steps the typical distance from the start is about 10 steps; after 10,000 steps it is only about 100. To move a distance d away, a classical walker needs on the order of d² steps. This slow, diffusive spreading is the defining feature of classical random motion.
| Steps t | Classical standard deviation √t | Steps needed to typically reach distance d = 10, 100, 1000 |
|---|---|---|
| 4 | 2.0 | d = 10 needs about 100 steps |
| 100 | 10.0 | d = 100 needs about 10,000 steps |
| 10,000 | 100.0 | d = 1000 needs about 1,000,000 steps |
Classical spreading. The steps needed grow as the square of the distance.
The thing to beat
A classical walker covers distance d in about d² steps. When we say a quantum walk is faster, this is the benchmark. For the discrete walk on a line, we will measure the quantum walker’s distance as growing in proportion to the number of steps, not its square root.
The discrete quantum walk: a coin and a shift
To make the walk quantum we need to describe the walker with a quantum state. There are two parts. The position register says where the walker is, one basis state |x⟩ for each integer x. The coin register is a single qubit with basis states |0⟩ and |1⟩, which we will read as left and right. The full state is a superposition of terms |x⟩|c⟩, each with a complex amplitude.
One step of the walk has two operations.
- The coin operation. Apply a Hadamard gate to the coin qubit, at every position. This is the quantum version of flipping a coin: |0⟩ becomes (|0⟩ + |1⟩)/√2 and |1⟩ becomes (|0⟩ − |1⟩)/√2.
- The shift operation. Move the walker according to its coin: if the coin is |0⟩, move the position one step left; if the coin is |1⟩, move one step right. The coin state is not changed by the shift.
Both operations are unitary, so the whole step is unitary and probabilities stay normalised. The key difference from the classical walk is that nothing is measured between steps. The walker is in a superposition of many positions, and amplitudes from different paths can add or cancel. In the classical walk we add probabilities; in the quantum walk we add amplitudes, which can be negative or complex, and then square.
The starting state
We start at position 0 with a coin state we can choose. A convenient choice is (|0⟩ + i|1⟩)/√2, which treats left and right symmetrically. We will see later that a basis state like |0⟩ leads to a lopsided distribution.
A hand-checkable first step
Let us do the first step by hand. The coin state (|0⟩ + i|1⟩)/√2 goes through the Hadamard gate. The |0⟩ part becomes (|0⟩ + |1⟩)/√2, and the i|1⟩ part becomes i(|0⟩ − |1⟩)/√2. Adding them with the overall 1/√2:
coin after H = (1/2) · [ (1 + i)|0⟩ + (1 − i)|1⟩ ]
after the shift: amplitude (1 + i)/2 at position −1 (coin 0),
amplitude (1 − i)/2 at position +1 (coin 1)So after one step the walker is at −1 or +1 with probability 0.5 each, the same as a classical walker. Interference has not yet had a chance to act, because each position has been reached by only one path. The difference appears only after several steps, when different paths arrive at the same position and their amplitudes combine.
Four steps, computed
I computed the first four steps exactly with a simulator. The table below compares the probabilities with the classical walk.
| Step t | Position | Quantum probability | Classical probability |
|---|---|---|---|
| 1 | ±1 | 0.5 each | 0.5 each |
| 2 | 0 | 0.5 | 0.5 |
| 2 | ±2 | 0.25 each | 0.25 each |
| 3 | ±1 | 0.375 each | 0.375 each |
| 3 | ±3 | 0.125 each | 0.125 each |
| 4 | 0 | 0.125 | 0.375 |
| 4 | ±2 | 0.375 each | 0.25 each |
| 4 | ±4 | 0.0625 each | 0.0625 each |
Quantum and classical probabilities for the first four steps. They are identical for three steps and first differ at step 4, where the quantum walker is much less likely to be back at the origin.
This is a striking result. For the first three steps the quantum and classical walks give exactly the same probabilities. At step 4 they split: the classical walker is at the origin with probability 0.375, the quantum walker only 0.125, and the quantum walker is at positions ±2 with probability 0.375 each, against 0.25 for the classical one. Paths that lead back to the origin have been partly cancelled by interference, and paths that lead outward have been reinforced.
Where the interference comes from
The Hadamard gate has a minus sign in it: it sends |1⟩ to (|0⟩ − |1⟩)/√2. That sign is what lets amplitudes subtract. A coin that never produced negative amplitudes would behave like a classical coin.
A short program for the walk
Here is the full program I used to produce the numbers in this lesson. It stores the state as an array with one row per position and two columns for the coin, applies the coin operation to every position at once, and then shifts the amplitudes. I ran exactly this listing. For four steps it prints the same probabilities as the table above, and for 100 steps it prints the standard deviation 54.124 and a total probability of 1.0.
import numpy as np
def hadamard_walk(steps):
size = 2 * steps + 3
center = steps + 1
psi = np.zeros((size, 2), dtype=complex) # psi[position, coin]
psi[center] = [1 / np.sqrt(2), 1j / np.sqrt(2)] # symmetric starting coin
H = np.array([[1, 1], [1, -1]]) / np.sqrt(2)
for _ in range(steps):
psi = psi @ H.T # coin flip at every site
new = np.zeros_like(psi)
new[:-1, 0] = psi[1:, 0] # coin 0 moves left
new[1:, 1] = psi[:-1, 1] # coin 1 moves right
psi = new
prob = (np.abs(psi) ** 2).sum(axis=1)
return np.arange(size) - center, prob
x, p = hadamard_walk(4)
print({int(a): round(float(b), 4) for a, b in zip(x, p) if b > 1e-9})A few notes on the code. The array has room for steps on each side of the start, plus a margin, so the walker can never fall off the edge. The expression psi @ H.T multiplies each row, which is the two-component coin state at one position, by the Hadamard matrix. The shift moves coin-0 amplitude one place to the left in the array and coin-1 amplitude one place to the right. The probability at each position is the sum of the squared sizes of its two coin amplitudes.
This code is a simulation on an ordinary computer. It stores every amplitude, so it needs memory proportional to the number of positions, and it is practical only because the walk on a line has just 2t + 1 positions. A quantum computer would store positions in a register of about log₂ of the number of positions qubits, which is why quantum walks are interesting for walks on huge graphs.
How fast does the quantum walker spread?
Now the main measurement. For each number of steps t, I computed the standard deviation of the walker’s position with the program above and compared it with the classical value √t.
| Steps t | Quantum standard deviation | Classical standard deviation √t | Ratio quantum ÷ classical | Quantum deviation ÷ t |
|---|---|---|---|---|
| 4 | 2.236 | 2.0 | 1.12 | 0.559 |
| 10 | 5.473 | 3.162 | 1.73 | 0.547 |
| 25 | 13.552 | 5.0 | 2.71 | 0.542 |
| 50 | 27.071 | 7.071 | 3.83 | 0.541 |
| 100 | 54.124 | 10.0 | 5.41 | 0.541 |
| 200 | 108.242 | 14.142 | 7.65 | 0.541 |
| 500 | 270.599 | 22.361 | 12.10 | 0.541 |
Spreading of the symmetric Hadamard walk, computed by me. The last column settles at about 0.541, so the quantum spread is proportional to t, while the classical spread is proportional to √t.
The last column is the important one. If the quantum spread grew like √t, dividing by t would give numbers that shrink toward zero. Instead, it settles near 0.541 and stays there. The spread grows linearly in the number of steps. This is called ballistic spreading, as opposed to the diffusive spreading of the classical walk. After 500 steps, the quantum walker’s typical distance is about 271, while the classical one’s is about 22, twelve times smaller. The gap widens without limit as t grows.
The value 0.541 is specific to the Hadamard coin and this starting state. A different coin operation would give a different constant, and I did not explore other coins. What does not depend on these details, as far as the literature I opened indicates, is the qualitative difference: Kempe’s overview, whose abstract I opened, says quantum walks show striking differences from classical walks. I did not open the full text, so I do not repeat any of its specific formulas.
Steps needed to reach a distance
Turn the table around: how many steps does a walker need to get typically to distance d?
| Distance d | Classical steps, about d² | Quantum steps, about d ÷ 0.541 |
|---|---|---|
| 10 | 100 | 18.5 |
| 100 | 10,000 | 184.8 |
| 1,000 | 1,000,000 | 1,847.7 |
Steps to spread to distance d. The quantum count grows in proportion to d; the classical count grows as d². For d = 1000, that is a factor of more than 500.
A caution about the word speed-up
Spreading faster is a statement about a physical process. It becomes an algorithmic speed-up only when a task can be phrased so that fast spreading solves it. That is the content of the second half of the lesson.
The shape of the distribution
The classical distribution is a bell, tallest at the origin. The quantum distribution looks completely different. After 100 steps, only 7.03% of the probability lies within 10 steps of the origin, compared with 72.87% for the classical walker. At the other end, 62.2% of the quantum probability lies at distance 50 or more from the origin. For the classical walker, the probability of being that far out after 100 steps is 5.6 × 10⁻⁷, essentially zero.
| Region after 100 steps | Quantum walk | Classical walk |
|---|---|---|
| Within 10 of the origin | 0.0703 | 0.7287 |
| At distance 50 or more | 0.6223 | 0.0000006 (5.6 × 10⁻⁷) |
| At the origin exactly | 0.0063 | about 0.08 |
Where the probability sits after 100 steps. The classical walker clusters near the start; the quantum walker is mostly far away. The classical probability at the origin is the standard binomial value C(100,50)/2¹⁰⁰, which is about 0.0796.
The quantum distribution is not a smooth bell. It has two broad humps with rapid oscillations, and the highest values lie near the edges of the region the walker can reach. The fastest the walker can move is one step per time step, so after t steps it cannot be beyond distance t. The humps sit at about t/√2, a value that comes from the specific Hadamard coin. After 200 steps, my simulation puts the tallest bar at distance 138, close to 200/√2 = 141.4; the spacing of allowed positions is 2, so the exact peak cannot be predicted from the rough formula alone.
Another consequence: the walker is not slowly diffusing outward. Probability is racing to the edges. If you were using the walk to search for something far away, you would find it much sooner than with a classical walk.
The role of the starting coin
The Hadamard coin treats the two coin states differently, because the matrix has a +1 and a −1 in different places. That makes the distribution depend on how you start the coin. I computed three cases after 100 steps.
| Starting coin | Mean position | Standard deviation | P(position < 0) | P(position > 0) |
|---|---|---|---|---|
| (|0⟩ + i|1⟩)/√2, symmetric | 0.0 | 54.124 | 0.4968 | 0.4968 |
| |0⟩ (left) | −28.976 | 45.715 | 0.7468 | 0.2468 |
| |1⟩ (right) | +28.976 | 45.715 | 0.2468 | 0.7468 |
Dependence on the starting coin, from my simulation. The probability that the walker is exactly at position 0 is 0.0063 in all three cases; the probabilities in the last two columns do not add to 1 because of that.
Starting with the coin in |0⟩ makes the walker drift to the left, with 74.7% of the probability on the left side and 24.7% on the right. Starting with |1⟩ mirrors this. Only the symmetric starting coin, with a relative factor of i between the two components, gives an even left-right distribution. This is a surprising feature: the classical coin has no such dependence, because a fair coin forgets its past. In the quantum walk the coin carries phase information from step to step.
Practical tip
If your simulated walk looks lopsided, check the starting coin. A starting state of (|0⟩ + i|1⟩)/√2 gives a symmetric result for the Hadamard coin. Without the i, you get a skew even with an equal superposition of left and right.
The continuous-time quantum walk
There is a second, simpler kind of quantum walk that uses no coin. Instead of steps, the walker’s state evolves smoothly in time under a Hamiltonian built from the graph. For a walk on a line, take the Hamiltonian that moves amplitude between neighbouring positions with a hopping strength of 1. The state after time t is e^(−iHt) applied to the starting position.
For this line the probability of finding the walker at position x at time t has a known closed form. It is the square of a Bessel function of the first kind, J_x(2t)². I checked this two ways: by evaluating the formula, and by computing the matrix exponential of the Hamiltonian directly on an 81-site line at time t = 5. The two agree to about 10⁻¹⁶. The total probability adds to 1, and the standard deviation of the position is exactly √2 times t:
| Time t | Total probability | Standard deviation of position | Deviation ÷ t |
|---|---|---|---|
| 5 | 1.0 | 7.071 | 1.4142 |
| 10 | 1.0 | 14.142 | 1.4142 |
| 20 | 1.0 | 28.284 | 1.4142 |
| 50 | 1.0 | 70.711 | 1.4142 |
Continuous-time walk on a line, computed from the Bessel-function formula. The spread is linear in time with constant √2 ≈ 1.4142.
So again, the spreading is linear in time, not square-root. The two kinds of walk, discrete-time with a coin and continuous-time without one, are different models but share this ballistic behaviour. They are used in different algorithms.
Walks on a cycle: how fast do they mix?
So far the walker had an infinite line to run along. A different question is what happens on a closed loop, a cycle with N sites, where the walker eventually wraps around. For a classical walk, the interesting question is mixing: how many steps until the probability is spread almost evenly over all N sites, forgetting where it started? Mixing matters in algorithms because many classical methods, from sampling to optimisation, work by running a random walk until it has mixed.
I compared the two walks on cycles of 15, 31 and 63 sites. I chose odd cycles so that the classical walk, which would otherwise alternate between even and odd sites, settles to a steady distribution. I measured how far each distribution is from perfectly even using the total variation distance, which is half the sum of the absolute differences between the probabilities and 1/N. It is 0 for a perfectly even distribution and close to 1 for a distribution concentrated on a few sites.
The quantum walk is unitary, so it never settles. Its probability distribution keeps changing, and the total variation distance for a single time step stays around 0.3 to 0.4 forever. What does converge is the time average: take the average of the distributions over all steps so far. That averaged distribution gets close to even much sooner than the classical walk does.
| Cycle size N | Classical steps until distance < 0.1 | Quantum steps (time-averaged) until distance < 0.1 | Classical ÷ quantum |
|---|---|---|---|
| 15 | 84 | 13 | 6.5 |
| 31 | 360 | 28 | 12.9 |
| 63 | 1,489 | 59 | 25.2 |
Mixing on odd cycles, computed by me. The classical count grows roughly as N², and the quantum time-averaged count grows roughly in proportion to N. The ratio roughly doubles whenever N doubles.
The pattern is the same quadratic-to-linear change we saw for spreading on the line. Doubling the cycle from 31 to 63 sites multiplies the classical number by about 4.1 (360 to 1,489) and the quantum number by about 2.1 (28 to 59).
| N | Step count | Quantum distance at that single step | Quantum distance, time-averaged | Classical distance |
|---|---|---|---|---|
| 15 | 225 | 0.2729 | 0.006 | 0.0044 |
| 15 | 2,000 | 0.3274 | 0.0003 | 0.0 |
| 31 | 961 | 0.3636 | 0.0033 | 0.0045 |
| 31 | 2,000 | 0.3919 | 0.001 | 0.0 |
| 63 | 2,000 | 0.3468 | 0.0036 | 0.0529 |
Single-step versus time-averaged distances for the quantum walk. The instantaneous distribution never becomes even (distance 0.27 to 0.39), but the average does.
Why the average matters, and why it is a caveat
The quantum walk does not mix in the classical sense, because a measurement at a given time still shows a lumpy distribution. The fast convergence is for a time-averaged distribution, which you would get by choosing the number of steps at random. This is a genuine, commonly studied notion, but you must not claim that the quantum walk reaches an even distribution at a specific time.
I stopped at N = 63 and did not test larger cycles, other coins or other graphs, so I do not claim that the factor-of-N pattern holds beyond these three sizes. The numbers for 15, 31 and 63 are consistent with it, and that is as far as my data goes.
Why interference makes the walker go faster
It is worth stepping back to ask where the speed comes from. A classical walker that takes a step left cancels, on average, a step right: the successive steps are independent and random, so the displacement behaves like a sum of random signs, whose size grows only as the square root of the number of terms.
In the quantum walk the coin carries information from one step to the next. The coin state after the Hadamard is correlated with the previous coin state, because the Hadamard is a fixed matrix, not a fresh random flip. The shift then moves each coin component in a definite direction. The result is that the amplitude at an outward position gets contributions from many paths that line up in phase, while the amplitude near the origin gets contributions that largely cancel. At step 4, the origin’s probability fell from the classical 0.375 to 0.125. As the number of steps grows, this reinforcement of outward-moving components becomes extreme.
The location of the humps gives a hint of the mechanism. My simulations show the humps near t/√2 ≈ 0.707 t, and the standard deviation near 0.541 t. These numbers suggest that the walker has a maximum effective speed of about 0.707 sites per step, less than the speed of light of the model, which is 1 site per step. Textbook analyses of the Hadamard walk derive these constants by writing the walk in terms of momentum states; I did not reproduce that analysis here, so I present the numbers as observations from my simulation.
In the same spirit, you can think of the quantum walk as a wave spreading out rather than a particle diffusing. Waves travel at a steady speed; diffusing particles slow down as they spread. The difference between the two is the difference between the linear and the square-root laws.
Where quantum walks are used in algorithms
A quantum walk is not an algorithm by itself. It is a tool that algorithm designers use, much as the Fourier transform is a tool. The three papers whose abstracts I opened each show a different side of this.
An overview of the field
Kempe’s “Quantum random walks - an introductory overview”, submitted in March 2003, is a survey. Its abstract says it begins with a physical effect to motivate the core ideas, defines quantum random walks, reviews their properties and the striking differences from classical walks, covers both physical phenomena and computer-science applications, and surveys recent developments and open questions. If you want to go deeper than this lesson, it is the natural next reading.
An exponential speed-up for a black-box problem
Childs, Cleve, Deotto, Farhi, Gutmann and Spielman, in “Exponential algorithmic speedup by quantum walk”, first posted in September 2002, constructed a black-box problem where a quantum computer is exponentially faster than a classical one. According to the abstract, their quantum algorithm uses a continuous-time quantum walk instead of the quantum Fourier transform techniques used in earlier quantum algorithms, they show how to implement the walk efficiently in the oracular setting, and they prove that no classical algorithm can solve the problem with high probability in subexponential time. I did not open the full text, so I cannot describe the graph they use beyond what the abstract states. The result matters because it shows an exponential speed-up from a different mechanism than the one in Shor’s and Simon’s algorithms.
A polynomial speed-up for a practical question
Ambainis, in “Quantum walk algorithm for element distinctness”, submitted in November 2003, studies the question of finding two equal items among N. The abstract says the algorithm uses O(N^(2/3)) queries, improving on an earlier O(N^(3/4)) algorithm by Buhrman and coauthors, that this matches a lower bound established by Shi and is therefore optimal, and that the approach generalises to finding k equal items among N with O(N^(k/(k+1))) queries. For comparison, a classical algorithm needs on the order of N queries to find a collision in the worst case; that classical figure is a standard fact that I did not source in this session.
| Paper (abstract opened) | Type of walk | Result stated in the abstract |
|---|---|---|
| Childs et al., 2002 | Continuous-time quantum walk | A black-box problem solved exponentially faster than any classical algorithm can in subexponential time |
| Ambainis, 2003 | Quantum walk on a search graph | Element distinctness with O(N^(2/3)) queries, which matches a known lower bound |
| Kempe, 2003 | Survey of discrete and continuous walks | Overview of properties, differences from classical walks, applications and open questions |
What each opened abstract states. I did not read the full papers.
These results show a pattern. Quantum walks give a way of speeding up searches and graph-exploration tasks, sometimes by a polynomial factor (element distinctness) and, for specially built black-box problems, by an exponential factor (the 2002 result). Both are statements about the number of queries. As always with oracle results, they do not automatically translate into a speed-up for a real-world task without an oracle.
Connection to Grover’s algorithm
Grover’s search can itself be described as a kind of quantum walk, and walk-based search algorithms generalise it to searching on graphs. I mention this as a commonly stated connection and did not verify it against a source here.
Limits and honest caveats
- Everything above is for a one-dimensional line. Walks on other graphs, such as grids and hypercubes, behave differently, and I did not simulate them.
- The 0.541 constant belongs to the Hadamard coin and one starting state. Other coins give other constants.
- A fast spread does not make a walk a good search by itself. Algorithms use walks together with specially designed reflections or marked vertices.
- Query results are not running-time results. The claims in the papers I opened are about queries to an oracle or about proven bounds, and implementing a walk on a real graph needs an efficient way to describe that graph.
- On noisy hardware, quantum walks lose their ballistic spreading when decoherence destroys the interference. I did not simulate noise here and make no quantitative claim about it.
Common mistakes when coding a quantum walk
- Forgetting that the coin is applied at every position. In the program above, psi @ H.T does this for all rows at once.
- Applying the shift before the coin, or using a different order. The walk is a sequence: coin, shift, coin, shift. Reordering changes the starting condition but not the qualitative behaviour.
- Using a starting coin of |0⟩ and expecting symmetry. As the table showed, 74.7% of the probability ends up on the left.
- Letting the array be too small, so that amplitude falls off the edge. A line with t steps needs at least 2t + 1 sites.
- Measuring after every step. Measuring in between turns the quantum walk back into a classical-looking random walk, because the superposition is destroyed.
Frequently asked questions
Is a quantum walk the same as a quantum particle moving in space?
The continuous-time walk is exactly the evolution of a quantum particle hopping on a lattice, as we saw in the Bessel-function section. The discrete-time walk with a coin is a separate model that has a similar spreading but is built from gates.
Why does the Hadamard walk have a minus sign problem at the origin?
It does not have a problem; the reduced probability at the origin is a consequence of destructive interference between paths that return. At step 4, the origin probability falls from the classical 0.375 to 0.125.
Does a quantum walk always beat a classical one?
For spreading on a line, yes, in the sense of the numbers above. For algorithmic tasks, it depends on the problem. Ambainis’s abstract gives a proven match to a lower bound for element distinctness, so the quantum walk is optimal in that setting; for other tasks I have no verified claim.
Can I run a quantum walk on a quantum computer?
Yes, in principle: a position register of about log₂ of the number of positions qubits plus one coin qubit, with Hadamard gates for the coin and incrementer circuits for the shift. I did not build or run such a circuit in this session.
What is the difference between the quantum walk and Grover’s algorithm in cost?
They solve different problems. Grover’s algorithm searches an unstructured list with about √N queries. Walk-based algorithms use the structure of a graph, and the best known cost depends on the graph and the task.
Practice questions
Check yourself
After 4 steps, what is the probability that the symmetric Hadamard walker is back at the origin, and what is it for the classical walker?
Quantum: 0.125. Classical: 6/16 = 0.375.
The quantum standard deviation after 100 steps is 54.124. By what factor does it exceed the classical √100?
54.124 ÷ 10 = 5.41.
Why does starting the coin in |0⟩ make the walk lopsided?
The Hadamard matrix treats |0⟩ and |1⟩ asymmetrically (a minus sign appears for |1⟩), so interference pushes more probability left when the coin starts in |0⟩. In my simulation, 74.7% ends on the left after 100 steps.
For the continuous-time walk on a line, what is the standard deviation at t = 20?
√2 × 20 = 28.284.
Roughly how many steps does a classical walker need to reach distance 1,000, and a quantum Hadamard walker?
Classical: about 1,000,000. Quantum: about 1,000 ÷ 0.541 ≈ 1,848.
What does the abstract of the element distinctness paper say about the number of queries?
O(N^(2/3)) queries, which matches a lower bound and so is optimal.
Summary
- A classical random walk spreads like √t; reaching distance d takes about d² steps.
- A discrete quantum walk alternates a Hadamard coin and a conditional shift, and interference changes the distribution.
- The first three steps match the classical probabilities exactly, and at step 4 the origin probability drops from 0.375 to 0.125.
- The Hadamard walk spreads linearly, with standard deviation about 0.541 t; after 500 steps it is about 12 times wider than the classical walk.
- The distribution depends on the starting coin; a symmetric start needs the factor i.
- The continuous-time walk on a line spreads with standard deviation √2 t.
- Quantum walks power algorithms with proven query advantages: an exponential one for a specially built black-box problem, and an optimal O(N^(2/3)) for element distinctness, per the abstracts I opened.
References and further reading
I opened the arXiv abstract pages of three papers: Kempe’s introductory overview of quantum random walks, Childs and colleagues on an exponential speed-up by quantum walk, and Ambainis on a quantum-walk algorithm for element distinctness. I did not open their full texts. Every number in the tables was computed by me with NumPy, using the program printed in the lesson, which I ran. The statement that spreading is linear with a constant near 0.54 is my own numerical finding for one specific coin and starting state.
- Quantum random walks - an introductory overview (arXiv (J. Kempe, 2003)) Opened the abstract page. Survey of quantum random walks, their differences from classical walks, applications and open questions.
- Exponential algorithmic speedup by quantum walk (arXiv (Childs, Cleve, Deotto, Farhi, Gutmann, Spielman, 2002)) Opened the abstract page. Black-box problem with an exponential quantum speed-up using a continuous-time quantum walk.
- Quantum walk algorithm for element distinctness (arXiv (A. Ambainis, 2003)) Opened the abstract page. O(N^(2/3)) queries, matching a lower bound; generalises to k equal items.
Key terms in the dictionary