Introduction
1.
Conserved quantities play important roles in physics: energy, momentum, and angular momentum are conserved in systems that are time, translation, and rotation invariant, respectively. In quantum mechanics, the wave function ψ of a system with Hamiltonian H0 evolves according to Schrödinger’s equation,
where we will work in units where the reduced Planck constant ħ = 1 throughout this paper. The Hamiltonian H0 must be Hermitian (i.e., self-adjoint), which causes the time evolution to be unitary. Then, |ψ|2 = 〈ψ|ψ〉 is a conserved quantity, meaning a normalized wave function stays normalized, which is necessary for the probabilistic interpretation of the wave function à la the Born rule. This may not be the only conserved quantity, however. For example, if the Hamiltonian is time-independent, then the expected value of the Hamiltonian 〈H0 = 〈ψ|H0|ψ〉, i.e., the average energy of an ensemble of identically prepared systems, is also conserved [1]. The time-independence of the Hamiltonian and the conservation of its expected value hold for many quantum algorithms based on continuoustime quantum walks [2–4], where the particle walks on the vertices of a graph, and the kinetic energy of the system is proportional to the discrete Laplacian. For overviews of quantum walks, see [5–8]. In Section 2, we will give an example of this by reviewing how a continuous-time quantum walk searches the complete graph for a marked vertex [3,9], which is the combinatorial formulation of the unstructured search problem of Grover’s algorithm [10]. In the process, we will give a new derivation of the evolution of the algorithm for arbitrary jumping rates, as well as give a new derivation—using only elementary calculus—of the critical jumping rate that causes the algorithm to succeed with certainty. We will explicitly show that for the Hamiltonian used in the search algorithm, 〈H0〉 is conserved.Some many-body quantum systems are approximately described by an effectively nonlinear Schrödinger-type equation with a cubic nonlinearity proportional to |ψ|2ψ, i.e.,
where the effective Hamiltonian depends on time because it depends on the state ψ, which evolves with time. A Bose-Einstein condensate [11–13] is an example of such a system, with the Gross-Pitaevskii equation [14,15] describing it in the mean-field limit and taking the form of the cubic nonlinear Schrödinger equation (2); for reviews, see [16,17]. As before, |ψ|2 = 1 is conserved, but since H(t) is time-dependent, 〈H(t)〉 = 〈ψ|H(t)|ψ〉 is not conserved. When H0 is a constant, however, then is conserved [18]. In Section 3, we will give an example of this by reviewing how a nonlinear quantum walk with λ > 0, which corresponds to a Bose-Einstein condensate with repulsive interactions, searches the complete graph for a marked vertex [19], and we will explicitly show that is conserved for the algorithm.If H0 depends on time, however, then is generally not conserved. In Section 4, we give an example of this by reviewing how a nonlinear quantum walk with λ < 0, which corresponds to a Bose-Einstein condensate with attractive interactions, searches a complete graph of N vertices for a marked vertex [20]. In this algorithm, the jumping rate of the quantum walk is a critical, time-dependent function γc(t), which causes H0 to be time-dependent as well. While is not conserved in this case, we show that the critical jumping rate is such that 〈H0/[γc(t)N]〉 is conserved instead.
Thus, in this tutorial, we will review three continuous-time quantum walk algorithms for searching the complete graph: a linear algorithm in Section 2, a nonlinear algorithm corresponding to a Bose-Einstein condensate with repulsive interactions in Section 3, and a nonlinear algorithm corresponding to a Bose-Einstein condensate with attractive interactions in Section 4. For each, we will demonstrate a conserved quantity related to the (effective) Hamiltonian of the system, thus making connections between quantum algorithms, conservation laws, and manybody quantum systems. We conclude in Section 5.
Linear Quantum Search
2.
In quantum mechanics, the Hamiltonian H0 is the operator corresponding to the total energy of the system, which consists of a kinetic energy term that is proportional to Laplace’s operator ▽2 and a potential energy term V [1]:
For a quantum walk on a graph of N vertices, the vertices label computational basis states |1〉, |2〉, …, |N〉, and in general, the state is a superposition or complex linear combination over the vertices. Then, Laplace’s operator in the continuum should be replaced by the discrete Laplacian L:
where L is an N × N matrix with Lij = 1 if vertices i and j are adjacent, Lii = – deg(i) is the negative of the number of neighbors of vertex i, and Lij = 0 otherwise. For the complete graph of N vertices, an example of which is shown in Figure 1, the discrete Laplacian has 1 for each off-diagonal element and –(N – 1) on the diagonal. We have also written the coefficient of L as a parameter γ, which corresponds to the jumping rate of the quantum walk. To construct a quantum search algorithm [3], an oracle “marks” a particular vertex |a〉 that we want to find, which manifests as a potential energy term:
Figure 1.
A complete graph of N = 6 vertices. A vertex is marked, as indicated by a double circle. In the search algorithm, vertices that evolve identically have the same label and color.
Initially, we have no knowledge of where the marked vertex might be, so we guess each vertex equally by beginning in a uniform superposition over all N vertices:
Then, the system evolves by Schrödinger’s equation (1), and since H0 is time-independent,
where we have taken ħ = 1. The success probability at time t is the probability that measuring the position of the particle at time t results in it being found at the marked vertex, so the success probability isThe evolution of this success probability is plotted in Figure 2 for search on a complete graph of N = 100 vertices and with various values of the jumping rate γ. In Figure 2a, the jumping rate starts off small as γ = 0.001 in the solid black curve, and the success probability is relatively unchanged from its initial value of 1/100 = 0.01. As the jumping rate increases, however, the success probability evolves with a higher and higher peak, eventually reaching a peak success probability of 1 when γ = 0.01. In Figure 2b, γ is increased further, and the peak success probability decreases, with larger γ resulting in the success probability staying near its initial value.

Figure 2.
Success probability versus time for (linear) quantum search on the complete graph with N = 100 vertices and various jumping rates. In (a), the solid black curve is γ = 0.001, the dashed red curve is γ = 0.005, the dotted green curve is γ = 0.008, the dot-dashed blue curve is γ = 0.009, and the dot-dot-dashed orange curve is γ = 0.01. In (b), the solid black curve is γ = 0.011, the dashed red curve is γ = 0.012, the dotted green curve is γ = 0.015, the dot-dashed blue curve is γ = 0.02, and the dot-dot-dashed orange curve is γ = 0.03.
To prove this behavior, we begin by noting that due to the symmetry of the problem, there are only two types of vertices: the marked vertex and the unmarked vertices, labeled in Figure 1 as a and b. Vertices of the same type evolve identically, so the system evolves in a two-dimensional (2D) subspace spanned by the marked vertex |a〉 and the uniform superposition of unmarked vertices, which we will call |b〉:
In this basis, the initial state (5) is
and the Hamiltonian (4) isThe (unnormalized) eigenvectors and eigenvalues of H0 are
where is the energy gap. Expressing the initial state (8) as a linear combination of these eigenvectors,Then, using (6), the state of the system at time t is
Taking the norm-square of the amplitude of |a〉, the success probability (7) at time t is
This agrees with the curves in Figure 2 with N = 100 and various values of γ. The success probability reaches a maximum value when the sine is 1 and the cosine is 0, i.e., at time
at which the success probability peaks atTo the best of our knowledge, the above results for |ψ(t)〉 (11), p(t) (12), t* (13), and p* (14) for arbitrary γ are new, as previous literature [9] focused on the specific case when γ = 1/N, motivated by minimizing the energy gap [3] or by degenerate perturbation theory [21]. Now, we will provide another way to arrive at the γ = 1/N case, namely, using elementary calculus to prove that it is the value of γ that maximizes the peak success probability p* (14). Substituting the energy gap ΔE (10) into p* (14) and differentiating the result with respect to γ, we get
Setting this equal to 0 and solving for γ, the peak success probability p* is maximized when γ takes a critical value of
at which the energy gap (10) is and the peak success probability (14) isThat is, γ = γc = 1/N makes the algorithm deterministic, i.e., the marked vertex is found with certainty. Using (13), this occurs at time
which is the expected scaling of Grover’s algorithm [10]. Furthermore, using (12), the success probability evolves with time as which agrees with the dot-dot-dashed orange curve in Figure 2a, where N = 100 and γ = 1/100 = 0.01.Moving on to conserved quantities, since the Hamiltonian (4) is time-independent, its expected value is conserved, i.e., 〈H〉 = 〈ψ(t)|H|ψ(t)〉 is constant in time [1]. We will explicitly show this in the 2D subspace of our algorithm for pedagogical purposes, as the calculation for the nonlinear algorithm in the next section will use similar methods. To begin, we write the state of the system in the {|a〉, |b〉} basis as
for complex α and β, where for convenience, we have stopped writing the explicit time-dependence of α and β. The Hamiltonian (9) takes the form where are real and time-independent, although we allow for b to be complex for greater generality. Then, the expected value of H0 isWe want to show that this is constant in time. Using the chain rule, its time-derivative is
where we used a dot to indicate a time derivative. Let us find the partial derivatives of 〈H0〉 and then the time derivatives of α, β, and their conjugates. First, we differentiate (18) to getThen, to find , and in (19), we use Schrödinger’s equation (1):
which multiplied out isSolving for and and taking the complex conjugate of each equation,
Plugging (20) and (21) into (19), we get
so we have proved that the expected value of the Hamiltonian is constant.Our derivation also shows that there is a relationship between the derivatives of the expected value of the Hamiltonian and the time derivatives of the amplitudes. Comparing (20) and (21),
Plugging these into (19), we get a cleaner proof that the expected value of the Hamiltonian is conserved:
Of course, the cleanest proof that the expected value of this time-independent Hamiltonian is conserved follows from the fact that the time evolution multiplies any eigenvector ψj of H0 by the phase eiEjt. This leaves the norm-squared of the projection of the state onto each eigenspace invariant, and also, a fortiori, 〈H0〉. This proof fails, however, for the time-dependent evolutions we will consider in the next two sections. This is why we gave the preceding argument, which can be translated into the nonlinear settings.
Nonlinear Quantum Search with Repulsive Interactions
3.
Many-body quantum systems can evolve by effective nonlinearities. Bose-Einstein condensates are a quintessential example, and for pairwise contact interactions in the mean field limit, they evolve by the Gross-Pitaevskii equation, which is a Schrödinger-type equation with a cubic nonlinearity (2). A nonlinear quantum search algorithm [20] can be constructed from this by taking H0 = –γL – |a〉〈a| (4) so that the effective Hamiltonian (3) becomes
When the nonlinearity coefficient λ is positive, this physically corresponds to bosons with repulsive interactions, and when λ is negative, the interactions are attractive. The sign and strength of λ can be tuned, for example, by Feshbach resonance [22]. In this section, we consider λ > 0, and in the next section, we consider λ < 0.
As shown in [19], for large N, when γ takes a critical value of
and the nonlinearity coefficient λ lies in the range 0 < λ < λc, where then the system evolves from the initial uniform superposition (5) to the marked vertex |a〉 in time roughlyThis runtime is slower than the linear algorithm’s (13) by a factor of , i.e., it is slower by 15.5%. As discussed in [19], although this algorithm searches in the same time as the linear quantum algorithm, but with a worse coefficient, it nonetheless shows that it is theoretically possible for a Bose-Einstein condensate with repulsive interactions evolving by an effective nonlinearity to implement a quantum search algorithm with an scaling.
Note from [19] that λc is not a tight upper bound, i.e., there may exist some nonlinearity coefficient λ > λc for which the success probability reaches 1, but eventually as λ increases, the success probability stops reaching 1. This is shown in Figure 3 for search on a complete graph of N = 100 vertices, for which . The solid black curve is λ = 0.2, since 0 < 0.2 < 0.333, the success probability must evolve to 1, as it does. The dashed red curve is λ = 0.4, and while it is greater than λc = 0.333, the success probability still reaches 1. The dotted green curve is λ = 0.611, and while the success probability struggles to grow, it does eventually reach 1 off the right of the graph. In contrast, the dot-dashed blue curve is λ = 0.612, and the success probability does not reach 1 anymore. A larger nonlinearity coefficient reaches a smaller and smaller success probability, such as the dot-dot-dashed orange curve with λ = 0.8. A tight upper bound on λ such that the success probability reaches 1 remains an open question.

Figure 3.
Success probability versus time for nonlinear quantum search on the complete graph with N = 100 vertices, λ = (2 – λ)/2N, and various values of λ. The solid black curve is γ = 0.2, the dashed red curve is λ = 0.6, the dotted green curve is λ = 0.611, the dot-dashed blue curve is λ = 0.612, and the dot-dot-dashed orange curve is λ = 0.8.
Since the effective Hamiltonian of the search algorithm depends on time, 〈H(t)〉 is generally not conserved. Instead, the expected value of H0 plus half the nonlinear self-potential is conserved, i.e., is conserved, as this is the quantity that corresponds to the total energy [18]. Conserved quantities for the Gross-Pitaevskii equation have been explored in some other contexts, including as a classical Hamiltonian [19], the focusing cubic and quintic Gross-Pitaevskii hierarchies [23], cubic Gross-Pitaevskii hierarchy on ℝ [24], and the one-dimensional Gross-Pitaevskii equation [25,26], but here we concentrate on conserved quantities related to the expected value of the effective Hamiltonian.
For instructional purposes, let us use the nonlinear search algorithm to explicitly show why 〈H(t)〉 = 〈H0 + λ|ψ|2〉 is not conserved, while is conserved. Even with the nonlinearity, as before, the system evolves in the same 2D subspace spanned by |a and |b〉, so the state |ψ(t)〉 can be written as (15). Now, the effective Hamiltonian (24) is
This takes the form
where a, b, and d are defined in (17), and are real and time independent. Now, the expected value of the effective Hamiltonian isDifferentiating this with respect to time using the chain rule,
The partial derivatives of the expected value of the effective Hamiltonian can be found by differentiating (27), noting that |α|4 = (α*)2α2 and |β|4 = (β*)2β2:
To find , and in (28), we use the cubic nonlinear Schrödinger equation (2),
which multiplied out isSolving for and and taking the complex conjugate of each equation,
Comparing (29) and (30), we see that these are no longer proportional to partial derivatives of the expected value of the Hamiltonian, i.e., (23) no longer holds. Then, (28) is not equal to zero, so the expected value of the effective Hamiltonian is not conserved.
The reason why (29) is not proportional to (30) is the extra factor of 2 in the last term. We can eliminate this factor of 2 by dividing the nonlinear self-potential by 2. That is, we consider
which takes the form where a, b, and d are defined in (17), and f and g are defined in (26). The expected value of this is which has a time derivative ofNow, when we take the partial derivatives of (32), the factors of 2 are eliminated:
Comparing these with (30), these are exactly proportional to the time derivatives of α*, β*, α, and β, i.e.,
Then, substituting into (33), we get
Thus, is conserved in the nonlinear quantum search algorithm with repulsive interactions.
Faster Nonlinear Quantum Search with Attractive Interactions
4.
In this section, we consider the nonlinear quantum search algorithm with negative values of λ, which corresponds to a Bose-Einstein condensate with attractive interactions. Intuitively, as the amplitude at the marked vertex builds up, the attractive interaction should draw additional amplitude, speeding up the algorithm. Indeed, as shown in [20], when the jumping rate is the time-varying critical function
[which is determined independently of the marked vertex |a〉, and whose time dependence comes from the amplitudes α and β (15)], then the algorithm evolves from the uniform superposition over all N vertices to the marked vertex in timeThis is demonstrated in Figure 4, where we plot the evolution of the success probability for search on the complete graph of N = 100 vertices. The solid black, dashed red, dotted green, and dot-dashed blue curves correspond to λ = 0, –1, –2, and –3, and they reach success probabilities of 1 at time , 11.107, 9.069, and 7.854, respectively, and so the more negative the nonlinearity coefficient, the faster the algorithm.

Figure 4.
Success probability versus time for nonlinear quantum search on the complete graph with N = 100 vertices, γ = γc(t), and various values of λ. The solid black curve is λ = 0, the dashed red curve is λ = –1, the dotted green curve is λ = –2, and the dot-dashed blue curve is λ = –3.
This speedup comes, however, at the expense of increasing the necessary time-measurement precision. In Figure 4, as the magnitude of the nonlinearity coefficient increases, the peak in success probability becomes more narrow, which necessitates greater time-measurement precision to catch the peak. This was quantified in [20], which showed that the width of the peak scales as , and so the time-measurement precision is constant when , at which the runtime t* = O(N1/4), which is a quadratic improvement over the linear and nonlinear repulsive algorithms.
Since the effective Hamiltonian H(t) = H0 + λ|ψ|2 depends on time, its expected value is not conserved. takes the form given in (31), but now a, b, and d depend on time because γ varies with time. Then, the time-derivative of from (33) will include additional terms involving time-derivatives of a, b, and d, and will not be conserved. Instead, let us show that another quantity is conserved.
First, we review from [20] that the critical function γc (t) for the jumping rate causes H(t) to be proportional to H0. To begin,
Now, recall that the jumping rate satisfies (34). Multiplying both sides of (34) by N and distributing λ yields
Rearranging,
Substituting this into our previous expression for H(t),
where 𝕀 is the identity matrix, which can be dropped since it corresponds to a rescaling of energy or a global, unobservable phase. Then,That is, the effective Hamiltonian for the nonlinear search algorithm with attractive interactions is a time-varying rescaling of the linear search algorithm’s Hamiltonian evaluated at its critical jumping rate of γc = 1/N. Solving for the linear algorithm’s Hamiltonian at its critical jumping rate,
Since 〈H0〉 is conserved for arbitrary constant γ, as we proved in (22), we have that
and we have proved a conserved quantity for the nonlinear search algorithm with attractive interactions.Conclusion
5.
We have reviewed three quantum search algorithms governed by continuous-time quantum walks. The first used a linear quantum walk, and we derived the evolution of the system for arbitrary jumping rates. We used elementary calculus to prove that there is a critical jumping rate γc that causes the success probability to reach 1 in time . We showed that the expected value of the Hamiltonian H0 is conserved, which is an example of the fact that all time-independent Hamiltonians have constant expected values. Second, we considered a nonlinear quantum walk with repulsive interactions, whose effective Hamiltonian was H(t) = H0 + λ|ψ|2 with λ > 0. For a range of possible critical jumping rates, the success probability reaches 1 in time , which is slower than the linear algorithm by a constant factor, and we showed that the expected value of is conserved. Third, for the nonlinear quantum walk with attractive interactions, the effective Hamiltonian has λ < 0, and when the jumping rate takes a critical function γc (t), the success probability reaches 1 in time , which is faster than the other algorithms for all λ < 0. The jumping rate varies such that the effective Hamiltonian H(t) is equal to a time-dependent rescaling of the linear algorithm’s Hamiltonian H0 evaluated at its critical jumping rate γc, namely, H(t) = γc(t)NH0|γc, and since the expected value of the time-independent linear Hamiltonian H0 is conserved for an arbitrary constant jumping rate, the expected value of H(t)/[γc (t)N] is conserved for the third algorithm. These results provide a perspective on quantum walk search algorithms through the lens of conservation laws and many-body quantum theory.
Notes
[1] Contributed by Author Contributions
D.A.M. and T.G.W. contributed to the conceptualization of the research, investigation of the results, and writing of the manuscript. All authors have read and agreed to the published version of the manuscript.
[2] Conflicts of interest Conflicts of Interest
The authors declare no conflicts of interest.
[3] Data Availability Statement
No data were created or analyzed in this study.