Rodeo Algorithm for Quantum Computing
Abstract
We present a stochastic quantum computing algorithm that can prepare any eigenvector of a quantum Hamiltonian within a selected energy interval . In order to reduce the spectral weight of all other eigenvectors by a suppression factor , the required computational effort scales as , where is the squared overlap of the initial state with the target eigenvector. The method, which we call the rodeo algorithm, uses auxiliary qubits to control the time evolution of the Hamiltonian minus some tunable parameter . With each auxiliary qubit measurement, the amplitudes of the eigenvectors are multiplied by a stochastic factor that depends on the proximity of their energy to . In this manner, we converge to the target eigenvector with exponential accuracy in the number of measurements. In addition to preparing eigenvectors, the method can also compute the full spectrum of the Hamiltonian. We illustrate the performance with several examples. For energy eigenvalue determination with error , the computational scaling is . For eigenstate preparation, the computational scaling is , where is the magnitude of the orthogonal component of the residual vector. The speed for eigenstate preparation is exponentially faster than that for phase estimation or adiabatic evolution.
Quantum computing is a powerful paradigm with the potential to describe large complex systems and eventually perform computations beyond the reach of classical computing. Recently, there have been several exciting algorithmic advances in describing the time evolution of Hamiltonians on quantum computers using a variety of different tools Low and Chuang (2019, 2017); Childs et al. (2019); Campbell (2019); Childs et al. (2019); Meister et al. (2020). They can be broadly categorized as either Lie-Trotter-Suzuki product formulas Trotter (1959); Suzuki (1976) or linear combinations of unitaries Childs and Wiebe (2012). Unfortunately, the application of these techniques for quantum state preparation is limited by existing hardware capabilities. Quantum adiabatic evolution is one approach to quantum state preparation that starts with an eigenstate of a simple Hamiltonian that slowly evolves with an interpolating time-dependent Hamiltonian until reaching the desired target Hamiltonian Farhi et al. (2000, 2001). The problem is that calculations based on quantum adiabatic evolution require an extended time evolution that makes the computational cost prohibitive for large systems. To address this problem, we introduce a new framework for quantum state preparation and spectrum determination called the rodeo algorithm.
The rodeo algorithm employs a strategy that is opposite to quantum adiabatic evolution. As the name suggests, the rodeo algorithm operates by shaking off all other states until only the target eigenvector remains. In this regard, the rodeo algorithm is similar in character to the projected cooling algorithm Lee et al. (2020); Gustafson (2020). However, the rodeo algorithm has the advantage that it can be applied to any quantum Hamiltonian and is a recursive algorithm that achieves exponential convergence in the number of cycles. It can be used to compute the full energy spectrum as well as prepare any energy eigenstate. While the rodeo algorithm might appear similar to Kitaev’s iterative version of quantum phase estimation Kitaev (1995) and fixed-time energy band filtering methods Ge et al. (2017); Lu et al. (2020), none of these methods can be used efficiently to prepare individual eigenstates of a general quantum Hamiltonian.
We will refer to the Hamiltonian of interest as the object Hamiltonian, , and the linear space which it acts upon the object system. By assumption, the object system starts in some initial state , which in general will update after each measurement. We will use auxiliary or ancilla qubits coupled to the object system. In the following we use the standard terminology, ancilla qubits. But we also mention that this collection of ancilla qubits is also informally called the “rodeo arena”.
If the quantum device allows for mid-circuit measurements, then only one ancilla qubit is needed. However, here we focus on the implementation using different ancilla qubits for each cycle of the rodeo algorithm. Each of the ancilla qubits is initialized in the state and operated on by a Hadamard gate H. We use each ancilla qubit to control the time evolution of for time . In order to achieve the desired energy filtering, we operate on each ancilla qubit with the phase rotation gate P, follow that with another Hadamard gate H, and then measure the qubit. We use the convention that P multiplies the phase to the state and leaves the state untouched. The circuit diagram for the rodeo algorithm is shown in Fig. 1.

In order to illustrate the effect of these gate operations, let us explicitly write out the operation for one cycle of the rodeo algorithm with one ancilla qubit. Starting from the initial state and performing one rodeo cycle, we obtain
(1) |
where is the identity operator on the object system. We note that commutes with all of our gates, and so we can describe the action of the rodeo algorithm for each individual eigenvector of with energy . In that case, the probability of measuring the ancilla qubit in the state is
(2) |
The success probability of measuring all ancilla qubits in the state is given by product,
(3) |
If we now take random values of , we have an energy filter for . The geometric mean of when sampled uniformly over all is equal to . Therefore the spectral weight for any is suppressed by a factor of for large .
In Fig. 2 we plot the probability of measuring the state for all ancilla qubits versus for (dotted black line), (dashed blue line), and (solid red line) cycles with Gaussian random values of with root-mean-square value . If we use a Gaussian approximation for near its maximum value of at , we find that the width of the peak scales as .

Let be the desired energy resolution of our rodeo algorithm such that all energy eigenvectors outside of the interval are exponentially suppressed. If we choose to scale proportionally with , then we achieve the desired energy filtering with energy resolution . The actual peak width will be a factor of narrower than , but that is needed to get exponential suppression as a function of for all energies further than from .
In Fig. 3 we plot versus for Gaussian random values of using several values for . We show (open circles), (open triangles), (open diamonds), and (open squares). We present the predicted asymptotic scaling, , with filled circles. We see that for greater than , the expected asymptotic scaling is achieved. Therefore, if is larger than twice the inverse spacing between energy levels, then scales as for large .

Let us now consider what happens for an arbitrary initial state . Let be the energy eigenvalue nearest to , and let be the corresponding eigenvector. In the limit of large , the probability that we measure the state times in a row is , where is the overlap probability of the initial state with , and is the success probability for . By tuning equal to , this probability becomes . If we require that the spectral weights of all other energy eigenvectors outside the interval are suppressed by a factor , then the computational effort scaling for the rodeo algorithm is .
In order to successfully determine any given energy eigenvalue with error , the computational cost scales as . The search process involves sequential scans of the energy, each scan sweeping over an energy range that is some constant factor smaller than the previous scan. Each scan is performed for several evenly spaced values of , with a fixed number of rodeo cycles, and a factor of larger than that used for the previous scan. The total time evolution required will scale as , and the factor of comes from the required statistics needed to perform the energy scans successfully with high probability. The resulting performance as a function of is close to the bound set by the Heisenberg uncertainty principle. For comparison, the computational effort for phase estimation is plus an additional cost that is associated with the quantum Fourier transform. Iterative phase estimation eliminates the need for the quantum Fourier transform, but is suitable only for finding the energy of a pure eigenstate. We note that the direct calculation of the expectation value of the Hamiltonian for a pure eigenstate requires measurements due to statistical errors.
In order to successfully prepare any given eigenstate with a residual orthogonal component that has magnitude , the computational cost is . For this case, we keep fixed but large enough that we are filtering out only the desired eigenstate. We perform cycles of the rodeo algorithm, and this must be multiplied by for the number of measurements required. In preparing the eigenstate, it is important to keep centered on the peak maximum associated with . Re-centering with each cycle requires only a constant overall factor in the computational cost that is independent of and . In contrast, the computational cost for the same task using phase estimation requires an effort that scales as . Adiabatic evolution requires an effort that is times a function of which depends on the adiabatic path connecting the initial and final Hamiltonians Wiebe and Babcock (2012). We see that for eigenstate preparation, the rodeo algorithm is exponentially faster than both phase estimation and adiabatic evolution in the limit .
From Eq. (3), we can also derive two useful estimates for , the magnitude of the residual orthogonal component, as a function of the number of rodeo cycles, ,
(4) |
is appropriate for the case when is much smaller than the number of eigenstates with nonzero overlap with our initial state. This corresponds with a spectral suppression factor of at each order for the undesired eigenstates, corresponding with the arithmetic mean of . is appropriate for the case when is much larger than the number of eigenstates with nonzero overlap with our initial state. This corresponds with a spectral suppression factor of at each order for the undesired eigenstates, corresponding with the geometric mean of .
The rodeo algorithm depends heavily on the initial-state overlap probability . It is, therefore, very helpful to improve the quality of the initial state. One possible approach is to make a variational ansatz based on physical intuition about the nature of the eigenvector. Another strategy is to use domain decomposition to define a variational ansatz as a tensor product of wave functions on smaller subsystems. Yet another approach is some combination of variational methods and adiabatic evolution such as the quantum approximate optimization algorithm Farhi et al. (2014).
As a first application of the rodeo algorithm, we consider the spin- Heisenberg model in a uniform magnetic field with sites forming a closed one-dimensional chain Heisenberg (1928). The Hamiltonian has the form
(5) |
where is the exchange coupling, are the Pauli matrices on site , indicates nearest neighbors, and is the coupling to a uniform magnetic field in the direction. We consider the antiferromagnetic case with values and . For our initial state we use an alternating tensor product state,
(6) |
Since our initial state has a high degree of symmetry, we expect our initial state to have nonzero overlap with a relatively small number of energy eigenstates.
Let us label the energy eigenstates of as . We define the initial-state spectral function as for and otherwise. For the case of exact degeneracy, we sum the contribution from all degenerate energy states. In Fig. 4, we plot the initial-state spectral function using the rodeo algorithm for the Heisenberg spin chain with (thin blue line), (thick green line), and (medium red line) cycles. We have averaged over sets of Gaussian random values for with . This averaging over sets of random values for decreases the stochastic noise and results in a roughly constant background that can be distinguished from the spectral signal. For comparison, we show the exact initial-state spectral function with black open circles. We see that the agreement obtained using the rodeo algorithm is excellent.
The real challenge will be to perform these calculations on quantum computing devices with gate errors, measurement errors, and short decoherence times. But it is promising that we can obtain good results even though neither nor are very large. The resulting short gate depth is crucial for implementation on noisy quantum devices. In the Supplemental Materials, we show the corresponding results with . Even in that case, we can clearly identify the spectrum of energy states with strong overlap with the initial state.

In addition to computing the initial-state spectral function, we can also prepare any energy eigenstate that has nonzero overlap with our initial state. In the Supplemental Materials, we show the overlap probability with energy eigenvector after cycles of the rodeo algorithm. All of the energy eigenvectors with nonzero overlap with our initial state can be prepared with a relatively small number of rodeo cycles. After an energy eigenstate has been prepared using the rodeo algorithm, we can measure any properties of that eigenstate that we choose, such as expectation values of observables, transition matrix elements to other energy eigenstates, and linear response functions. Several examples of such calculations using prepared energy eigenstates will be discussed in a future publication. See also Ref. Roggero and Carlson (2019); Roggero et al. (2020); Roggero (2020) for some approaches to computing linear response functions and spectral densities.
In Fig. 5, we show results for the logarithm of the wave function error for the rodeo algorithm when preparing the energy eigenstate corresponding to . We plot the logarithm of the magnitude of the orthogonal complement, , versus the total time evolution, , for . For comparsion, we show the estimates and defined in Eq. (4). As expected, for small , provides a good estimate, while for very large , provides a better estimate. For comparison, we also show the analogous results obtained with the same initial state but instead using phase estimation and adiabatic evolution. For the adiabatic evolution calculation, we use the initial Hamiltonian , with an interpolating function . We note that phase estimation and adiabatic evolution are similar in performance, while the rodeo algorithm is exponentially faster than both.

Even though the rodeo algorithm is more efficient than adiabatic evolution for eigenstate preparation, we can use adiabatic evolution as a preconditioner for the rodeo algorithm, in order to amplify the overlap of the initial state with the desired eigenvector. In Table S1, we show the overlap probability for energy eigenvector with after preconditioning with adiabatic evolution for time and applying cycles of the rodeo algorithm with . We see that by preconditioning with , we achieve a more than sevenfold increase in the initial state overlap probability. We gain a significant computational advantage when using adiabiatic evolution as a preconditioner for the rodeo algorithm and expect this strategy to be very useful for larger system calculations.
0 | |||||
---|---|---|---|---|---|
5 |
As a second application of the rodeo algorithm, we consider the Anderson localization model in one dimension, which describes the transition between extended and localized electronic states in the presence of spatially-varying disorder Anderson (1958); Abrahams et al. (1979). Our object Hamiltonian describes a single particle on a periodic, one-dimensional lattice with sites. Let us denote the position basis states as with . The matrix elements of the object Hamiltonian are
(7) |
where the coefficients provide diagonal disorder that control the amount of localization of the electronic wave functions. In this example, we take the diagonal terms to be Gaussian random numbers with zero mean and root-mean-square value equal to . With this amount of diagonal disorder, the resulting orbitals are rather localized in space. In the Supplemental Materials, we also present results for the case where diagonal disorder is much weaker and the energy eigenstates are delocalized in space.
As a variational ansatz for the ground state, we take our initial state to be the basis state such that is the lowest diagonal element of the Hamiltonian. This choice reflects our physical intuition that the ground state is spatially localized. In Fig. 6, we plot the initial-state spectral function using the rodeo algorithm for the Anderson localization model with the root-mean-square diagonal disorder equal to . We consider (thin blue line), (thick green line), and (medium red line) cycles. We have also averaged over sets of Gaussian random values for with . For comparison, we show the exact initial-state spectral function with black open circles. We see that the exact spectral function is well reproduced. The fact that our point-like initial state has significant overlap with only a small fraction of energy eigenstates is an indication of the localized character of the orbitals.

In this letter, we have presented a new method called the rodeo algorithm for preparing quantum eigenstates and determining spectral properties. It uses a tunable energy filter and stochastic methods to prepare any eigenstate of a given quantum Hamiltonian and can in fact be used to prepare the eigenstates of any quantum observable. It is an efficient algorithm with exponential convergence that can be performed using circuits with relatively short gate depth. In particular, the speed for eigenstate preparation is exponentially faster than that for phase estimation or adiabatic evolution. The rodeo algorithm can be combined with variational methods and/or quantum adiabatic evolution to provide a tool for solving the quantum many-body problem even when there is no a priori information about the target eigenvector. It has the potential for wide applicability across many different fields, including combinatorial optimization problems, strongly-correlated electrons, nuclear structure and dynamics, and lattice quantum chromodynamics. The results presented here were obtained from classical computation, but we are now working to implement the rodeo algorithm on quantum devices using several quantum Hamiltonians. The results will be presented in future publications.
Acknowledgements
We are grateful for discussions with Joseph Carlson, Gabriel Given, Erik Gustafson, Caleb Hicks, Ning Li, Bing-Nan Lu, Yannick Meurice, Sofia Quaglioni, John Rickert, Alessandro Roggero, Avik Sarkar, Nathan Wiebe, Kyle Wendt, and Boris Zbarsky. We acknowledge financial support from the U.S. Department of Energy (DE-SC0018638 and DE-SC0021152), Los Alamos National Laboratory, NUCLEI SciDAC-4 collaboration, and the Center for Excellence in Education as part of the 2020 Research Science Institute.
References
- Low and Chuang (2019) G. H. Low and I. L. Chuang, Quantum 3, 163 (2019).
- Low and Chuang (2017) G. H. Low and I. L. Chuang, Phys. Rev. Lett. 118, 010501 (2017).
- Childs et al. (2019) A. M. Childs, A. Ostrander, and Y. Su, Quantum 3, 182 (2019).
- Campbell (2019) E. Campbell, Phys. Rev. Lett. 123, 070503 (2019).
- Childs et al. (2019) A. M. Childs, Y. Su, M. C. Tran, N. Wiebe, and S. Zhu, (2019), arXiv:1912.08854 [quant-ph] .
- Meister et al. (2020) R. Meister, S. C. Benjamin, and E. T. Campbell, (2020), arXiv:2007.11624 [quant-ph] .
- Trotter (1959) H. F. Trotter, Proc. Amer. Math. Soc. 10, 545 (1959).
- Suzuki (1976) M. Suzuki, Comm. Math. Phys. 51, 183 (1976).
- Childs and Wiebe (2012) A. M. Childs and N. Wiebe, Quantum Inf. Comput. 12, 901 (2012).
- Farhi et al. (2000) E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser, “Quantum computation by adiabatic evolution,” (2000), arXiv:quant-ph/0001106 .
- Farhi et al. (2001) E. Farhi, J. Goldstone, S. Gutmann, J. Lapan, A. Lundgren, and D. Preda, Science 292, 472 (2001).
- Lee et al. (2020) D. Lee, J. Bonitati, G. Given, C. Hicks, N. Li, B.-N. Lu, A. Rai, A. Sarkar, and J. Watkins, Phys. Lett. B 807, 135536 (2020).
- Gustafson (2020) E. Gustafson, Phys. Rev. D 101, 071504 (2020).
- Kitaev (1995) A. Y. Kitaev, “Quantum measurements and the Abelian Stabilizer Problem,” (1995), arXiv:quant-ph/9511026 [quant-ph] .
- Ge et al. (2017) Y. Ge, J. Tura, and J. Cirac, Journal of Mathematical Physics 60, 022202 (2017).
- Lu et al. (2020) S. Lu, M. C. Banuls, and J. I. Cirac, “Algorithms for quantum simulation at finite energies,” (2020), arXiv:2006.03032 .
- Wiebe and Babcock (2012) N. Wiebe and N. S. Babcock, New Journal of Physics 14, 013024 (2012).
- Farhi et al. (2014) E. Farhi, J. Goldstone, and S. Gutmann, (2014), arXiv:1411.4028 [quant-ph] .
- Heisenberg (1928) W. Heisenberg, Zeitschrift für Physik 49, 619 (1928).
- Roggero and Carlson (2019) A. Roggero and J. Carlson, Phys. Rev. C 100, 034610 (2019).
- Roggero et al. (2020) A. Roggero, A. C. Li, J. Carlson, R. Gupta, and G. N. Perdue, Phys. Rev. D 101, 074038 (2020).
- Roggero (2020) A. Roggero, Phys. Rev. A 102, 022409 (2020).
- Anderson (1958) P. Anderson, Phys. Rev. 109, 1492 (1958).
- Abrahams et al. (1979) E. Abrahams, P. Anderson, D. Licciardello, and T. Ramakrishnan, Phys. Rev. Lett. 42, 673 (1979).
I Supplemental Materials
I.1 Initial-state spectral function for the Heisenberg model
In Fig. S1, we plot the initial-state spectral function using the rodeo algorithm for the Heisenberg spin chain with (thin blue line), (thick green line), and (medium red line) cycles. We have averaged over sets of Gaussian random values for with . For comparison, we also show the exact initial-state spectral function with black open circles. We observe that the spectral function is well reproduced even though is rather small and the number of cycles is also not large.

I.2 Eigenstate preparation for the Heisenberg model
In addition to computing the initial-state spectral function, we can also prepare any energy eigenstate that has nonzero overlap with our initial state. In Table S1 we show the overlap probability with energy eigenvector after cycles of the rodeo algorithm. We use Gaussian random values for with and set . All of the energy eigenvectors with nonzero overlap with our initial state can be prepared with a relatively small number of rodeo cycles.
I.3 Initial-state spectral function for the Anderson localization model
As a final example, we consider the Anderson localization model again, but this time with much weaker diagonal disorder. In Fig. S2, we plot the initial-state spectral function using the rodeo algorithm for the Anderson localization model with the root-mean-square diagonal disorder equal to . With this small amount of diagonal disorder, the excited state orbitals are delocalized in space. We again take our initial state to be the basis state such that is the lowest diagonal element of the Hamiltonian. We show (thin blue line), (thick green line), and (medium red line) cycles. We have averaged over sets of Gaussian random values for with . For comparison, we also show the exact initial-state spectral function with black open circles. We observe that the spectral function is again well reproduced. The fact that our point-like initial state has a small but discernible overlap with most of the excited states is evidence of the extended spatial character of the orbitals.

While keeping the root-mean-square diagonal disorder equal to , we now show the corresponding results using to better resolve the details of the excited-state spectrum. In Fig. S3, we plot the initial-state spectral function using the rodeo algorithm for the Anderson localization model, again with the initial state chosen to be the basis state such that is the lowest diagonal element of the Hamiltonian. We show (thin blue line), (thick green line), and (medium red line) cycles. We have averaged over sets of Gaussian random values for with . We take this larger value for to resolve the details of the excited-state spectrum. For comparison, we also show the exact initial-state spectral function with black open circles. We see that the entire spectral function is well reproduced. Our point-like initial state has a small but discernible overlap with most of the excited states, indicating the extended spatial character of the excited-state orbitals.
