---
title: "Quantum Walk & Phase Traps Interactive Lab | Sandbox Physics"
description: "How does a quantum walk differ from an ordinary random walk? A quantum walker steps both ways at once."
canonical_url: "https://sandboxphysics.com/labs/coined-quantum-walk/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/coined-quantum-walk/"
last_modified: "2026-10-27"
---

Quantum motion / Going both ways at once

# Quantum Walk & Phase Traps

**How does a quantum walk differ from an ordinary random walk?** A quantum walker steps both ways at once. Paths that meet again add their amplitudes before squaring, so they reinforce or cancel. The result is two wavefronts racing outward, and a phase defect can steer them. Measure the walker at every step and it turns back into an ordinary random walk.

Turn the quantum coin, shift the initial phase and put a phase defect at the origin. Compare the coherent spread with a reference walk that starts dephased and is measured at every step, then build up the final distribution from independent position readouts.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The model is an ideal discrete coined walk on a line, with up to 64 steps. Hardware loss and atom imaging are not modeled. The classical reference measures the coin and the position at the start and after every step; only the balanced coin turns it into the ordinary unbiased random walk.

QUANTUM CLASSICAL

STEP 0

TURN PHASE

VIEW RANGE $-64$ $x/a$ to $64$

Probability landscape · height is the square root of probability · both rows share one scale

Preparing the sequence…

Many independent readouts of one preparation

### Where does it land?

Collecting pauses the sequence. Each outcome comes from a fresh identical preparation.

Recorded outcomes $0$

Second moment · quantum $0$

Second moment · classical $0$

Second moment · records $\text{—}$

Probability, linear scale

$x/a$

Teal: quantum model. Amber: classical reference. White-centered dots: recorded frequency. Purple dashes: pinned quantum model.

Spread after every step

$\langle(x/a)^2\rangle\quad\text{vs.}\quad N$

The second moment is taken about zero, not about the mean, so it includes drift as well as width. The teal and amber curves are computed independently.

The whole sequence at a glance

Horizontal: position or momentum. Down: steps. Click to revisit a step. This is probability, not a trajectory.

Model, units and approximations

One ideal walker begins at the origin in an equal-weight coin superposition. The two internal states shift left and right after a real coin rotation. A phase defect acts only at the origin. The classical comparator dephases position and coin initially and after every step; it retains coin memory when unbalanced.

$$
|\psi_0\rangle=|0\rangle\otimes\frac{|L\rangle+e^{i\phi}|R\rangle}{\sqrt2}
$$

The 3D view groups adjacent bins when needed. Both models share the same square-root height gain and a fixed horizontal range per preparation. The distribution below shows probabilities per native bin. Measurement outcomes sample the quantum model only; no phase reconstruction is claimed.

Primary research：[Karski et al. (2009)](https://arxiv.org/abs/0907.1565)

Physics tutorial

## Quantum Walk & Phase Traps

**Background** Turn the quantum coin, shift the initial phase and put a phase defect at the origin. Compare the coherent spread with a reference walk that starts dephased and is measured at every step, then build up the final distribution from independent position readouts.

**Why it matters** Start two rules of motion from the same initial populations and compare where they lead.

Start with the essentials

- **Focus question**: How does a quantum walk differ from an ordinary random walk?
- **One-sentence intuition**: Add the amplitudes first, then square. Paths that meet again can reinforce or cancel each other, and measuring at every step wipes out that interference.

### Core mathematical model

#### One complete step

$$
U=D_\chi S(C_\alpha\otimes I),\quad C_\alpha=\begin{pmatrix}\cos\alpha&\sin\alpha\\\sin\alpha&-\cos\alpha\end{pmatrix}
$$

Coin state zero moves the walker one site left, and coin state one moves it right. After the shift, the local phase acts on both coin components at the origin.

#### A limit you can check exactly

$$
\alpha=\frac\pi4,\ \phi=\frac\pi2,\ \chi=0:\quad\langle x^2\rangle\sim\left(1-\frac1{\sqrt2}\right)N^2
$$

The balanced, symmetric quantum walk spreads ballistically, while the walk measured at every step has a second moment equal to the number of steps. A finite run need not match the long-time coefficient exactly.

#### What is sampled

$$
\widehat{M_2}=\frac1n\sum_{j=1}^{n}q_j^2
$$

Each final readout comes from a fresh preparation. The reported uncertainty is one standard error of the sample. These records cannot reconstruct the quantum phase.

### Common difficulties

#### A probability landscape

**Typical misconception** Each peak is an individual particle, or the trajectory one particle follows.

**Better mental model** The model is an ideal discrete coined walk on a line, with up to 64 steps. Hardware loss and atom imaging are not modeled. The classical reference measures the coin and the position at the start and after every step; only the balanced coin turns it into the ordinary unbiased random walk.

### Run the experiment

1. 01

   #### Watch quantum and classical part ways

   Play the sequence. Compare the teal quantum ridge with the amber classical ridge.

   **What to observe:** Both rows use the same horizontal scale and the same square-root height scale. For a quantitative comparison, use the linear plots below.

2. 02

   #### Change only the phase

   Keep the coin balanced. Turn the initial phase, then add a phase at the origin.

   **What to observe:** Neither phase affects the measured reference, but both change the coherent walk.

3. 03

   #### Record a distribution

   Collect 500 outcomes and pin the preparation. Change the experiment, restore the pinned sample and export its raw CSV.

   **What to observe:** The histogram and the second moment come only from recorded outcomes; the classical ensemble is a separate reference.

Physical conclusion

The model is an ideal discrete coined walk on a line, with up to 64 steps. Hardware loss and atom imaging are not modeled. The classical reference measures the coin and the position at the start and after every step; only the balanced coin turns it into the ordinary unbiased random walk.

Quantum & fields · Starter path

## Start from a single measurement

Predict an outcome, then count what the measurements actually give. The path starts with one qubit and moves on to wave packets, bound states and two-photon interference.

[Start here → **Quantum State & Born Measurement** Predict a probability, turn the analyzer, then compare your prediction with the measured frequency over many shots. Observe · 15 min](https://sandboxphysics.com/labs/qubit-state/)

1. [1 Quantum State & Born Measurement](https://sandboxphysics.com/labs/qubit-state/)
2. [2 Stern–Gerlach Sequence](https://sandboxphysics.com/labs/stern-gerlach-sequence/)
3. [3 Wave Packet & Uncertainty](https://sandboxphysics.com/labs/wave-packet-uncertainty/)
4. [4 Quantum Harmonic Oscillator](https://sandboxphysics.com/labs/quantum-harmonic-oscillator/)
5. [5 Which Path & Quantum Eraser](https://sandboxphysics.com/labs/quantum-eraser/)
6. [6 Hong–Ou–Mandel Two-Photon Interference](https://sandboxphysics.com/labs/hong-ou-mandel/)

[View the full path →](https://sandboxphysics.com/topics/quantum/#starter-path)
