---
title: Implementation and Viusalization of Quantum Walks
authors:
  - Addie Jordon
  - Austin Hawkins-Seagram
  - Ulrike Stege
abstract: Quantum walks (QWs) are the quantum analogue to classical random walks. We explore various implementations of QWs and create visualizations for each, with the goal of increasing educational accessibility. A new QW, called sticky walk, is introduced, where the walker sticks to targets once found. Corresponding pseudocode and Qiskit implementations are provided. Sticky walk helps bridge the gap between non-searching QWs and Quantum Walk Search (which may be an unintuitive search algorithm for those new to QWs).
summaryType: survey
sourceStatus: null
sources:
  - https://doi.org/10.1109/QCE53715.2022.00122
---

# Implementation and Viusalization of Quantum Walks

[Original paper](https://doi.org/10.1109/QCE53715.2022.00122)

## Background and motivation

This three-page extended abstract develops educational examples of discrete-time quantum walks and introduces a target-retaining variant called sticky walk.
The authors aim to connect the familiar idea of a random walker moving between adjacent graph vertices with the less intuitive behavior of quantum superposition and quantum walk search.
They provide Qiskit implementations and spatial visualizations for two-dimensional and three-dimensional settings, while a public interactive visualization tool remains future work.

Quantum walks and quantum search are established research problems.
In a classical random walk, a walker samples one adjacent edge at each step and, when searching, stops after reaching a marked vertex.
A quantum walk permits both position and direction to be in superposition, allowing amplitudes to evolve along multiple paths and interfere.
The paper draws on prior work on random walks, quantum walks, spatial search, Grover's amplitude amplification, and the educational role of visualization in computer science and mathematics.
Its motivating gap concerns accessible explanations and visual representations for learners, rather than the absence of quantum-walk algorithms.

The authors argue that the search formulations they discuss are difficult entry points because they require amplitude amplification and, in the cited Qiskit textbook treatment, quantum phase estimation.
They also identify an intuitive mismatch between vertex-based pictures of a walker and the edge-based formulation used in that treatment of quantum walk search.
These are the authors' pedagogical motivations, not findings from a study of students or a systematic comparison of existing teaching tools.
Sticky walk is proposed as an intermediate example that makes contact with a target easy to describe: the walker stays at a marked position once it arrives there.

## Coined walks and the Hadamard example

The paper focuses on discrete-time coined walks, with position and coin registers in a joint space $\mathcal{H}^{P}\otimes\mathcal{H}^{C}$.
One iteration applies a coin operator $C$ followed by a conditional shift $S$:

$$
U = SC.
$$

The coin determines the direction component of the state, and the shift updates the position conditional on that direction.
In the two-dimensional Hadamard example, the initial coin state is $|00\rangle$, and the four basis states $|00\rangle$, $|01\rangle$, $|10\rangle$, and $|11\rangle$ correspond to up, right, down, and left.
The implementation uses periodic boundaries, so leaving one edge of the lattice returns the walker at the opposite edge.
Starting at one vertex, the walk initially spreads in four directions; repeated steps produce a nonuniform spatial distribution through interference.
The authors describe a later bias toward positions above and to the left of the starting point and contrast this with an equal-superposition position initialization, whose spatial distribution they describe as unchanged by the walk.
The extended abstract states this contrast without a detailed derivation of the combined position-and-coin evolution.

## Visual representation and figure evidence

The two published figures are static grid heat maps of the Hadamard walk, not screenshots of an interactive application or visualizations of sticky-walk search performance.
Each square represents a lattice position, with horizontal and vertical coordinates preserving the spatial organization of the walk.
Color intensity indicates the distribution over positions, allowing readers to see concentration and asymmetry that would be difficult to infer directly from a circuit.
These views show the spatial outcome of the evolution; they do not directly depict phase, coin-state amplitudes, or the individual interference paths that produce it.

Figure 1 uses a grayscale ramp in which darker squares represent higher probability of observing the walker at that position.
Its caption identifies four steps from starting position $(5,3)$ and calls the grid $6\times6$, although the visible plot has coordinate labels from 0 to 7 on both axes.
This inconsistency prevents a confident grid-size interpretation from the figure alone.
The color bar is numerically labeled but does not specify its probability scaling.



Figure 2, reproduced above, uses a dark-red-to-yellow-and-white scale, with brighter cells showing larger values.
The strongest visible concentration is near coordinate $(3,3)$, accompanied by a broader diagonal pattern.
The surrounding prose uses this image to illustrate the spatial bias after repeated evolution from a localized starting point.
However, the figure has no descriptive caption beyond its number, and the paper does not state its exact iteration count or explain the numerical scale, which includes values greater than one.
It supports a qualitative reading of relative concentration, but not extraction of normalized probabilities or a quantitative comparison with Figure 1.

## Sticky walk and implementation

Sticky walk is the paper's new algorithmic construction.
The authors cite the ideas of hit-boxes in work on finding marked vertices and self-loops in lackadaisical quantum walks as inspirations.
Their pseudocode adds an auxiliary qubit to the position and direction registers and uses an oracle to distinguish marked from unmarked positions.
At each iteration, the auxiliary qubit is reset to $|0\rangle$ and the oracle sets it to $|1\rangle$ for targets while leaving it at $|0\rangle$ elsewhere.
After applying the coin operator, an $X$ gate reverses the auxiliary value, and the shift is controlled on that qubit so that only non-target states move.
The position register is measured after the requested iterations.

Under the intended behavior described by the authors, the controlled shift leaves target positions in place during subsequent iterations, making a target act as a location where the walker sticks.
The construction therefore offers a simple visual story for moving from an unconstrained walk to a search-oriented process.
Algorithm 1 makes the reset and target-marking steps explicit, but the extended abstract does not provide a detailed correctness proof or a resource analysis for the full process.
The paper's introductory discussion of $O(\sqrt{N})$ quantum search compared with $O(N)$ classical search is background motivation; it is not a demonstrated complexity bound for sticky walk.

The implementation section points to Qiskit code for two-dimensional and three-dimensional Hadamard and sticky walks.
The authors report producing visualizations for grids and cubes, but the article itself shows only the two two-dimensional Hadamard examples.
It does not document a graphical interaction workflow, parameter controls, linked views, or a completed public application.

## Contributions and evaluation limits

The contribution combines an educational presentation of coined walks, implementations and visual examples on regular spatial structures, and sticky walk as a proposed bridge between basic walks and more advanced search methods.
The figure examples illustrate how a position distribution can be represented on the same spatial grid as the walk, while the pseudocode explains the intended target-retention mechanism.
These are illustrative and implementation-oriented contributions.
The paper reports no learner study, task-based usability evaluation, controlled comparison of visual encodings, timing benchmark, or quantum-hardware experiment.
It also reports no measured sticky-walk success probabilities, query complexity, or comparison with established search algorithms.
Consequently, its claims about accessibility are research aims, and its examples do not establish improved learning or search performance.

## Limitations and future work

The authors identify non-uniform graph structures as an implementation challenge.
In their 2022 discussion, many existing implementations require $d$-regular graphs, whereas a coin for a graph with varying vertex degree needs a way to prepare a superposition over the neighbors of the current vertex.
They note that arbitrary-superposition preparation is theoretically possible but do not implement a general solution here.
This is a limitation of the presented scope and the historical implementation landscape described in the paper, not a claim about all current quantum-walk software.

A second proposal concerns local search when the approximate neighborhood of a target is more useful than its exact location.
The authors propose preparing marked and unmarked versions of an equal-superposition walk, running each for a small number of iterations, and subtracting the resulting states so that differences around targets become detectable.
They suggest that one additional qubit could distinguish the two versions.
This remains a proposed extension: the implementation was not complete, and the authors explicitly leave the optimal iteration count, implementation difficulty, and exact resulting probabilities unresolved.

Finally, the authors propose a publicly accessible educational tool in which users specify graph parameters, targets, and walk type, then watch the walk unfold as an animation.
Such interaction would extend the implemented examples toward step-by-step exploration, but the paper presents neither that tool nor an evaluation of its educational effectiveness.
