**1. Introduction**

Maze-solving methods are important because they have practical applications and provide insight into the invisible intelligence that underlies them. Maze-solving problems can be regarded as a subset of the shortest path problem [1], which is a practical problem in daily life. To solve the maze problem, a maze can be expressed as a network and then solved by an algorithm, such as the depth-first search or the breadth-first search algorithm [2]. There are also maze-solving methods that exploit natural phenomena.

Such methods have been studied experimentally using the Belousov–Zhabotinsky reaction mixtures [3], amoeboid organisms [4], gas discharge [5], and photons in a waveguide array [6]. In these experiments, the result of maze-solving has a symbolic aspect in that it represents the autonomous optimization of the natural system. In this way, the pursuit and modeling of the optimization process in maze solving by a natural phenomenon, can provide a path to a deeper understanding of that phenomenon.

The quantum walk model, which has been studied as a quantum counterpart of random walk, has been applied to describe various transportation phenomena in nature [7]. It was first studied as the time-evolution of probability distribution, mainly on a onedimensional network. In the discrete-time quantum walk (DTQW) model, each node has a state vector of complex amplitudes whose dimension corresponds to the number of neighboring nodes. Each evolution is composed of a coin operation and a shift operation; after multiplying the unitary matrix (coin operation), the complex amplitude is transferred into an element of the state vector of a neighboring node (shift operation). By considering time-dependent or site-dependent unitary matrices, the quantum walk can express many kinds of transport dynamics.

**Citation:** Matsuoka, L.; Yuki, K.; Laviˇcka, H.; Segawa, E. Maze Solving by a Quantum Walk with Sinks and Self-Loops: Numerical Analysis. *Symmetry* **2021**, *13*, 2263. https:// doi.org/10.3390/sym13122263

Academic Editor: Motoichi Ohtsu

Received: 29 September 2021 Accepted: 19 November 2021 Published: 28 November 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

The study of quantum walks was extended to arbitrarily connected networks from an early stage [8] because the quantum search on graphs by quantum walks was proposed [9–11] as an alternative to Grover's search algorithm [12]. When dealing with discrete-time quantum walks on an arbitrarily connected network, the concept of scattering quantum walks (SQWs) can simplify the model [13].

In an SQW, the state vectors are placed on the edges rather than the nodes. The dimension of each state vector is two: this corresponds to the two directions of an edge between two nodes. Moreover, each node has a scattering matrix that corresponds to the unitary matrix in the coin operation. The time evolution is composed of an intrusion in the node, the multiplication of the scattering matrix, and an escape from the node. The dynamics of an SQW are equivalent to those of a DTQW except for the location of the state vectors.

Recently, the concepts of consecutive injection and corresponding emission into and from the system were incorporated into quantum walks on arbitrarily connected networks [14,15]. For quantum walks on a network with entrances and/or exits, the steadystate [14], trapped-state [15], analogy to an electrical circuit [16], and relationship to the dressed photon phenomenon [17] have been discussed. In particular, the emergence of a trapped state between two self-loops on a network with an exit sink [15] directly motivated the present study, which applies this concept to maze-solving.

Maze-solving using quantum walks has been studied by Hillery, Koch, and Reitzner on an N-tree maze [18] and a chain of stars [19,20]. Their works are the extension of their studies on quantum search and finding structural anomalies in networks [21–27]. They characterized the start and goal nodes in the maze by reflection with phase inversion, which can be regarded as a pair of structural anomalies.

In this paper, we numerically examine a maze-solving method that uses a quantum walk on a network. The presented method is an application of the emergence of a trapped eigenstate on a network with sinks, and it provides an alternative to previously reported methods [18–20]. Although the mathematical foundation of this method was given by Konno, Segawa, and Štefa ˇnák [28], the results presented here are non-trivial because the interaction among multiple trapped eigenstates and the initial condition is generally difficult to characterize as of now.

We show the effectiveness of the method for some examples of the maze with and without cycles and also show the undesirable cases for which this method does not work. The dependence of the number of steps for convergence (convergence steps) on the size of the network structure was also investigated and found to be counterintuitive in certain cases. We also make a tentative discussion about the amount of amplitude remaining on a path and its relative amount among the multiple paths from the numerical results.
