Sign in
← Atlas
Strong empiricalAlgorithmsQuantum walk

Discrete-time quantum walk on a line

A coin-and-shift circuit that spreads a walker's position amplitude ballistically, in contrast to the diffusive spread of a classical random walk.

quantum walkcoin operatorballistic spreadinggraph algorithms

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.

A discrete-time quantum walk pairs a coin qubit with a position register: flip the coin, then shift position conditioned on the coin outcome, coherently, without collapsing the superposition between steps.

Circuit & simulation
pos=-2 after 2 steps25%
pos=0 after 2 steps50%
pos=+2 after 2 steps25%
What this takes and returns
TakesNothingWhat joins here

No input port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.

Nothing in the Atlas meets this end.

ReturnsNothingWhat joins here

No output port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.

Nothing in the Atlas meets this end.

This record publishes no gate sequence and no register, so there is nothing here to read an interface off. Absent rather than empty. See all 152 →

How it works

A coined discrete-time quantum walk on the integer line pairs a 2-dimensional coin register with a position register. Each step applies a coin operator CC (Hadamard, by default) to the coin, then a conditional shift SS that moves the position by 1-1 if the coin reads 0|0\rangle and +1+1 if it reads 1|1\rangle — applied coherently, so all branches persist and can later interfere.

Long-run behavior. After tt steps, the position distribution of this walk spreads with standard deviation σt\sigma \propto t (ballistic spreading), in contrast to a classical random walk's σt\sigma \propto \sqrt t (diffusive spreading) — a quadratic gain in spreading rate that several quantum-walk-based search and graph algorithms exploit (Aharonov, Ambainis, Kempe, Vazirani, 2001).

Small worked instance. Start at position 00 with coin 0|0\rangle. Step 1: HH on the coin gives 12(0+1)0pos\tfrac1{\sqrt2}(|0\rangle+|1\rangle)\otimes|0\rangle_{\text{pos}}; the shift then gives 120,1+121,+1\tfrac1{\sqrt2}|0,-1\rangle + \tfrac1{\sqrt2}|1,+1\rangle (coin, position) — each position ±1\pm1 with probability 1/21/2, matching a classical single step.

Step 2 applies HH to the coin in each branch: H0=12(0+1)H|0\rangle=\tfrac1{\sqrt2}(|0\rangle+|1\rangle), H1=12(01)H|1\rangle=\tfrac1{\sqrt2}(|0\rangle-|1\rangle), giving

120,1+121,1+120,+1121,+1,\tfrac12|0,-1\rangle+\tfrac12|1,-1\rangle+\tfrac12|0,+1\rangle-\tfrac12|1,+1\rangle,

then the shift moves each term (0,x0,x1|0,x\rangle\to|0,x-1\rangle, 1,x1,x+1|1,x\rangle\to|1,x+1\rangle):

120,2+121,0+120,0121,+2.\tfrac12|0,-2\rangle+\tfrac12|1,0\rangle+\tfrac12|0,0\rangle-\tfrac12|1,+2\rangle.

Reading off probabilities: P(2)=1/4P(-2)=1/4; at position 00 the two contributions carry different coin states so they do not interfere, giving P(0)=(1/2)2+(1/2)2=1/2P(0)=(1/2)^2+(1/2)^2=1/2; and P(+2)=1/4P(+2)=1/4. At this short length the result numerically coincides with the classical 2-step binomial walk — the quantum/classical divergence (from interference between equal-coin-state paths reaching the same site) only becomes visible from step 3 onward, which is worth stating honestly rather than implying an advantage is visible after 2 steps.

Implementation
Native
quantum_walk_line.py
from qiskit import QuantumCircuit
from qiskit.circuit.library import UnitaryGate
import numpy as np

n_pos = 3
N = 2 ** n_pos

def cyclic_shift_matrix(direction):
    M = np.zeros((N, N))
    for x in range(N):
        M[(x + direction) % N, x] = 1
    return M

shift_plus = UnitaryGate(cyclic_shift_matrix(+1), label="S+1")
shift_minus = UnitaryGate(cyclic_shift_matrix(-1), label="S-1")

qc = QuantumCircuit(1 + n_pos, n_pos)
coin, pos = 0, list(range(1, 1 + n_pos))
for _ in range(2):
    qc.h(coin)
    qc.append(shift_plus.control(1), [coin] + pos)
    qc.x(coin)
    qc.append(shift_minus.control(1), [coin] + pos)
    qc.x(coin)
qc.measure(pos, range(n_pos))

FINAL_CIRCUIT = qc
Quantum vs classical

Classical baseline

A classical random walk on the line has position standard deviation σ ∝ √t after t steps (diffusive spreading).

Quantum claim

The coined quantum walk spreads ballistically, σ ∝ t, a quadratic improvement in spreading rate that some quantum-walk search and graph algorithms exploit.

How to compare

Compare the achieved spread (variance) at a fixed step count and circuit depth against a classical simulation, and confirm the downstream application actually uses interference rather than just the marginal position distribution.

Declared gaps

Nobody has reviewed this record for gaps yet.

Literature & references
Quantum Walks On Graphs2000 · Dorit Aharonov, Andris Ambainis, Julia Kempe, Umesh Vazirani

Establishes the ballistic spreading of coined quantum walks and contrasts it with classical diffusive spreading.

arxiv.org/abs/quant-ph/0012090
Quantum random walks - an introductory overview2003 · Julia Kempe

Accessible review of coined and continuous-time quantum walks and their algorithmic applications.

arxiv.org/abs/quant-ph/0303081