Loading...
Loading...
Quantum analog of random walks for search and simulation
Quantum walks are the quantum mechanical analogues of classical random walks, where a walker evolves according to unitary dynamics rather than stochastic transitions. They exhibit fundamentally different behavior from their classical counterparts, including ballistic propagation rather than diffusive spreading, and they can provide polynomial and even exponential speedups for certain search and sampling problems. Quantum walks underpin some of the most powerful quantum algorithms for element distinctness, spatial search, and simulation of quantum physical systems.
In a classical random walk on a graph, a walker occupies a vertex and at each time step moves to a neighboring vertex according to a probability distribution. Over many steps, the probability distribution of the walker's position spreads diffusively, with the standard deviation growing as the square root of the number of steps. This behavior underlies classical algorithms for Monte Carlo integration, Markov chain Monte Carlo sampling, and randomized search.
A quantum walk replaces the classical probability distribution over vertices with a quantum superposition of position states, and the stochastic transition matrix is replaced by a unitary evolution operator. Because quantum evolution is reversible and coherent, the amplitudes of different paths can interfere constructively or destructively. This interference leads to striking departures from classical behavior: on a line, the quantum walk propagates ballistically with standard deviation growing linearly in time, and on certain graphs, the hitting time — the expected time to reach a target — can be exponentially shorter.
Classical transition
Quantum evolution
Position probability
The discrete-time quantum walk model, introduced by Aharonov, Davidovich, and Zagury, operates on a composite Hilbert space consisting of a coin space and a position space. The coin is a small auxiliary register (typically one qubit for a walk on a line) that determines the direction of the next step. The evolution operator is decomposed into a coin operator C, which rotates the coin state, and a shift operator S, which moves the walker conditionally based on the coin state. The full step is U = S · (C ⊗ I).
Common choices for the coin operator include the Hadamard coin, which creates an equal superposition of moving left and right, and the Grover coin, which is used for higher-dimensional walks. The shift operator translates the position register: for a walk on a line, S|0⟩|x⟩ = |0⟩|x+1⟩ and S|1⟩|x⟩ = |1⟩|x-1⟩. After many steps, the position distribution develops characteristic interference peaks that are entirely absent in classical walks. On cyclic graphs or higher-dimensional lattices, the coin can be generalized to a d-dimensional register controlling movement along d axes.
Step operator
Shift on line
Hadamard coin
Quantum walks provide a powerful framework for developing search algorithms on graphs. In the spatial search problem, a marked vertex is to be found on a graph where the walker can only move along edges. Classical random walks solve this in O(N) steps on average for many graphs, but quantum walks can achieve O(sqrt(N)) steps on certain highly symmetric graphs like the hypercube, matching the performance of Grover's algorithm. This connection is not coincidental: Grover's algorithm can be viewed as a quantum walk on the complete graph.
Beyond search, continuous-time quantum walks — where the walker evolves under a Hamiltonian given by the graph adjacency matrix or Laplacian — have been applied to simulate quantum physical systems, analyze graph properties, and even solve satisfiability problems. The quantum walk formulation of algorithm design has proven to be a fertile source of new quantum speedups and continues to inspire research in quantum computing theory and applications.
Continuous-time Hamiltonian
State evolution
Runnable implementations you can copy and experiment with.
A discrete quantum walk on a 4-node cycle using 2 position qubits and 1 coin qubit, implementing Hadamard coin and conditional shift.
from qiskit import QuantumCircuit
# 2 position qubits + 1 coin qubit
qc = QuantumCircuit(3, 2)
coin = 2
pos = [0, 1]
# Initialize coin and position
qc.h(coin)
qc.h(pos)
# Hadamard coin
qc.h(coin)
# Controlled shift: increment if coin=0, decrement if coin=1
# Controlled increment (coin=0):
qc.x(coin)
qc.ccx(coin, pos[0], pos[1])
qc.cx(coin, pos[0])
qc.x(coin)
# Controlled decrement (coin=1):
qc.cx(coin, pos[0])
qc.ccx(coin, pos[0], pos[1])
qc.measure(pos, [0, 1])
print(qc.draw(output='text'))A PennyLane implementation of a discrete quantum walk on a 4-node cycle, returning position probabilities.
import pennylane as qml
import numpy as np
dev = qml.device('default.qubit', wires=3)
@qml.qnode(dev)
def quantum_walk():
# Initialize
qml.Hadamard(wires=2)
qml.Hadamard(wires=0)
qml.Hadamard(wires=1)
# Coin
qml.Hadamard(wires=2)
# Controlled increment (coin=0)
qml.PauliX(wires=2)
qml.Toffoli(wires=[2, 0, 1])
qml.CNOT(wires=[2, 0])
qml.PauliX(wires=2)
# Controlled decrement (coin=1)
qml.CNOT(wires=[2, 0])
qml.Toffoli(wires=[2, 0, 1])
return qml.probs(wires=[0, 1])
print(quantum_walk())