Quantum Maze Search

R. Perry, 10 April 2023 (in progress), QCE

Investigation and visualization of quantum maze search.

The source code maze.cc (not yet available) is part of the QCE quantum computing emulator.


Introduction

An article at Andela [1] shows animated GIFs of classical and supposed quantum maze search. Here are slower versions of the animations: classical, quantum.

The classical animation uses backtracking and is realistic, but the quantum animation seems unrealistic - it is not based on an actual quantum search algorithm, and simply produces a superposition of all possible positions within the maze without identifying a solution path. Published algorithms for quantum maze search are generally based on quantum walks, starting with an equal superposition of states, and produce solutions only for special cases, like tree and star graphs.

For square grids, Koch [2] finds a specially marked node, but not a path:

From [2]: https://arxiv.org/abs/1810.06295

For a chain of stars, Reitzner et. al. [3] finds a path:

From [3]: https://arxiv.org/abs/1707.01581

For tree graphs, Koch and Hillery [4] find a path:

From [4]: https://arxiv.org/abs/1710.05084


Maze Generation and Representation

Rectangular mazes are generated here using a spanning tree algorithm (src) so there is a unique path between any two cells. Any two edge cells could be used for the maze entrance and exit, but we arbitrarily always use the top left and bottom right cells.

Each maze cell has left and down walls which may be open or closed. A cell right wall is the left wall of the cell to the right, and a cell up wall is the down wall of the cell above. The top row has all implicit closed walls above and the bottom row has all closed walls below. The left edge has all closed walls to the left except for the entrance cell (0,0). The right edge has all implicit closed walls to the right except for the exit cell (M-1,N-1). A maze wallfile specifies the maze size (M,N) followed by the left,down wall status for each cell.

For example, m-2-4a.txt:
2 4
 0 1  0 0  1 0  0 0 
 1 1  0 1  0 1  1 1 
defines the maze shown graphically here with the solution path in red:


Quantum Maze Search Implementation

Two seeming different models for quantum walk, scattering and coin-based, have been shown to be equivalent [5,6]. Here we will use a coin-based model [7,8] with a Hadamard coin.

to be continued


References

[1] Quantum Computing: The Real Game Changer, https://andela.com/insights/quantum-computing-the-real-game-changer/ (local), December 13, 2018. Animated GIFs of classical and supposed quantum maze search.

[2] Scattering Quantum Random Walks on Square Grids and Randomly Generated Mazes, https://arxiv.org/abs/1810.06295, Daniel Koch, 15 Oct 2018.

[3] Finding paths with quantum walks or quantum walking through a maze, https://arxiv.org/abs/1707.01581, Daniel Reitzner, Mark Hillery, Daniel Koch, 16 Sep 2017.

[4] Finding paths in tree graphs with a quantum walk, https://arxiv.org/abs/1710.05084, Daniel Koch, Mark Hillery, 13 Oct 2017.

[5] Equivalence between discrete quantum walk models in arbitrary topologies, https://arxiv.org/abs/0911.0042, F. M. Andrade, M. G. E. da Luz, 7 Nov 2009.

[6] Unveiling and exemplifying the unitary equivalence of discrete time quantum walk models, https://arxiv.org/abs/1304.3690, B F Venancio, F M Andrade, M G E da Luz, 12 April 2013.

[7] Controlling discrete quantum walks: coins and intitial states, https://arxiv.org/abs/quant-ph/0304204, Ben Tregenna, Will Flanagan, Rik Maile, Viv Kendon, 17 June 2003.

[8] Complete classification of trapping coins for quantum walks on the 2D square lattice, https://arxiv.org/abs/2002.08070, Balint Kollar, Andras Gilyen, Iva Tkacova, Tamas Kiss, Igor Jex, Martin Stefanak, 14 July 2020.