Finding paths with quantum walks or quantum walking through a maze
FFinding paths with quantum walks or quantum walking through a maze
Daniel Reitzner
RCQI, Institute of Physics, Slovak Academy of Sciences, D´ubravsk´a cesta 9, 845 11 Bratislava, Slovakia
Mark Hillery and Daniel Koch
Department of Physics, Hunter College of the City University of New York,695 Park Avenue, New York, NY 10065 USA andPhysics Program, Graduate Center of the City University of New York, 365 Fifth Avenue, New York, NY 10016
We show that it is possible to use a quantum walk to find a path from one marked vertex toanother. In the specific case of M stars connected in a chain, one can find the path from the firststar to the last one in O ( M √ N ) steps, where N is the number of spokes of each star. First weprovide an analytical result showing that by starting in a phase-modulated highly superposed initialstate we can find the path in O ( M √ N log M ) steps. Next, we improve this efficiency by showingthat the recovery of the path can also be performed by a series of successive searches when we startat the last known position and search for the next connection in O ( √ N ) steps leading to the overallefficiency of O ( M √ N ). For this result we use the analytical solution that can be obtained for a ringof stars of double the length of the chain. I. INTRODUCTION
Quantum walks are quantum versions of random walks[1, 2] (for reviews see [3, 4]). There are both discrete- andcontinuous-time versions of quantum walks [5], but herewe will only make use of the discrete-time version. Thereare also two (equivalent [3, 6]) versions of the discrete-time walk, the coined walk and the scattering walk, andhere we shall employ the scattering walk [7], which issimple to use when working with non-regular graphs.Quantum walks have proven useful in the developmentof quantum algorithms, particularly search algorithms[8–19]. Originally, the searches were for marked vertices[8], but it was later realized that searches for more generalobjects are possible. One can search for marked edges orcliques [13], extra edges that break the symmetry of agraph [16], or more general structures [18, 19]. In addi-tion to their use as theoretical tools, it has been possibleto realize quantum walks in the laboratory [20–25].A more recent use of quantum walks is in state transfer[26–28]. One has two distinguished vertices in a graph.The particle making the walk starts on one, and the ob-jective is for it to finish, after a certain number of steps,on the other with high probability. This has been stud-ied for grids [26], star graphs and complete graphs withloops [27], and complete bipartite graphs [28].Our aim in this paper is to examine a related task.We consider a graph with two distinguished vertices, andwe want to find the path between them. In our partic-ular case the graph G is a bipartite graph composed ofconnected stars (see Fig. 1). A star graph consists ofa central vertex, which is connected to external verticesby a single edge to each external vertex, so that it lookslike the hub and spokes of a wheel. We have a string of M star graphs, each having N spokes, connected to eachother via one of their spokes, and we do not know whichvertex of star j is connected to which vertex of star j + 1,though we know the order of the stars. The first star has FIG. 1: In the chain of stars G the task is to find the wholepath from a known start vertex to an unknown end vertex. a vertex labeled “START” and the last one has a vertexlabeled “END”. Because we do not know where the starsare connected, we do not know the path from start toend.This task of identifying the path is reminiscent of find-ing one’s way through a maze or movie-style safe crack-ing. In the latter case one must search for a single combi-nation out of N M , where M is the length of the combina-tion and N is the number of settings on the dial. Cleverthieves reduce this problem by looking successively fordigits of the combination. This reduced task requiresclassically M N/ G , for which after a number of stepsproportional to the square root of the number of spokesof each star, the particle becomes localized on the path. a r X i v : . [ qu a n t - ph ] S e p Then by measuring the location of the particle, we canfind an element of the path. Repeated walks and mea-surements can then reveal the whole path. We will startby providing an algorithm for the search with a delo-calized initial state, resembling standard setups, whichneeds O ( M √ N log M ) steps. Afterwards we will givealso an algorithm that can search for the path startingfrom a localized initial state in O ( M √ N ) steps.The paper is organized as follows. In Sec. II we definethe problem of a search for a path in a chain of starswe are aiming to solve. Then in Sec. III we present asolution based on the usual approach having a large su-perposition as an initial state. To obtain a solution for amore favorable localized initial state, in Sec. IV we solvea problem in a simplified setting on a ring of stars. Thisresult is then in Sec. V modified to work on the chainof stars. The results are summarized in Sec. VI. Sometechnical details are included in the Appendices. II. SETTING OF THE PROBLEM
Without loss of generality we can adopt the followingnotation for the graph, G . The j th star graph has centralvertex A j , and N external vertices labeled B j through B j ( N − and B ( j − . Stars j − j share vertex B ( j − , while vertex B is START and vertex B M isEND.For the evolution we will be using a discrete-time quan-tum walk formulation known as the scattering quantumwalk [7]. In this walk, the particle resides on the edges ofan undirected graph, and it can be thought of as scatter-ing when it goes through a vertex. In particular, supposean edge connects vertices v and v . There are two statescorresponding to this edge, and these states are orthogo-nal — there is the state | v , v (cid:105) , which corresponds to theparticle being on the edge and going from vertex v to v ,and the state | v , v (cid:105) , which corresponds to the particlebeing on the same edge and going from v to v . The setof these states for all of the edges forms an orthonormalbasis for the Hilbert space H of the walking particle.The evolution will be described by a unitary opera-tor, U , that advances the walk one time step. We ob-tain this operator by combining the action of local (scat-tering) unitaries that describe what happens at the in-dividual vertices. In our string of stars, we have fourkinds of vertices. The simplest are { B jk | ≤ j ≤ M, ≤ k ≤ N − } . These simply reflect the par-ticle, U | A j , B jk (cid:105) = | B jk , A j (cid:105) . The vertices B and B M also reflect the particle, but with a factor of − U | A , B (cid:105) = −| B , A (cid:105) and U | A M , B M (cid:105) = −| B M , A M (cid:105) . The vertices B j for 1 ≤ j ≤ M − U | A j , B j (cid:105) = | B j , A j +1 (cid:105) and U | A j +1 , B j (cid:105) = | B j , A j (cid:105) . Finally, the action of the cen- tral vertices is given for 1 ≤ k ≤ N − U | B jk , A j (cid:105) = − r | A j , B jk (cid:105) + t N − (cid:88) l =1 l (cid:54) = k | A j , B jl (cid:105) + t | A j , B ( j − (cid:105) , (1)where t = 2 /N and r = 1 − t = ( N − /N , and U | B ( j − , A j (cid:105) = − r | A j , B ( j − (cid:105) + t N − (cid:88) l =1 | A j , B jl (cid:105) . (2)Having defined Hilbert space H and the evolution U on this space, by choosing a proper initial state, we showhow to perform an efficient quantum search for the path.We shall do it in two ways. First we will start in a largesuperposition of edge states and show that the problemreduces to a two-dimensional problem that is equivalentto the Grover search [29]. As the preparation of a com-plete superposition might be difficult in experimental sit-uations, we will also investigate a case where we willchoose a succession of localized initial states, which willlead to the recovery of the whole path with the samespeedup.While we use the physical interferometric analogy ofthe scattering approach in our paper, it is also worth-while to comment on the possibility of an oracular set-ting. In computer science, search problems on graphs areformalized using a so-called oracle that, upon querying,answers a specific question. In the Grover search, theoracle answers a question, whether a queried element isthe target or not. In a quantum walk setting, the ora-cle is more complex and presents information about thegraph on which the walk takes place. In our case, the or-acle that implements the scattering walk can be thoughtof as an operation that upon presenting a “name” of avertex, outputs the names of its neighbors as well as theinformation as t whether it is the start or the end vertexof the searched path [13].Such an oracle encodes the path in two different ways.If the queried vertex is either the start or end, it acts asthe usual oracle in the Grover search, giving direct infor-mation on whether the queried vertex is marked or not.However, the oracle encodes the connections between thestars in a different way — when presented with the possi-ble neighbors, the connections are recognizable by havingexactly two neighbors. III. INITIAL STATE OF A LARGESUPERPOSITION
A calculation for two stars ( M = 2) reveals that aninitial state consisting of a superposition of all of the out-going states in the first star minus the outgoing states inthe second star does lead to a state in which the particlebecomes localized on the path from start to end. Theminus sign is important. An intial state that is a super-position of all of the outgoing states in the first star plusthe outgoing states in the second star leads to the par-ticle becoming localized on the edges connected to thestart and end, but provides no information about wherethe stars are connected. Extrapolating from the two-starresult, we start by defining the following states. | ψ (cid:105) = 1 (cid:112) M ( N − M (cid:88) j =1 N − (cid:88) k =2 ( − j | A j , B jk (cid:105) , | ψ (cid:105) = 1 (cid:112) M ( N − M (cid:88) j =1 N − (cid:88) k =2 ( − j | B jk , A j (cid:105) , | ψ (cid:105) = 1 √ M M (cid:88) j =1 ( − j ( | A j , B j (cid:105) + | A j , B ( j − (cid:105) ) , | ψ (cid:105) = 1 √ M M (cid:88) j =1 ( − j ( | B j , A j (cid:105) + | B ( j − , A j (cid:105) ) . (3)The first two states correspond to the particle being lo-cated in undesirable positions, while the next two statesrepresent a particle being located on the path. We findthat U | ψ (cid:105) = | ψ (cid:105) U | ψ (cid:105) = ( r − t ) | ψ (cid:105) + 2 √ rt | ψ (cid:105) U | ψ (cid:105) = −| ψ (cid:105) U | ψ (cid:105) = ( t − r ) | ψ (cid:105) + 2 √ rt | ψ (cid:105) . (4)so that the subspace spanned by these states is invariantunder the action of U . It is often the case in quantumwalk search problems that the relevant states lie in aninvariant subspace of small dimension [30]. In this casethe dimension of the subspace can be reduced further bynoting that U | ψ (cid:105) = ( r − t ) | ψ (cid:105) + 2 √ rt | ψ (cid:105) U | ψ (cid:105) = ( r − t ) | ψ (cid:105) − √ rt | ψ (cid:105) . (5)This is already a unitary corresponding to one step of theGrover search for two elements within a database of N elements. To obtain the proper initial state we continuefurther. The eigenvalues of U restricted to the subspacespanned by | ψ (cid:105) and | ψ (cid:105) are λ ± = ( r − t ) ± i √ rt =exp( ± iθ ), for cos θ = r − t . The corresponding eigenstatesare | η ± (cid:105) = 1 √ | ψ (cid:105) ∓ i | ψ (cid:105) ) , (6)where | η + (cid:105) corresponds to λ + and | η − (cid:105) corresponds to λ − . We now note that U n | ψ (cid:105) = 1 √ U n ( | η + (cid:105) + | η − (cid:105) )= 1 √ e inθ | η + (cid:105) + e − inθ | η − (cid:105) ) . (7) To localize the particle in this case in state | ψ (cid:105) , whichis the desired effect, we look at the success probability ofending there. This turns out to be p suc (2 n ) = sin ( nθ )(we emphasize the double use of the unitary explicitly inthe whole paper; odd steps will be disregarded). Choos-ing the number, 2 n , such that n θ = π/ p suc (2 n ) = 1; the closest even number to 2 n , the num-ber of steps we shall make, will introduce errors to theprobability, which are of order 1 / √ N , and hence will notaffect our results on efficiency, which we shall present inthe limits of large N and M ..In the limit of large N we obtain the number of steps(uses of U or efficiency) in the quantum walk search2 n = πθ (cid:39) π (cid:114) N . (8)This result holds when we start from state | ψ (cid:105) . Usingthis state as the initial state would, however, imply thatwe know the path. There is a state, though, that is closeto | ψ (cid:105) , which treats all the stars’ spokes equally, thusrequiring no initial information about the path. This is astate that has the same amplitude for all of the outgoingedges and alternating signs on subsequent stars, | ψ init (cid:105) = 1 √ M N M (cid:88) j =1 N − (cid:88) k =1 ( − j | A j , B jk (cid:105) + M (cid:88) j =1 ( − j | A j , B ( j − (cid:105) = 1 √ M N (cid:16)(cid:112) M ( N − | ψ (cid:105) + √ M | ψ (cid:105) (cid:17) (9)= cos θ | ψ (cid:105) + sin θ | ψ (cid:105) (cid:39) | ψ (cid:105) + O ( N − / ) | ψ (cid:105) , where the last approximation is for large N and leads toa difference of O (1 /N ) in the success probability (for amore detailed explanation see Appendix A 1). The re-sult is that after 2 n steps (uses of the unitary U ), theparticle is localized on the path connecting start and endvertices and a measurement in the canonical (edge) basisreveals one of the connections at random from the uni-form distribution (except on the edges connected to thestart and end vertices, which have half the probability tobe found as the edges connecting stars). As shown in Ap-pendix B, by repeating the algorithm O ( M log M ) timeswe can recover the whole path with the expected num-ber of steps being O ( M √ N log M ), obtaining a speedupover the classical case, which requires O ( M N ) steps onaverage.
IV. EVOLUTION OF A LOCALIZED STATE ONA RING OF STARS
The previous analysis contains two problems. Firstly,the efficiency M √ N log M is not optimal and can be fur-ther improved. Secondly, the initial state we produced inthe previous section is a large superposition of edge statesfrom the whole Hilbert space. In reality, such states arehard to create and a simpler option would be a smallsuperposition on spatially localized edge states. Further-more, the whole graph G might be encoded in an ora-cle representing the search space and, thus, inaccessibleto us. We can draw some information from the works[26–28], where an analogy between searches and statetransport is investigated. In similar way we shall explorethe possibility of starting on one of the connections andobserve “transport” of the state to the neighboring con-nections. Due to the complexity of the underlying graphthe analysis is more involved, but the analogy is fitting.We will consider an initial state localized around thestart vertex that is known and subsequent initial stateslocalized around known connections between stars. Inthe beginning, when only the start vertex is known, weprepare initial state | ψ init (cid:105) = | A , B (cid:105) (10)and if we already know the k -th connection (connectingstars k and k + 1), we prepare initial state | ψ init (cid:105) = 1 √ | A k +1 , B k (cid:105) − | A k , B k (cid:105) ) . (11)In both cases we are going to show that the evolutionleads to a localization on the next connection.Intuitively, the evolution on the star(s) we start at isroughly similar to the evolution in the Grover search, asthe centers A j are almost reflections with phase flips andto some extent separate the two stars we start on fromthe rest. So we can expect that after O ( √ N ) steps wewill find the next connection, or the end vertex, depend-ing on our starting position. The procedure of findingthe whole path then requires O ( M √ N ) steps, which im-proves on the case of the large superposition initial statefrom Eq. (9).The analysis of this approach is more involved thanthe previous case and we split it into two parts. In thissection we consider a different problem, an evolution fromthe initial state (11) on a ring of stars, where the startvertex coincides with the end vertex. In the followingsection, this result will be used to solve the evolution forthe original problem of the chain of stars.We now assume the start vertex and the end vertex co-incide and behave as all other connections between stars.The periodicity of the system allows us to express theeigenstates of U using the Bloch theorem for periodicpotentials in the form [31] | Ψ ± m (cid:105) = M (cid:88) j =1 e πijm/M (cid:18) c ± ,m | A j , B ( j − (cid:105) + N − (cid:88) k =1 c ± k,m | A j , B jk (cid:105) (cid:19) . (12)For each m = 0 , , . . . , M − N − − m = 0, for which theeigenvalue for both nontrivial eigenvectors is 1 and onlythe eigenvector having c , = − c , = 1 / √ M , c j, = 0for j ≥ | ψ init (cid:105) ; the othereigenstate with eigenvalue of 1 is the equal superposition.For m (cid:54) = 0 the non-trivial eigenvalues are λ ± m = e ± iω m with cos ω m = 1 − t [1 − cos( φ m )] , (13)and φ m = 2 πm/M , which implies that ω m (cid:39) (cid:112) t [1 − cos( φ m )] . (14)The corresponding (normalized) eigenstates are given by c ± ,m = ( c ∓ ,m ) ∗ = 1 (cid:112) M t (1 + cos ω m ) 1 − λ ± m λ ± m − e iφ m r (15)and c ± m,k = t/ (cid:112) M t (1 + cos ω m ) (16)for all other 2 ≤ k ≤ N − U , so that the state after 2 n steps is | ψ (2 n ) (cid:105) := U n | ψ init (cid:105) = M − (cid:88) m =0 , ± (cid:104) Ψ ± m | ψ init (cid:105) e ± inω m | Ψ ± m (cid:105) . (17)In general, let us try to find the amplitude for the statein the connection k + b (we start at connection k ). Thestates corresponding to the connection at k + b are | e ( b )+ (cid:105) = | A k +1+ b , B ( k + b )1 (cid:105) , | e ( b ) − (cid:105) = −| A k + b , B ( k + b )1 (cid:105) . (18)The corresponding amplitudes are E ( b ) ± (2 n ; M ) = (cid:104) e ( b ) ± | ψ (2 n ) (cid:105) = 1 √ M M − (cid:88) m =0 (cid:18) ∓ t m sin φ m sin ω m (cid:19) cos( nω m + bφ m ) , (19)where t m = (1 − δ m, ) t , and the success probability toget located in one of the states (18) is (see Fig. 2) p suc (2 n ) = (cid:104) E ( b )+ (2 n ; M ) (cid:105) + (cid:104) E ( b ) − (2 n ; M ) (cid:105) . (20)The analysis in Appendix A 2 shows that the restrictionto integer steps introduces only small errors to probabil-ity, which are of order 1 / √ N and, hence will not affectour results on efficiency that we shall present in the limitsof large N and M .The term proportional to t m in Eq. (19) is of order1 /N and we can set it to zero (in cases of large N ), while FIG. 2: Typical evolutions of the success probability to findthe next connection in the chain of stars for different startingstars connections with M = 11, N = 450—dark when startingnear the start vertex, medium gray when starting at the firstconnection, and light when starting in the connection of somemiddle (fifth and sixth) stars, or without correcting termsfrom reflections. Dots represent exact solution from Eq. (20),while the lines are approximations by Eq. (33). at the same time we can replace the sum with an inte-gral (taking M → ∞ ). Making use of Eq. (14) and theintegral representation for J n ( z ), the Bessel function ofthe first kind, J n ( z ) = 1 π (cid:90) π dθ cos( z sin θ − nz ) (21)we find the approximation E ( b ) ± (2 n ; M ) (cid:39) √ J b (2 n √ t ) . (22)This then gives us p suc (2 n ) (cid:39) J b (2 n √ t ). This approxi-mation works when M √ N (cid:29) n .We can immediately see the first result for b = 1,i.e. the neighboring connection. By taking 2 n √ t = π ,when J is close to its maximum, it is easy to prove thatboth success amplitudes are independent of both M and N and roughly 1 / √ / O (1). Hence, by starting on the ringwe will end on the next connection with probability of1 / O (1) rounds (roughly four onaverage) one finds the next connection. The number ofsteps needed is proportional to 2 n = π/ √ t = 4 n . As wecan now find connections successively, to find the wholepath requires an expected number of O ( M √ N ) steps,which improves the efficiency of the initial state of largesuperposition. V. EVOLUTION OF A LOCALIZED STATE ONA CHAIN OF STARS
We can use the previous result to obtain the successprobabilities also on a chain of stars. The π -phased reflec-tion on start and end vertices can be imagined as flows ofoppositely signed amplitudes of the same size from someparallel chain. We will thus simulate the evolution onthe chain of stars of length M by introducing a ring oflength 2 M . The correspondence is depicted in Figure 3.In the newly constructed ring graph we shall num-ber the stars corresponding to the chain in the sameway by numbers 1 , , . . . , M ; we call this half normal .The other half of the ring graph will be called the mir-ror part, and the stars are labeled by negative numbers − , − , . . . , − M . In this way each chain star k has a mir-roring counterpart − k . The numbering of the vertices isas follows: star centers A k and A − k are counterparts, asare B kl and B ( − k ) l for l = 2 , , . . . , N −
1. The only in-consistencies appear in the vertices B k , due to the fact,that we want to simulate the evolution on the chain byevolution on the ring; these vertices are paired in thefollowing way: • vertex “START”, previously labeled B , is con-nected to and identified with vertex B ( − of thechain, • vertex “END”, labeled B M , is connected to andidentified with vertex B ( − M − of the chain, • vertices B k for k = 1 , , . . . , M − B ( − k − .The first two vertices will now act as other star connec-tions, being purely transmissive. Having constructed aring graph corresponding to the chain graph G we nowspecify suitable states on it. a. Mirroring states on the ring graph. The idea be-hind the mapping is that now each edge state of the chaingraph has its own unique ring counterpart. We will con-struct these ring states by pairing states, one in eachpart of the ring. Namely, let us define the following (un-normalized) states, which consist of normal and mirrorparts, the span of which forms a subspace S of the wholering Hilbert space: | B kl , A k (cid:105) := | B kl , A k (cid:105) − | B ( − k ) l , A − k (cid:105) for l = 2 , , . . . , N − | A k , B kl (cid:105) := | A k , B kl (cid:105) − | A − k , B ( − k ) l (cid:105) for l = 2 , , . . . , N − | B k , A l (cid:105) := | B k , A l (cid:105) − | B ( − k − , A − l (cid:105) for l ∈ { k, k + 1 } , | A l , B k (cid:105) := | A l , B k (cid:105) − | A − l , B ( − k − (cid:105) for l ∈ { k, k + 1 } . (23)We shall refer to these states as mirroring states. FIG. 3: The correspondence between the chain of stars of length M (here M = 4) and the ring of stars of length 2 M . Thestate on the normal part of the ring (black) is complemented by a mirroring part (gray) of the same size but opposite sign tosimulate the reflections on vertices B and B M . Acting with the unitary for the ring, U , on these statesshows, that although these are states from the ring, theevolution, when restricted to the subspace S is the sameas the evolution on a chain. In particular: U | A k , B kl (cid:105) = | B kl , A k (cid:105) for l (cid:54) = 1, U | A k , B k (cid:105) = | B k , A k +1 (cid:105) for k (cid:54) = M , U | A M , B M (cid:105) = −| B M , A M (cid:105) ,U | A k , B ( k − (cid:105) = | B ( k − , A k − (cid:105) for k (cid:54) = 1, U | A , B (cid:105) = −| B , A (cid:105) . (24)The rest is described by the same equations as Eqs. (1)and (2), but with the mirroring (bar) versions of states.Now we have established that the evolution of the mir-roring state on the ring of stars is described by the sameequations as the evolution of the original state on thechain of stars when restricted to S . b. Resulting probabilities. Due to the symmetry ofthe subspace S , the amplitudes on the opposing edgestates in the ring are always of opposing sign and of thesame size. This means, that since we did not normal-ize the mirroring states, the squares of amplitudes onthe normal side of the ring sum up to 1 and provide allthe information about the probability distribution on thechain; i.e., we only need to measure the position of theparticle only on the normal side of the ring. At the sametime, the flow of the amplitude from and to the mirrorpart of the ring simulates the reflections on the vertices B and B M of the chain.Let us first consider an initial state (10) on the chain. The corresponding initial state on the mirroring ring is | ψ init (cid:105) = | A , B (cid:105) = | A , B (cid:105) − | A − , B (cid:105) . (25)This state is just the renormalized initial state of the typeof Eq. (11) on the ring and the success amplitudes andsuccess probabilities for the following connection ( b = 1are simply √ E (1) ± (2 n ; 2 M ) (cid:39) J (2 n √ t ) and p suc ( n ) (cid:39) J (2 n √ t ), respectively.Let us now consider an initial state (11) on the chain.The corresponding initial state on the mirroring ring is | ψ init (cid:105) = 1 √ | A k +1 , B k (cid:105) − | A k , B k (cid:105) )= 1 √ | A k +1 , B k (cid:105) − | A k , B k (cid:105)− | A − k − , B ( − k − (cid:105) + | A − k , B ( − k − (cid:105) ) . (26)The first two terms correspond to the normal part of thestate and the second two terms correspond to the mirrorpart of the state. The amplitudes for the connection b positions away from connection k are then composed oftwo terms. The first one coming from the normal partis E ( b ) ± (2 n ; 2 M ) with ± representing the two edges of theconnection on which we measure position: E ( b ) ± (2 n ; 2 M ) = (cid:104) e ( b ) ± | U n | ψ norm init (cid:105) . (27)Here | ψ norm init (cid:105) = 1 √ | A k +1 , B k (cid:105) − | A k , B k (cid:105) ) , (28)is the normal part of the initial state as in Eq. (11) and | e ( b ) ± (cid:105) are defined in Eq. (18). The mirror part of the stateneeds to travel a longer distance. If we go through thestart vertex, the mirror part has to traverse the distanceto the corresponding connection B and then back onthe normal part of the ring. The correction to the successamplitude is then given by E (2 k + b ) ± (2 n ; 2 M ), where E (2 k + b ) ± (2 n ; 2 M ) = (cid:104) e ( b ) ± | U n | ψ mirror init (cid:105) , (29)and | ψ mirror init (cid:105) = 1 √ | A − k , B ( − k − (cid:105) − | A − k − , B ( − k − (cid:105) ) , (30)is the mirror part of the initial state. The overall am-plitudes on the desired star connections are the sums ofthese terms, i.e. F ( b ) ± (2 n ; k ; M ) = E ( b ) ± (2 n ; 2 M ) + E (2 k + b ) ± (2 n ; 2 M ) . (31)The success probability for being located on the followingconnection on the chain ( b = 1) is then given as p suc (2 n ) = [ F + (2 n ; k ; M )] + [ F − (2 n ; k ; M )] , (32)where F ± (2 n ; k ; M ) := F (1) ± (2 n ; k ; M ). There is one ad-ditional caveat: when the measurement is performed onthe last star ( k + b = M ) the success probability in-cludes only the F + term and previous equations have tobe changed accordingly. c. Approximations. Let us consider b = 1 for sim-plicity. If we want to use an approximation for the am-plitudes in terms of Bessel functions as in Eq. (22), wehave to be careful. This approximation is based on taking M → ∞ , which means that it can be used to describewhat is happening at the beginning and middle of thechain, but will require modifications if we want to useit near the end vertex. In particular, it means that re-flections that take place at the end vertex are not takeninto account. Near the start vertex and for short times,including the optimal time 4 n , we have F ± (2 n ; k ; M ) (cid:39) J (2 n √ t ) + J k +1) (2 n √ t ) . (33)For short times of up to 4 n the Bessel functions are posi-tive, and they decrease rapidly with the increasing index.That means that in time 4 n the correction increases thesuccess probability and is observable in the vicinity ofthe start vertex (up to three stars away, as the numericalresults show) and does not change the efficiency of thesearch.Near the end vertex, when k is close to M , we mustdo something else. In particular, we can take advantageof a symmetry of ring amplitudes. Amplitudes on a ringof length 2 M obey E ( b ) ± ( n ; 2 M ) = E (2 M − b ) ∓ ( n ; 2 M ) . (34) Using this symmetry allows us to account for the reflec-tion from the end vertex. In particular, we can use it toreplace the second term in Eq. (33) giving us, F ± (2 n ; k ; M ) = E (1) ± (2 n ; 2 M ) + E (2 M − k − ± (2 n ; 2 M ) (cid:39) J (2 n √ t ) + J k (cid:48) − (2 n √ t ) , (35)where k (cid:48) = M − k is the distance from the end vertex. As k (cid:48) does not depend on M any more, the limit M → ∞ will not have an effect on it and so the term will faith-fully reconstruct the reflection of the walker from the endvertex in this limit. d. When the start vertex is unknown. We have as-sumed that the start vertex is known to us. This as-sumption lets us start at this vertex and uncover thepath connection by connection. However, this assump-tion may not hold. Let us lift this condition so that allwe require is the knowledge of the order of the stars; wecannot lift this condition because of the necessity of dif-ferent phases on different stars in all initial states. In thiscase we still know which star is the first one containingthe start vertex, but we do not know the location of thisvertex.Although in this case we do not have an analyticalsolution, numerical simulations show that we can startin other states that lead to the same speedup up to aconstant; the running time of single run is now insteadof 4 n halved to 2 n . For example, we can start in asmaller superposition on the first and second star, | ψ init (cid:105) = 1 √ N (cid:20) N − (cid:88) k =1 ( | A , B k (cid:105) − | A , B k (cid:105) )+( | A , B (cid:105) − | A , B (cid:105) ) (cid:21) . (36)This state localizes with high probability on the connec-tion between the two stars, but gets localized also on thestart vertex with probability around 1 / /
8. Therefore, repeating this setupseveral times will uncover the start vertex and the afore-mentioned connection. To uncover other connections, wecan now continue as in the previous case in which weknow the start vertex, or we can prepare a state on thenext two stars the connection of which we wish to find,which is analogous to the state in Eq. (36) with a com-plete superposition of all edge states on the stars withphases on one of the stars being +1 and on the otherstar being −
1. Such a setup reveals both neighboringconnections with probability 1 /
8, unless there is no fur-ther connection in one of these direction, i.e., we are atthe start or end vertices; these are obtained with proba-bility 1 /
2. All the probabilities mentioned in this para-graph depend neither on the number of spokes, N , noron the number of stars, M .Hence, even if the start vertex is unknown, we canuncover the whole path with the same efficiency as inthe case in which it is known. VI. CONCLUSION
We have investigated a task of finding a path in a mazethat was a chain of M stars with N spokes. The sim-ple approach, starting in the phase-modulated equally-weighed superposition of all states, is reducible to theGrover search, which localizes the state on the whole pathin O ( √ N ) steps. Measurement then reveals a single el-ement of this path at random. By repeating this searchwe can recover the whole path in O ( M √ N log M ) stepson average.The preparation of the highly superposed initial statefor this task may be, however, difficult. We have shownthat we can recover the path star by star by successivesearches of O ( √ N ) steps and improve on the overall ef-ficiency as well. First, we start at the beginning of thepath and uncover the first star connection. To reveal thenext connection, with high probability we then repeatthe algorithm but start in a state localized on the newlyacquired connection. The whole path is then obtained in O ( M ) successive searches leading to O ( M √ N ) steps forthe whole process.The solution in this case cannot be obtained directlyby reducing the dimensionality of the problem; an inter-mediate step is necessary. We can replace the task onthe chain with the task on a ring of twice the length, forwhich the periodicity allows us to solve the problem an-alytically. This result can be then used to find an exactanalytical result for the successive search on the chain ofstars with the efficiency of O ( M √ N ). Acknowledgments
D.R. was financed by SASPRO ProgramNo. 0055/01/01 project QWIN, cofunded by theEuropean Union and Slovak Academy of Sciences.D.R. also acknowledges support from VEGA 2/0151/15project QWIN and APVV-14-0878 project QETWORK.M.H. and D.K. were supported by a grant from the JohnTempleton Foundation.
Appendix A: Corrections to the success probability1. Initial state of large superposition
In the case presented in Sec. III after a time of 2 n thesuccess probability to find an element from the path is p suc (2 n ) = 1. But 2 n is a real number in general, whilethe number of steps n has to be an integer. Choosinginteger n such that 2 n is the closest to 2 n introducesan error we would like to quantify. In order to do so, letus study a more general situation, namely, having done2 n steps (where we allow now “steps” to be also realnumbers), how much the success probability changes ifwe make 2( n + ε ) steps with ε ∈ [ − , n . In particular, we are interested in quantity∆ ε (2 n ) = | p suc (2 n ) − p suc (2( n + ε )) | . (A1)In our case p suc (2 n ) = sin (cid:2) (2 n + 1) θ (cid:3) with cos θ =1 − /N ; we included also the effect of small overlap ofthe initial state with the eigenvector | ψ (cid:105) . After somemanipulation we obtain∆ ε (2 n ) = | sin[(2 n + 1 + ε ) θ ] sin εθ | ≤ | sin εθ | ≤ sin θ, (A2)where the last inequality holds because θ is small. Sub-stituting for θ gives∆ ε (2 n ) ≤ (cid:114) N . (A3)Hence, in general, the error in the success probabilityfor time differences smaller than one step decreases as1 / √ N . In the optimum case, when 2 nθ = π the boundis even stricter as the first part of Eq. (A2) gives∆ ε (2 n ) ≤ sin θ = 8 N . (A4)
2. Localized initial state
In the case presented in Sec. IV we are again interestedin quantity ∆ ε (2 n ) from Eq. (A1), but now the successprobability is given by Eq. (20). After some simple ma-nipulation we get∆ ε (2 n ) ≤ Q + , + ,ε (2 n ) Q + , − ,ε (2 n )+ Q − , + ,ε (2 n ) Q − , − ,ε (2 n ) , (A5)where Q p, ± ,ε (2 n ) = | E p (2 n ) ± E p (2( n + ε )) | , (A6)and p = ± and E ± (2 n ) are given by Eq. (19); we droppedupper index b as it will have no consequences in thiscomputation.Using the specific form of Eq. (19), we can now write Q p, ± ,ε (2 n ) ≤ √ M M − (cid:88) m =0 | a pm | · (cid:12)(cid:12) cos( nω m + φ ) ± cos(( n + ε ) ω m + φ ) (cid:12)(cid:12) , (A7)where we used notation φ = bφ m for simplicity and a ± m = 1 ∓ t m sin φ m sin ω m . (A8)The modulus of a ± m can be bounded, irrespective of thesign of the upper index and lower index m , as (cid:12)(cid:12) a ± m (cid:12)(cid:12) ≤ | sin φ m | N sin ω m = 1 + (cid:115) φ m N − φ m ≤ (cid:114) N − ≤ . (A9)We can immediately obtain Q ± , + ,ε (2 n ) ≤ √ M M − (cid:88) m =0 √ . (A10)For Q ± , − ,ε (2 n ) we use inequality | cos( nω m + φ ) − cos(( n + ε ) ω m + φ ) | = 2 (cid:12)(cid:12)(cid:12) sin (cid:104) (2 n − ε ) ω m φ (cid:105) sin εω m (cid:12)(cid:12)(cid:12) ≤ (cid:12)(cid:12)(cid:12) sin εω m (cid:12)(cid:12)(cid:12) ≤ ω m (cid:114) N , (A11)where in the last inequality we used the fact that ω m issmall. Now, Q ± , − ,ε (2 n ) ≤ √ M M − (cid:88) m =0 √ √ N = 4 √ N . (A12)Putting all the partial results together into Eq. (A5)we finally find that ∆ ε (2 n ) ≤ √ N . (A13)So the error in the success probability that emerges whentaking an integer number of steps decreases as 1 / √ N . Appendix B: Recovering the path when starting in alarge superposition
The case of an initial state in a large superpositionfrom Sec. III localizes the state of the walker on the pathbetween the start and the end vertices. A measurementthen reveals one connection at random. Here we willshow that the whole path can be recovered in M log M repetitions of the search, where M is the number of stars.First, let us suppose that the probability to find anunknown connection is p . The average number of repeti-tions we need to make is then¯ r = ∞ (cid:88) r =1 (1 − p ) r − pr = p [1 − (1 − p )] = 1 p , (B1) where we used formula ∞ (cid:88) j =1 q j − j = ddq ∞ (cid:88) j =0 q j = 1(1 − q ) . (B2)Now, let us analyze the situation of uncovering thewhole path. Suppose we know k connections already,then the probability to uncover an unknown connectionis p k = ( M − k ) /M . Then, by Eq. (B1) we need¯ r k = 1 p k = MM − k (B3)repetitions on average to find that connection. The over-all number of repetitions is the sum of these,¯ r = M − (cid:88) k =0 ¯ r k = M M (cid:88) k =1 k . (B4)The last sum is a truncated harmonic series which canbe bounded from above by an integral, which gives¯ r ≤ M + M (cid:90) M k dk = M log M + M. (B5)The number of repetitions needed to recover the wholepath is then of order M log M .In our particular case the inclusion of start and end ver-tices poses only a slight complication. First we can con-sider them to form together another connection. Overallwe then have M connections, which we will recover in O ( M log M ) repetitions by Eq. (B5). After this manysteps (on average) we have recovered all connections andin the worst-case scenario only the start or the end vertex.The probability to find the other one is now p = (2 M ) − ;this requires an additional 2 M steps on average, whichdoes not change the complexity. [1] Y. Aharonov, L. Davidovich, and N. Zagury, Phys. Rev.A , 1687 (1993).[2] D. Aharonov, A. Ambainis, J. Kempe, and U. Vazirani,STOC 01:Proceedings of 33rd annual ACM Symposiumon the Theory of Computing, 50-59 (ACM, New York,2001).[3] D. Reitzner, D. Nagaj, and V. Buˇzek, Acta Physica Slo-vaka , 603 (2011)[4] K. Manoucheri and J. Wang, Physical Implementationsof Quantum Walks (Springer, Heidelberg, 2014).[5] E. Farhi and S. Gutmann, Phys. Rev. A
915 (1998). [6] F.M. Andrade, M.G.E. da Luz, Phys. Rev. A ,032314 (2003).[8] N. Shenvi, J. Kempe, and K. Birgitta Whaley, Phys. Rev.A , 052307 (2003).[9] V. Potoˇcek, A. G´abris, T. Kiss, and I. Jex, Phys. Rev. A , 012325 (2009).[10] S. Aaronson and A. Ambainis, in Proceedings of the 44thIEEE Symposium on Foundations of Computer Science(IEEE, Los Alamitos, 2003), pp. 200-209. [11] A. M. Childs and J. Goldstone, Phys. Rev. A , 022314(2004).[12] D. Reitzner, M. Hillery, E. Feldman, and V. Buˇzek, Phys.Rev. A , 012323 (2009).[13] M. Hillery, D. Reitzner, and V. Buˇzek, Phys. Rev. A ,062324 (2010).[14] N. B. Lovett, M. Everitt, R. M. Heath, and V. Kendon,archive:1110.4366.[15] J. Lee, Hai-Woong Lee and M. Hillery, Phys. Rev. A ,022318 (2011).[16] E. Feldman, M. Hillery, Hai-Woong Lee, D. Reitzner,Hongjun Zheng, and V. Buˇzek, Phys. Rev. A ,040301(R) (2010).[17] M. Hillery, Honjun Zheng, E. Feldman, D. Reitzner, andV. Buˇzek, Phys. Rev. A 85, 062325 (2012).[18] S. Cottrell and M. Hillery, Phys. Rev. Lett. , 030501(2014).[19] S. Cottrell, J. Phys. A , 035304 (2015).[20] H.B. Perets, Y. Lahini, F. Pozzi, M. Sorel, R. Moran-dotti, and Y. Silberberg, Phys. Rev. Lett. , 170506(2008).[21] H. Schmitz, R. Matjeschk, C. Schneider, J. Glueckert,M. Enderlein, T. Huber, and T. Schaetz, Phys. Rev.Lett. , 090504 (2009).[22] M. Karski, L. Forster, J.-M. Choi, A. Steffen, W. Alt, D. Meschede, and A. Widera, Science , 174–177(2009).[23] A. Schreiber, K. N. Cassemiro, V. Potoˇcek, A. G´abris,P.J. Mosley, E. Andersson, I. Jex, and Ch. Silberhorn,Phys. Rev. Lett. , 050502 (2010).[24] A. Peruzzo, M. Lobino, J. C. F. Matthews, N. Matsuda,A. Politi, K. Poulios, X. Q. Zhou, Y. Lahini, N. Ismail,K. W¨orhoff, Y. Bromberg, Y. Silberberg, M. G. Thomp-son, and J. L. O’Brien, Science , 1500, (2010).[25] A. Schreiber, A. G´abris, P. Rohde, K. Laiho,M. ˇStefaˇn´ak, V. Potoˇcek, C. Hamilton, I. Jex, andCh. Silberhorn, Science , 55 (2012).[26] B. Hein and G. Tanner, Phys. Rev. Lett. , 260501(2009).[27] M. ˇStefaˇn´ak and S. Skoup´y, Phys. Rev. A , 022301(2016).[28] M. ˇStefaˇn´ak and S. Skoup´y, Quantum Inf. Process.
72 (2017).[29] L.K. Grover, Phys. Rev. Lett.
325 (1997).[30] H. Krovi and T. A. Brun, Phys. Rev. A , 062332(2007).[31] M. Kieferov´a, D. Nagaj, Int. J. Quantum Inf.10,