Open Access

Deterministic Search on Complete Bipartite Graphs by Continuous-Time Quantum Walk

 and   
Oct 14, 2024

Cite
Download Cover

Introduction

Quantum walk is a fundamental and powerful tool for designing quantum algorithms that outperform the classical counterparts, such as searching [1,2], element distinctness [3], and graph isomorphism [4]. Various models have been put forward for undirected graphs [5] or directed graphs [6,7]. It has been demonstrated that they are universal for quantum computing [8,9] and can be implemented in a variety of physical systems [10,11,12].

Quantum walk serves as a natural algorithmic framework for spatial search, that is, finding marked vertices on a given graph. Search problem is one of the most important problems in computer science. Many of the computation tasks can be reduced to search problems or invoke search algorithms as a subroutine. One early milestone in quantum computation is Grover's celebrated algorithm for search in an unstructured database [13]. Since then, extensive research has been conducted to enhance and generalize Grover's algorithm. There are two avenues of investigation. One is to de-randomize the original algorithm, making the search exact [14,15]. Since error probability becomes negligible only when the database becomes sufficiently large, determinacy is vital in problems where the search space is relatively small. It also simplifies error analysis when the algorithm is used as a subroutine. Moreover, derandomization holds inherent value in itself. For example, deterministic quantum algorithms indicate that quantum computation is not essentially probabilistic. On the other hand, Grover's unstructured search can be formulated as quantum walk search on a complete graph [16,17], another research field is devising algorithms for search on other classes of graphs, such as hypercubes [18], lattices [18,19], and even general graphs [1,2,20].

We pursue both of these two directions here, searching on graphs and searching with certainty. Marsh and Wang [21] gave the first nontrivial deterministic spatial search algorithm, called alternating quantum walk, which is to search on 2 × n Rook graphs. Employing the same alternating quantum walk framework, Qu et al. [22] proposed a deterministic search algorithm on star graphs and gave the first experimental demonstration. Utilizing the parity of integers, Wang et al. [23] reported a universal algorithm via alternating quantum walk that works for graphs with integer Laplacian spectra. Recently, Peng et al. [24] presented a spatial search algorithm on complete bipartite graphs by the coined quantum walk model. See Table 1 for a summary.

Comparison of previous results and our work on deterministic spatial search.

Algorithms Graph Model Number of marked vertices
Marsh and Wang [21] 2 × n Rook graph Alternating CTQW Single
Qu et al. [22] Star graph Alternating CTQW Single
Wang et al. [23] Integer Laplacian spectra Alternating CTQW Multiple
Peng et al. [24] Complete bipartite graph Coined DTQW Multiple
Our work Complete bipartite graph CTQW Multiple

In this paper, we employ continuous-time quantum walk to construct a deterministic search algorithm on complete bipartite graphs. This class of graphs has been broadly studied due to its special structure and rich properties, such as biclique cryptanalysis [25] and state transfer [26,27]. Search on complete bipartite graphs has been explored in different cases. Wong et al. [28] studied the distinction between Laplacian and adjacency matrix as the Hamiltonian operator in continuous-time quantum walk search by analyzing searches on the complete partite graphs, while Rhodes and Wong [29] investigated how discrete-time quantum walk searches the complete bipartite graphs with different initial states. The calculation of the algorithmic parameter (runtime) of these two works varies according to the size of the two partite sets and the arrangement of the marked vertices. As shown in Section 3 (Theorem 1), our algorithm does not depend on a case-by-case analysis. Besides, the success probabilities of these algorithms are strictly less than 1 or only reach 1 asymptotically. See Table 2 for a comparison.

Comparison of previous results and our work on spatial search on complete bipartite graphs.

Algorithms Model Initial state Success probability
Wong et al. [28] CG framework for Laplacian walk i=0m+n1|i \sum\nolimits_{i = 0}^{m + n - 1} |i\rangle 1 (m, n → ∞)
CG framework for adjacency walk 12miV1|i+12niV2|i {1 \over {\sqrt {2m}}}\sum\nolimits_{i \in {V_1}} |i\rangle + {1 \over {\sqrt {2n}}}\sum\nolimits_{i \in {V_2}} |i\rangle 1 (m, n → ∞)
Rhodes and Wong [29] Coined DTQW 1m+n(iV1|i1njV2|j+iV2|i1mjV1|j) {1 \over {\sqrt {m + n}}}\left({\sum\nolimits_{i \in {V_1}} |i\rangle \otimes {1 \over {\sqrt n}}\sum\nolimits_{j \in {V_2}} |j\rangle +} \right.\left. {\sum\nolimits_{i \in {V_2}} |i\rangle \otimes {1 \over {\sqrt m}}\sum\nolimits_{j \in {V_1}} |j\rangle} \right) mm+n {m \over {m + n}} or nm+n {n \over {m + n}} (and 1 for a special case)
12mn(i=0m+n1|iji|j) {1 \over {\sqrt {2mn}}}\left({\sum\nolimits_{i = 0}^{m + n - 1} |i\rangle \otimes \sum\nolimits_{j \sim i} |j\rangle} \right) 12 {1 \over 2} (and 1 for a special case)
Xu et al. [30] Coined DTQW 12mn(i=0m+n1|iji|j) {1 \over {\sqrt {2mn}}}\left({\sum\nolimits_{i = 0}^{m + n - 1} |i\rangle \otimes \sum\nolimits_{j \sim i} |j\rangle} \right) ≥ 1 − ɛ for any adjustable parameter ɛ
Our work CTQW 1miV1|i {1 \over {\sqrt m}}\sum\nolimits_{i \in {V_1}} |i\rangle or 1niV2|i {1 \over {\sqrt n}}\sum\nolimits_{i \in {V_2}} |i\rangle 1

We consider the general case of multiple marked vertices. As pointed out in [31], knowing the number of solutions is necessary to deterministically find a marked vertex with quadratic speedup. Therefore, we assume the knowledge of the number of marked vertices. For the case of this quantity being unknown, there comes the Soufflé problem, that is, one might iterate too little or too much, rendering the algorithm unsuccessful. There are two strategies to deal with this issue. One is constructing a robust (also called fixed-point) quantum search algorithm [30], which can find a marked vertex with probability at least 1 − ɛ for any adjustable parameter ɛ whenever the number of search steps is larger than some threshold value. Another strategy is devising a quantum counting algorithm to estimate the number of marked vertices first and then employ the search algorithm. In this work, we utilize our search operator to design a quantum counting algorithm.

Approximate counting is one of the most fundamental problems in computer science. It has applications, for example, to the solution of NP-complete problems, which may be phrased in terms of the existence of a solution to a search problem [32]. Recently, Bezerra et al. [33] presented a quantum counting algorithm on complete bipartite graphs based on discrete-time quantum walk. The quantum walk dynamics has an eight-dimensional invariant subspace and the eigenvalues of the reduced operator separate into two nonequivalent classes. Our search operator has a simpler spectrum structure, consisting of −1 and a conjugate pair. Since the conjugate eigenvalues encode the information of the number of marked vertices, we employ quantum phase estimation to estimate the number of marked vertices, which is a nontrivial generalization of the quantum counting algorithm for Grover's unstructured search.

The rest of the paper is organized as follows. In Section 2, we introduce the concept of continuous-time quantum walk and the search oracle used in our algorithm. We present our main result, the deterministic search algorithm on complete bipartite graphs in Section 2, and give the quantum counting algorithm on complete the bipartite graphs based on our search operator in Section 4. In Section 5, we implement the search algorithm in the quantum circuit model and simulate it on the IBM quantum computing platform qiskit. We discuss some related issues in Section 6 and conclude our result in Section 7.

Preliminary
Continuous-Time Quantum Walk

There are two types of quantum walks: discrete- and continuous-time. In this work we focus on the continuous-time quantum walk, which is a natural analog of the classical continuous-time random walk. Given a graph G = (V, E) with |V| = n, let pj(t) be the probability associated with vertex j at time t and P(t) = (p1(t),…,pn(t))T. A continuous-time random walk over G is a stochastic Markovian process that evolves as per the master equation ddtP(t)=LP(t), {{\rm{d}} \over {{\rm{d}}t}}P(t) = LP(t), which can be seen as a discrete analog of the diffusion equation 1kut=Δu {1 \over k}{{\partial u} \over {\partial t}} = \Delta u . Here L is the discrete Laplacian of the graph (a discrete approximation of the Laplacian operator Δ in the continuum). The solution of this differential equation can be given in closed form as P(t)=eLtP(0). P(t) = {e^{Lt}}P(0). Note that equation (1) closely resembles the Schrödinger equation iddt|ψ=H|ψ, i{{\rm{d}} \over {{\rm{d}}t}}|\psi \rangle = H|\psi \rangle, except that equation (1) lacks the factor of i. A continuous-time quantum walk is then defined as the unitary process that evolves as per the Schrödinger equation (3) under any Hermitian Hamiltonian that respects the structure of G. We choose H to be the adjacency matrix of the graph in this paper, and the solution of equation (3) can be given in closed form as |ψ(t)=eiAt|ψ(0). |\psi (t)\rangle = {{\rm{e}}^{- iAt}}|\psi (0)\rangle.

Graph Notation and Search Oracle

A complete bipartite graph Km, n is one whose vertex set V can be divided into two subsets V = V1V2 and V1V2 = ∅ with |V1| = m and |V2| = n, and whose edge set E = {{u, v} : uV1, vV2}. For quantum search on graphs, the corresponding Hilbert space is span{|0〉, |1〉, … , |m + n − 1〉}. We assume the marked vertices only occur in, say, the order-n part V2 of the graph and denote the uniform superposition of the k marked vertices as |w=1ki=mm+k1|i |w\rangle = {1 \over {\sqrt k}}\sum\nolimits_{i = m}^{m + k - 1} |i\rangle . This assumption is equivalent to saying that the oracle is local, acting on the subspace corresponding to the order-n part: O={I,inspan{|0,,|m1},2|ww|I,inspan{|m,,|m+n1}. O = \left\{{\matrix{{I,\,{\kern 1pt} {\rm{in}}\,{\rm{span}}\{|0\rangle, \ldots,|m - 1\rangle \},} \hfill \cr {2|w\rangle \langle w| - I,\,{\rm{in}}\,{\rm{span}}\{|m\rangle, \ldots,|m + n - 1\rangle \}.} \hfill \cr}} \right. (Note that the definition differs from the standard definition by a phase −1.) In fact, such an oracle can be simulated by a standard global oracle. The standard oracle Õ is defined by making use of an oracle qubit |q〉: |i|qO˜|i|qf(i), |i\rangle |q\rangle \mathop \to \limits^{\widetilde O} |i\rangle |q \oplus f(i)\rangle, f(i) equals 1 if vertex i is marked and equals 0 otherwise. If the oracle qubit is initially in the state |=|0|12 | - \rangle = {{|0\rangle - |1\rangle} \over {\sqrt 2}} , then the action of the oracle is |i|O˜(1)f(x)|i|, |i\rangle | - \rangle \mathop \to \limits^{\widetilde O} {(- 1)^{f(x)}}|i\rangle | - \rangle, leaving the oracle qubit unchanged. We append an ancillary qubit |b〉 to indicate which part a state belongs to: |b = 0〉|v〉 means that |v〉 is in the order-m part and |b = 1〉|v〉 means that |v〉 is in the order-n part. This is possible since the underlying graph is assumed to be known. Let CjZ be the Z gate controlled by the ancilla being in state |b = j〉 with target on the oracle qubit. The local oracles are implemented by Oj=CjZO˜CjZ {O_j} = - {C_j}Z \cdot \widetilde O \cdot {C_j}Z with the oracle qubit initiated in |+=|0+|12 | + \rangle = {{|0\rangle + |1\rangle} \over {\sqrt 2}} state [33]. O1 is then the oracle in equation (5) and the corresponding circuit is shown in Figure 1.

Figure 1.

Quantum circuit implementation for the oracle in (5)

In the general case of marked vertices distributing in both partite sets, one can search in two steps, first for the marked vertices in one part (with the corresponding local oracle) and then for the other part. Our quantum walk search operator is U(t)=eiAtO, U(t) = {e^{- iAt}}O, where A is the adjacency matrix of the complete bipartite graph.

Deterministic Spatial Search Algorithm

Grover's original search algorithm is the iteration of the operator G = (I − 2|ψ〉〈ψ|)O, where O denotes the oracle and |ψ〉 is the uniform superposition of all states. One of the deterministic versions of Grover's search is to introduce an arbitrary phase to the reflection (I − 2|ψ〉〈ψ|), obtaining a generalized search operator G(α) = (I − (1 − e)|ψ〉〈ψ|)O [34]. By choosing an appropriate phase α and iteration number, one can obtain a final state that is the superposition of all marked vertices. Our search operator is a further generalization, replacing the Grover diffusion operator (I − 2|ψ〉〈ψ|) with a quantum walk operator on complete bipartite graphs. By setting an appropriate walk time and iteration number, the system will reach a final state of superposition of all marked states.

Let |s=1mi=0m1|i |s\rangle = {1 \over {\sqrt m}}\sum\nolimits_{i = 0}^{m - 1} |i\rangle be the uniform superposition of states corresponding to the order-m part, and |w¯=1nki=m+km+n1|i |\overline w \rangle = {1 \over {\sqrt {n - k}}}\sum\nolimits_{i = m + k}^{m + n - 1} |i\rangle be the complement of |w〉 in the order-n part. These three states group together vertices that evolve identically by symmetry, thus span{|s〉, |w, |〉} is an invariant subspace of A, with the reduced adjacency matrix in this subspace being A=(0mkm(nk)mk00m(nk)00). A = \left({\matrix{0 & {\sqrt {mk}} & {\sqrt {m(n - k)}} \cr {\sqrt {mk}} & 0 & 0 \cr {\sqrt {m(n - k)}} & 0 & 0 \cr}} \right). This matrix has eigenvalues 0, ±mn \pm \sqrt {mn} with eigenvectors |v0=nkn|wkn|w¯,|v±mn=12|s±k2n|w±nk2n|w¯, \matrix{{|{v_0}\rangle = \sqrt {{{n - k} \over n}} |w\rangle - \sqrt {{k \over n}} |\overline w \rangle,} \hfill \cr {|{v_{\pm \sqrt {mn}}}\rangle = {1 \over {\sqrt 2}}|s\rangle \pm \sqrt {{k \over {2n}}} |w\rangle \pm \sqrt {{{n - k} \over {2n}}} |\overline w \rangle,} \hfill \cr} where the subscripts are the corresponding eigenvalues.

From this spectrum decomposition, we have eiAt=|v0v0|+eitmn|vmnvmn|+eitmn|vmnvmn|=(cos(mnt)iknsin(mnt)inknsin(mnt)iknsin(mnt)nkn+kncos(mnt)k(nk)n(1cos(mnt))inknsin(mnt)k(nk)n(1cos(mnt))kn+nkncos(mnt)). \matrix{{{e^{- iAt}}} \hfill & {= |{v_0}\rangle \langle {v_0}| + {e^{- it\sqrt {mn}}}|{v_{\sqrt {mn}}}\rangle \langle {v_{\sqrt {mn}}}| + {e^{it\sqrt {mn}}}|{v_{- \sqrt {mn}}}\rangle \langle {v_{- \sqrt {mn}}}|} \hfill \cr {} \hfill & {= \left({\matrix{{\cos (\sqrt {mn} t)} & {- i\sqrt {{k \over n}} \sin (\sqrt {mn} t)} & {- i\sqrt {{{n - k} \over n}} \sin (\sqrt {mn} t)} \cr {- i\sqrt {{k \over n}} \sin (\sqrt {mn} t)} & {{{n - k} \over n} + {k \over n}\cos (\sqrt {mn} t)} & {- {{\sqrt {k(n - k)}} \over n}(1 - \cos (\sqrt {mn} t))} \cr {- i\sqrt {{{n - k} \over n}} \sin (\sqrt {mn} t)} & {- {{\sqrt {k(n - k)}} \over n}(1 - \cos (\sqrt {mn} t))} & {{k \over n} + {{n - k} \over n}\cos (\sqrt {mn} t)} \cr}} \right).} \hfill \cr} It follows that U(t)=(cos(mnt)iknsin(mnt)inknsin(mnt)iknsin(mnt)nkn+kncos(mnt)k(nk)n(1cos(mnt))inknsin(mnt)k(nk)n(1cos(mnt))knnkncos(mnt)). U(t) = \left({\matrix{{\cos (\sqrt {mn} t)} & {- i\sqrt {{k \over n}} \sin (\sqrt {mn} t)} & {i\sqrt {{{n - k} \over n}} \sin (\sqrt {mn} t)} \cr {- i\sqrt {{k \over n}} \sin (\sqrt {mn} t)} & {{{n - k} \over n} + {k \over n}\cos (\sqrt {mn} t)} & {{{\sqrt {k(n - k)}} \over n}(1 - \cos (\sqrt {mn} t))} \cr {- i\sqrt {{{n - k} \over n}} \sin (\sqrt {mn} t)} & {- {{\sqrt {k(n - k)}} \over n}(1 - \cos (\sqrt {mn} t))} & {- {k \over n} - {{n - k} \over n}\cos (\sqrt {mn} t)} \cr}} \right).

Solving the characteristic polynomial det(λIU)=(λ+1)(λ2[2n2kn+2kncos(mnt)]λ+1) \det (\lambda I - U) = (\lambda + 1)({\lambda^2} - [{{2n - 2k} \over n} + {{2k} \over n}\cos (\sqrt {mn} t)]\lambda + 1) , we obtain the eigenphases π,θ±=±2arcsin(knsin(mnt2)). \pi,{\kern 1pt} {\theta_ \pm} = \pm 2\arcsin \left({\sqrt {{k \over n}} \sin ({{\sqrt {mn} t} \over 2})} \right). The corresponding eigenvectors are |v1=1N(inknsin(mnt2)|s+cos(mnt2)|w¯),|v±=1N(12cos(mnt2)|s121knsin2(mnt2)|wi12nknsin(mnt2)|w¯), \matrix{{} \hfill & {|{v_{- 1}}\rangle = {1 \over N}(- i\sqrt {{{n - k} \over n}} \sin ({{\sqrt {mn} t} \over 2})|s\rangle + \cos ({{\sqrt {mn} t} \over 2})|\overline w \rangle),} \hfill \cr {} \hfill & {|{v_ \pm}\rangle = {1 \over N}({1 \over {\sqrt 2}}\cos ({{\sqrt {mn} t} \over 2})|s\rangle \mp {1 \over {\sqrt 2}}\sqrt {1 - {k \over n}\mathop {\sin}\nolimits^2 ({{\sqrt {mn} t} \over 2})} |w\rangle - i{1 \over {\sqrt 2}}\sqrt {{{n - k} \over n}} \sin ({{\sqrt {mn} t} \over 2})|\overline w \rangle),} \hfill \cr} where N=1knsin2(mnt2) N = \sqrt {1 - {k \over n}\mathop {\sin}\nolimits^2 ({{\sqrt {mn} t} \over 2})} is the normalization factor. Define matrices V = (|v−1〉 |v+〉 |v〉) and D = diag{e, e+, e}, then Ul=VDlV. {U^l} = V{D^l}{V^\dagger}.

Since |s〉 is not the superposition of all states, we perform a preprocessing step, evolving |s〉 through the walk operator for time t2 {t \over 2} (the 12 {1 \over 2} factor is chosen to facilitate the computation below): eiAt2|s=cos(mnt2)|siknsin(mnt2)|winknsin(mnt2)|w¯. \matrix{{{e^{- iA{t \over 2}}}|s\rangle =} \hfill & {\cos ({{\sqrt {mn} t} \over 2})|s\rangle - i\sqrt {{k \over n}} \sin ({{\sqrt {mn} t} \over 2})|w\rangle - i\sqrt {{{n - k} \over n}} \sin ({{\sqrt {mn} t} \over 2})|\overline w \rangle.} \hfill \cr} Using this state as the initial state, we evolve it through the unitary U(t), and then by an appropriate choice of the time t and the iteration number l, we hope that the final state UleiAt2|s {U^l}{e^{- iA{t \over 2}}}|s\rangle have a unit overlap with |w〉.

We evaluate the value of w|UleiAt2|s \langle w|{U^l}{e^{- iA{t \over 2}}}|s\rangle by using the matrix representation of the states and operators in the subspace: w|UleiAt2|s=(0,1,0)VDlVeiAt2|s=(0,12,12)DlVeiAt2|s=(0,12eilθ,12eilθ)VeiAt2|s=(i1Ncos(mnt2)sin(lθ),cos(lθ),1Nnknsin(mnt2)sin(lθ))eiAt2|s=i[1knsin2(mnt2)sin(lθ)+knsin(mnt2)cos(lθ)]. \matrix{{\langle w|{U^l}{e^{- iA{t \over 2}}}|s\rangle} \hfill & {= (0,1,0)V{D^l}{V^\dagger}{e^{- iA{t \over 2}}}|s\rangle} \hfill \cr {} \hfill & {= \left({0, - {1 \over {\sqrt 2}},{1 \over {\sqrt 2}}} \right){D^l}{V^\dagger}{e^{- iA{t \over 2}}}|s\rangle} \hfill \cr {} \hfill & {= \left({0, - {1 \over {\sqrt 2}}{e^{il\theta}},{1 \over {\sqrt 2}}{e^{- il\theta}}} \right){V^\dagger}{e^{- iA{t \over 2}}}|s\rangle} \hfill \cr {} \hfill & {= \left({- i{1 \over N}\cos ({{\sqrt {mn} t} \over 2})\sin (l\theta),\cos (l\theta),{1 \over N}\sqrt {{{n - k} \over n}} \sin ({{\sqrt {mn} t} \over 2})\sin (l\theta)} \right){e^{- iA{t \over 2}}}|s\rangle} \hfill \cr {} \hfill & {= - i\left[ {\sqrt {1 - {k \over n}\mathop {\sin}\nolimits^2 ({{\sqrt {mn} t} \over 2})} \sin (l\theta) + \sqrt {{k \over n}} \sin ({{\sqrt {mn} t} \over 2})\cos (l\theta)} \right].} \hfill \cr}

Here we make a variable substitution sin(mnt2)=nksin(π2x). \sin ({{\sqrt {mn} t} \over 2}) = \sqrt {{n \over k}} \sin \left({{\pi \over 2}x} \right). It follows that 1knsin2(mnt2)=cos(π2x) \sqrt {1 - {k \over n}\mathop {\sin}\nolimits^2 ({{\sqrt {mn} t} \over 2})} = \cos ({\pi \over 2}x) and θ=2arcsin(knsin(mnt2))=πx. \theta = 2\arcsin \left({\sqrt {{k \over n}} \sin ({{\sqrt {mn} t} \over 2})} \right) = \pi x. The overlap now is iw|UleiAt2|s=sin(lθ)cos(π2x)+cos(lθ)sin(π2x)=sin(lθ+π2x)=sin[(2l+1)π2x]. \matrix{{i\langle w|{U^l}{e^{- iA{t \over 2}}}|s\rangle} \hfill & {= \sin (l\theta)\cos ({\pi \over 2}x) + \cos (l\theta)\sin ({\pi \over 2}x)} \hfill \cr {} \hfill & {= \sin (l\theta + {\pi \over 2}x)} \hfill \cr {} \hfill & {= \sin [(2l + 1){\pi \over 2}x].} \hfill \cr} Therefore, setting x=12l+1 x = {1 \over {2l + 1}} , or equivalently, t=2mnarcsin[nksin(π2x)]=2mnarcsin[nksin(π2(2l+1))], \matrix{{t =} \hfill & {{2 \over {\sqrt {mn}}}\arcsin [\sqrt {{n \over k}} \sin ({\pi \over 2}x)]} \hfill \cr = \hfill & {{2 \over {\sqrt {mn}}}\arcsin [\sqrt {{n \over k}} \sin ({\pi \over {2(2l + 1)}})],} \hfill \cr} we have |w|UleiAt2|s|=1 |\langle w|{U^l}{e^{- iA{t \over 2}}}|s\rangle | = 1 . Note that nksin(π2(2l+1))1 \sqrt {{n \over k}} \sin ({\pi \over {2(2l + 1)}}) \le 1 from equation (21), that is, π2(2l+1)arcsinkn, {\pi \over {2(2l + 1)}} \le \arcsin \sqrt {{k \over n}}, let π2(2l+1)kn {\pi \over {2(2l + 1)}} \le \sqrt {{k \over n}} , that is, the requirement on l is lπ4nk12, l \ge {\pi \over 4}\sqrt {{n \over k}} - {1 \over 2}, then since x < arcsin x for 0 < x < 1, equation (22) is satisfied.

We formalize the above result into a theorem and thus obtain our deterministic spatial search algorithm (see Algorithm 1).

Algorithm 1 : Deterministic search algorithm on complete bipartite graphs.
Input: A complete bipartite graph Km,n with k marked vertices on the order-n part whose adjacency matrix is A, an oracle O that satisfies equation (5).
Output: A marked vertex.
1: Calculate parameters l=π4nk12 l = \left\lceil {{\pi \over 4}\sqrt {{n \over k}} - {1 \over 2}} \right\rceil and t=2mnarcsin[nksin(π2(2l+1))] t = {2 \over {\sqrt {mn}}}\arcsin \left[ {\sqrt {{n \over k}} \sin ({\pi \over {2(2l + 1)}})} \right] .
2: Construct the initial state |s=1mi=0m1|i |s\rangle = {1 \over {\sqrt m}}\sum\nolimits_{i = 0}^{m - 1} |i\rangle .
3: Perform quantum walk search Ul(t)eiAt2|s=(eiAtO)leiAt2|s {U^l}(t){e^{- iA{t \over 2}}}|s\rangle = {({{\rm{e}}^{- iAt}}O)^l}{{\rm{e}}^{- iA{t \over 2}}}|s\rangle .
4: Measure the final state and get |i〉.
5: Return vertex i.
Theorem 1

Let Km,n be a complete bipartite graph with k marked vertices on the order-n part and A be its adjacency matrix. For any lπ4nk12 l \ge {\pi \over 4}\sqrt {{n \over k}} - {1 \over 2} and t=2mnarcsin[nksin(π2(2l+1))] t = {2 \over {\sqrt {mn}}}\arcsin [\sqrt {{n \over k}} \sin ({\pi \over {2(2l + 1)}})] , starting from the state |s=1mi=0m1|i |s\rangle = {1 \over {\sqrt m}}\sum\nolimits_{i = 0}^{m - 1} |i\rangle , algorithm Ul(t)eiAt2 {U^l}(t){e^{- iA{t \over 2}}} returns a final state of uniform superposition of all marked vertices with certainty.

Quantum Counting for Spatial Search

The algorithmic parameters l and t depend on the number of marked vertices k, as indicated by equations (23) and (21). Therefore, when the number of marked vertices is unknown, it is necessary to estimate k before applying the algorithm. We first review the quantum counting algorithm in the context of unstructured search, and then show how a similar idea can be applied to spatial search via our search operator.

We adopt the notation in [34] and give the following definition:

Definition 1

For any integer M > 0 and real number 0 ≤ ω < 1, let |SM(ω)=1My=0M1e2πiωy|y. |{S_M}(\omega)\rangle = {1 \over {\sqrt M}}\sum\limits_{y = 0}^{M - 1} {{\rm{e}}^{2\pi i\omega y}}|y\rangle. We then have, for integers 0 ≤ jM − 1, the Fourier basis FM|j=|SM(jM) {F_M}|j\rangle = |{S_M}({j \over M})\rangle for the space span{|j〉, 0 ≤ jM − 1}.

We expand |ϕ0〉 = ∑αj|θj〉 in the eigenphases of U, and thus with probability |αj|2, the state of the second register would be |θj〉. After step 2 of the algorithm, the state of the first register will be 1Ml=0M1eilθj|l=|SM(θj2π) {1 \over {\sqrt M}}\sum\limits_{l = 0}^{M - 1} {e^{il{\theta_j}}}|l\rangle = |{S_M}({{{\theta_j}} \over {2\pi}})\rangle =l=0M1flFM|l, = \sum\limits_{l = 0}^{M - 1} {f_l}{F_M}|l\rangle, provided that the state in the second register is |θj〉 (with probability |αj|2). We expand the state in Fourier basis in equation (25). Step 3 performs the inverse Fourier transform, hence with probability |fl|2, step 4 will measure the result l. If |ϕ0〉 is one of the eigenvectors |θj〉 of the unitary U, the following theorem from [34] ensures that θ˜=2πlM \tilde \theta = 2\pi {l \over M} is an estimation of θj with error at most 2πM {{2\pi} \over M} with probability at least 8π2 {8 \over {{\pi^2}}} (≈0.81).

Theorem 2

Let M = 2p, p is the number of ancillary qubits in Algorithm 2. If θ2π {\theta \over {2\pi}} M is an integer, then Algorithm 2 returns the exact value of the phase θ with certainty: Prob(l=θ2πM)=1. {\rm{Prob}}(l = {\theta \over {2\pi}}M) = 1. Otherwise, the algorithm returns an estimation of the phase θ with error 2πM {{2\pi} \over M} with probability Prob(l=θ2πM)+Prob(l=θ2πM)=sin2[MΔ1π]M2sin2[Δ1π]+sin2[MΔ2π]M2sin2[Δ2π]8π2, \matrix{{} \hfill & {{\rm{Prob}}(l = \left\lfloor {{\theta \over {2\pi}}M} \right\rfloor) + {\rm{Prob}}(l = \left\lceil {{\theta \over {2\pi}}M} \right\rceil)} \hfill \cr = \hfill & {{{\mathop {\sin}\nolimits^2 [M{\Delta_1}\pi ]} \over {{M^2}\mathop {\sin}\nolimits^2 [{\Delta_1}\pi ]}} + {{\mathop {\sin}\nolimits^2 [M{\Delta_2}\pi ]} \over {{M^2}\mathop {\sin}\nolimits^2 [{\Delta_2}\pi ]}} \ge {8 \over {{\pi^2}}},} \hfill \cr} where Δ1=1M(θj2πMθ2πM) {\Delta_1} = {1 \over M}({{{\theta_j}} \over {2\pi}}M - \left\lfloor {{\theta \over {2\pi}}M} \right\rfloor) , Δ2=1M(θ2πMθj2πM) {\Delta_2} = {1 \over M}(\left\lceil {{\theta \over {2\pi}}M} \right\rceil - {{{\theta_j}} \over {2\pi}}M) .

Algorithm 2 : Quantum Phase Estimation (QPE).
Input: A unitary U, initial state |0〉p|ϕ0 (p is the number of qubits in the first register and |ϕ0〉 is an arbitrary state of the second register).
Output: An estimate θ̃ of one of the eigenphases of U.
1: Apply Hadamard gate H to each qubit in the first register.
2: Apply U2j on the second register controlled by qubit j, 1 ≤ jp in the first register.
3: Apply inverse quantum Fourier transform to the first register.
4: Measure the first register in the computational basis and get the result l.
5: Return θ˜=2πlM(M=2p) \tilde \theta = 2\pi {l \over M}(M = {2^p}) .

Intuitively, quantum phase estimation works as follows. The eigenvalues of a unitary lie on a unit circle. Divide the circle into M parts. QPE can only obtain an estimation of the eigenphases from the set ΩM={jM2π,0jM1} {\Omega_M} = \{{j \over M}2\pi,0 \le j \le M - 1\} . Hence, for eigenphase θ in Figure 2, the best estimation is θ or θ+ (with error at most 2πM {{2\pi} \over M} ) as depicted in Figure 2, which corresponds to the measured result of θ2πM \left\lfloor {{\theta \over {2\pi}}M} \right\rfloor or θ2πM \left\lceil {{\theta \over {2\pi}}M} \right\rceil . Theorem 2 then states that the probability of obtaining this best estimation is at least 8π2 {8 \over {{\pi^2}}} . Specially, in the case of θΩM, one obtain the result θ with certainty.

Figure 2.

The possible phase set returned by Algorithm 1 for M = 16. The best estimation for an angle θ is either θ+ or θ.

For unstructured search with k marked vertices, the initial state (i.e., the uniform superposition state of all vertices) may be re-expressed as |ψ=NkN|α+kN|β, |\psi \rangle = \sqrt {{{N - k} \over N}} |\alpha \rangle + \sqrt {{k \over N}} |\beta \rangle, where |α=1Nkiunmarked|i |\alpha \rangle = {1 \over {\sqrt {N - k}}}\sum\nolimits_{i{\kern 1pt} {\rm{unmarked}}} |i\rangle and |β=1kimarked|i |\beta \rangle = {1 \over {\sqrt k}}\sum\nolimits_{i{\kern 1pt} {\rm{marked}}} |i\rangle . In the two-dimensional subspace span{|α〉, |β〉}, the Grover operator G = (I − 2|ψ〉〈ψ|)O is a rotation operator of angle θ with eigenvalues e and ei(2πθ) [32]. The quantum counting algorithm for Grover's search is based on the observation that sin2(θ2)=sin2(2πθ2)=kN. \mathop {\sin}\nolimits^2 \left({{\theta \over 2}} \right) = \mathop {\sin}\nolimits^2 \left({{{2\pi - \theta} \over 2}} \right) = {k \over N}. Hence utilizing the phase estimation algorithm (see Algorithm 2) which outputs (an estimation of) the eigenphases of unitary operators, one can estimate the number of marked vertices through equation (29).

Apparently, this counting algorithm cannot be directly applied to complete bipartite graphs. Fortunately, the special spectrum structure of the algorithmic operator U(t) allows us to construct a simple quantum counting algorithm by employing quantum phase estimation in a similar fashion. The problem concerning QPE is that the input state |ϕ0〉 is not an eigenvector in general and one would not be able to determine which eigenvalue corresponds to the estimation result. Fortunately, we can circumvent this difficulty as equation (29) does in the context of unstructured search. The key is that the spectrum of our evolutionary operator consists of a conjugate pair and −1. We evaluate k by rewriting equation (14) for θ±: k=(sinθ±2sin(mn2t))2n. k = {({{\sin {{{\theta_ \pm}} \over 2}} \over {\sin ({{\sqrt {mn}} \over 2}t)}})^2}n. If we take t=t0=πmn t = {t_0} = {\pi \over {\sqrt {mn}}} , then θ±=2arcsinkn2arcsin12=π2 {\theta_ \pm} = 2\arcsin \sqrt {{k \over n}} \le 2\arcsin {1 \over {\sqrt 2}} = {\pi \over 2} provided that k<n2 k < {n \over 2} , and k=(sinθ±2)2n. k = {(\sin {{{\theta _ \pm }} \over 2})^2}n. Note that equation (31) is the counterpart of equation (29) in the setting of spatial search. The eigenphase distribution of U(t0) on the unit circle is shown in Figure 3. The eigenvectors in (15) now become |v1=i|s,|v±=|wi|w¯2. \matrix{{} \hfill & {|{v_{- 1}}\rangle = - i|s\rangle,} \hfill \cr {} \hfill & {|{v_ \pm}\rangle = {{\mp |w\rangle - i|\bar w\rangle} \over {\sqrt 2}}.} \hfill \cr} Note that we can expend the uniform superposition state in this basis {|v−1〉, |v+〉, |v〉} as follows: |ψ=1m+n(im|v1+(inkk)|v+|v2). |\psi \rangle = {1 \over {\sqrt {m + n}}}(i\sqrt m |{v_{- 1}}\rangle + (i\sqrt {n - k} - \sqrt k){{|{v_ +}\rangle - |{v_ -}\rangle} \over {\sqrt 2}}). Our quantum counting algorithm for complete bipartite graphs is to apply QPE to the operator U(t0) starting with the state |0〉p|ψ〉. |ψ〉 will be in the state |v−1〉 with probability mm+n {m \over {m + n}} . In this case, we would measure −1 with certainty, which we discard. We then assume that |ψ〉 be in either |v+〉 or |v〉. Theorem 2 then guarantees that we can obtain an estimate of the eigenphases θ± with error 2πM {{2\pi} \over M} with probability at least 8π2 {8 \over {{\pi^2}}} , from which we can evaluate k.

Figure 3.

The eigenphase distribution of U(t0) on the unit circle.

Theorem 3 (Quantum Counting on Complete Bipartite Graphs)

Algorithm 3 output an estimation k̃ of the number of marked vertices k with precision δ with success probability at least 8π2 {8 \over {{\pi^2}}} .

Proof

Followed from Theorem 2, |θ˜θ|ε=2πM |\tilde \theta - \theta | \le \varepsilon = {{2\pi} \over M} with probability 8π2 {8 \over {{\pi^2}}} . Then |k˜k|=|(sinθ˜2)2(sinθ2)2|n |\tilde k - k| = |{(\sin {{\tilde \theta} \over 2})^2} - {(\sin {\theta \over 2})^2}|n by (31). Using trigonometric identities, we obtain sin2(θ2+ε2)sin2(θ2)=cosθ2sinθ2sinε+cosθsin2ε2,sin2(θ2)sin2(θ2ε2)=cosθ2sinθ2sinεcosθsin2ε2. \matrix{{\mathop {\sin}\nolimits^2 ({\theta \over 2} + {\varepsilon \over 2}) - \mathop {\sin}\nolimits^2 ({\theta \over 2}) =} \hfill & {\cos {\theta \over 2}\sin {\theta \over 2}\sin \varepsilon + \cos \theta \mathop {\sin}\nolimits^2 {\varepsilon \over 2},} \hfill \cr {\mathop {\sin}\nolimits^2 ({\theta \over 2}) - \mathop {\sin}\nolimits^2 ({\theta \over 2} - {\varepsilon \over 2}) =} \hfill & {\cos {\theta \over 2}\sin {\theta \over 2}\sin \varepsilon - \cos \theta \mathop {\sin}\nolimits^2 {\varepsilon \over 2}.} \hfill \cr} It follows that |k˜k|n(1knknε+ε24)=2πMk(nk)+π2M2n=k(nk)ε+n4ε2=5n4ε=5nπ2Mδ. \matrix{{|\tilde k - k| \le n(\sqrt {1 - {k \over n}} \sqrt {{k \over n}} \varepsilon + {{{\varepsilon^2}} \over 4})} \hfill & {= {{2\pi} \over M}\sqrt {k(n - k)} + {{{\pi^2}} \over {{M^2}}}n} \hfill \cr {} \hfill & {= \sqrt {k(n - k)} \varepsilon + {n \over 4}{\varepsilon^2}} \hfill \cr {} \hfill & {= {{5n} \over 4}\varepsilon = {{5n\pi} \over {2M}}} \hfill \cr {} \hfill & {\le \delta.} \hfill \cr}

Algorithm 3 : Quantum counting for search on complete bipartite graphs.
Input: Unitary U(t0), initial state|0〉p|ψ〉 ( p=log25nπ2δ p = \left\lceil {{{\log}_2}\,{{5n\pi} \over {2\delta}}} \right\rceil is the number of qubits in the first register and δ is the desired precision).
Output: Estimation of the number of marked vertices k with precision δ.
1: Call Algorithm 2 and get the result θ̃.
2: if θ̃ = π
    then discard;
  else
     k˜=(sinθ˜2)2n \tilde k = {\left({\sin {{\tilde \theta} \over 2}} \right)^2}n .
3: Return .
Circuit Implementation and Simulation

The heart of the circuit implementation of our algorithm lies in the implementation of operator eiAt. We follow the method of diagonalization in [35] to address the case where m = 2l1 and n = 2l2.

We first diagonalize A = QΛQ using its eigenphases, with Λ=diag(mn,0m1,mn,0n1) \Lambda = {\rm{diag}}(\sqrt {mn},{0^{m - 1}}, - \sqrt {mn},{0^{n - 1}}) and where H is the Hadamard gate.

Here we expand the Hilbert space by d dimensions so that m = n + d. Define Λ˜=diag(mn,0m1,mn,0m1) \widetilde \Lambda = {\rm{diag}}(\sqrt {mn},{0^{m - 1}}, - \sqrt {mn},{0^{m - 1}}) and Then for A˜=Q˜Λ˜Q˜, \widetilde A = \widetilde Q\widetilde \Lambda {\widetilde Q^\dagger}, it is easily seen that eiA˜t=Q˜eiΛ˜tQ˜ {e^{- i\widetilde At}} = \widetilde Q{e^{- i\widetilde \Lambda t}}{\widetilde Q^\dagger} acts as eiAt in the original space and as identity in the expended subspace. Equations (39–41) show how to implement these operators by elementary gates with P0 = |0〉〈0| and P1 = |1〉〈1| being the two-dimensional projection operators.

The circuit for eiÃt is given in Figure 4. As pointed out in [35], the diagonalization approach confines the time-dependence of eiÃt to the diagonal matrix eiΛ̃t, which can be implemented by a controlled phase gate. This means that the walk operator can be simulated efficiently in constant time, that is, the complexity of the quantum circuit does not scale with the parameter t.

Figure 4.

Quantum circuit for implementation of eiÃt.

For m, n that are not a power of 2, we can simply add vertices to the search space, none of which are marked, such that the sizes of the two partite sets are a power of 2. Alternatively, one can employ the oracle Hamiltonian simulation algorithm. Assuming access to a unitary oracle that implements the adjacency matrix, the implementation of the quantum walk operator can be achieved through sparse Hamiltonian simulation algorithm [36].

To verify the correctness of the spatial search algorithm, we implement the circuit on the well-known quantum computing platform Qiskit for a specific example for demonstration. Consider graph K8,4 (Figure 5). Such a graph requires 4 qubits to encode the vertices, with the corresponding state space being span{|0〉, |1〉, … , |15〉}. Suppose that vertex |8〉 is marked. The circuit in Figure 6 simulates the oracle of equation (5). We adopt the qiskit primitive Sampler [37], which estimates the entire quasi-probability distribution at the output of a quantum circuit by sampling from its output. The simulation works perfectly and returns the marked vertex with certainty. We also use the simulator Qiskit Aer [38] and get counts on the result (Figure 7, [39]), which shows that all the measurement results are the marked vertex.

Figure 5.

Graph K8,4 with vertex |8〉 marked.

Figure 6.

Circuit simulation of the oracle for graph K8,4 with vertex |8〉 marked.

Figure 7.

State counts of the measurement result of the simulation.

Discussion

Our spatial search algorithm takes the simple form of iterations of an oracle followed by a walk operator. We point out that the calculation in Section 3 only works for adjacency walk, not for Laplacian walk. As for the oracle, we adopt the specific form of equation (5), whose matrix representation in the invariant subspace span{|s〉, |w〉, |〉} is (100010001), \left({\matrix{1 & 0 & 0 \cr 0 & 1 & 0 \cr 0 & 0 & {- 1} \cr}} \right), while for a standard oracle O, the corresponding matrix is (100010001). \left({\matrix{1 & 0 & 0 \cr 0 & {- 1} & 0 \cr 0 & 0 & 1 \cr}} \right). In fact, direct calculation shows that in the subspace span{|s〉, |w〉, |〉}, OeiAtO=OeiAtO. O{e^{- iAt}}O = O'{e^{iAt}}O'. Therefore, the two oracles are equivalent in the sense that (eiAtO)2l=(eiAtOeiAtO)l {({e^{- iAt}}O)^{2l}} = {({e^{- iAt}}O'{e^{iAt}}O')^l} for some integer l.

Although our algorithm is within the framework of alternating walk, we do not assume a generalized phase oracle (i.e., an oracle that does not flip the marked vertices but rotates it by a specified angle) as most of the algorithms in Table 1 did, making our algorithm easier to implement.

We and reference [24] both exploit the specific structure of complete bipartite graphs to simplify the calculation and analysis. However, we adopt the different quantum walk framework (CTQW vs. DTQW): They [24] reduced the calculation to a single-qubit quantum system and used Bloch sphere representation as an analysis tool, while we reduce the calculation to a three-dimensional invariant subspace and further make use of the spectrum structure in the subsequent calculation. More importantly, the symmetry of the spectrum of our search operator makes it possible to design a simple algorithm to estimate the number of marked vertices.

Quantum counting is another difficulty one might encounter in constructing deterministic search algorithms on graphs. Typically the algorithmic parameters such as iteration number or evolution time are functions of the number of marked vertices. However, the eigenphases of the evolution operator usually do not have sufficient symmetries, such that QPE cannot be used to extract the information of the number of marked vertices from the operator eigenphases. In recent years, there have been research works that have constructed quantum counting (and the closely related problem of amplitude estimation) algorithms without QPE [40,41,43]. It is an interesting research line to construct quantum counting algorithms without QPE on graphs.

Conclusions

In this work, we propose a deterministic search algorithm on complete bipartite graphs via continuous-time quantum walk. Our algorithm takes a simple form of iterations of an oracle followed by a walk operator, which can be seen as a generalization of Grover's search, replacing the Grover diffusion operator with a quantum walk operator. We exploit the symmetries of complete bipartite graphs and reduce the calculation to a three-dimensional invariant subspace. By choosing appropriate evolution time and iteration number, the system outputs a marked vertex with certainty. Making use of the symmetry of the search operator spectrum, we develop a quantum counting algorithm for spatial search. This is another advantage of our search scheme since previous works on deterministic spatial search assume the number of marked vertices is known. We also provide quantum circuit implementation for our search algorithm and simulate it on the IBM quantum computing platform Qiskit.

Potential application would be for any search task whenever the search structure is the complete bipartite graph, such as database search with specific physical arrangement of data and solution space search (as Ambainis's celebrated algorithm [3] for element distinctness did). Future work would be to construct deterministic search algorithms on other types of graphs. As the calculation in the text shows, our algorithm strongly depends on the specific structure of the graph. Deterministic algorithm for more general graphs might require a more sophisticated search scheme.

Language:
English
Publication timeframe:
1 times per year
Journal Subjects:
Physics, Quantum Physics