Letter The following article is Open access

Boosting quantum amplitude exponentially in variational quantum algorithms

, , , , , and

Published 10 October 2023 © 2023 The Author(s). Published by IOP Publishing Ltd
, , Focus on Recent Progress in Quantum Computation and Quantum Simulation Citation Thi Ha Kyaw et al 2024 Quantum Sci. Technol. 9 01LT01 DOI 10.1088/2058-9565/acf4ba

2058-9565/9/1/01LT01

Abstract

We introduce a family of variational quantum algorithms, which we coin as quantum iterative power algorithms (QIPAs), and demonstrate their capabilities as applied to global-optimization numerical experiments. Specifically, we demonstrate the QIPA based on a double exponential oracle as applied to ground state optimization of the H2 molecule, search for the transmon qubit ground-state, and biprime factorization. Our results indicate that QIPA outperforms quantum imaginary time evolution (QITE) and requires a polynomial number of queries to reach convergence even with exponentially small overlap between an initial quantum state and the final desired quantum state, under some circumstances. We analytically show that there exists an exponential amplitude amplification at every step of the variational quantum algorithm, provided the initial wavefunction has non-vanishing probability with the desired state and that the unique maximum of the oracle is given by $\lambda_1\gt0$, while all other values are given by the same value $0\lt\lambda_2\lt\lambda_1$ (here λ can be taken as eigenvalues of the problem Hamiltonian). The generality of the global-optimization method presented here invites further application to other problems that currently have not been explored with QITE-based near-term quantum computing algorithms. Such approaches could facilitate identification of reaction pathways and transition states in chemical physics, as well as optimization in a broad range of machine learning applications. The method also provides a general framework for adaptation of a class of classical optimization algorithms to quantum computers to further broaden the range of algorithms amenable to implementation on current noisy intermediate-scale quantum computers.

Export citation and abstract BibTeX RIS

Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 license. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

1. Introduction

Quantum computers promise exponential speedup over classical counterparts in solving certain tasks [1]. When fault-tolerant general-purpose quantum computers become available, adiabatic state preparation and quantum phase estimation may become the standard quantum routines for determining the ground-state energy of sophisticated physical Hamiltonians [25]. However, such schemes are very costly in terms of required overhead and hence are not suitable for the current era of noisy intermediate-scale quantum (NISQ) hardware [610]. This limitation of quantum computers today shifts central attention towards low-depth hybrid quantum–classical algorithms, known as NISQ algorithms [1114]. The variational quantum eigensolver (VQE) [15, 16] serves as a prototypical example, as an algorithm that computes the expectation value of a Hamiltonian, which is measured on a quantum machine, resulting in a cost function with a set of variational parameters, which are optimized using classical computers. The process is repeated until the cost function reaches its local minimum.

On the other hand, the variational quantum simulator [17] has been proposed for hybrid quantum–classical simulations of quantum dynamics based on the McLachlan's variational principle [18, 19], including quantum imaginary time evolution (QITE) to prepare ground states [1820]. Here, we introduce the 'quantum iterative power algorithm' inspired by the variational quantum simulator to provide an accelerated method to the general problem of global optimization with near term quantum computers.

Global optimization is central to many important problems in science and engineering, from back-propagation in machine learning [21] and molecular geometry optimization/protein structure prediction [22, 23] to route planning and control of drone/unmanned aerial vehicles [24]. However, the brute force approach of considering each possible element of a search space often becomes computationally intractable. For example, identification of the optimal configuration of a protein faces Levinthal's paradox [25]—that the native configuration must be identified out of about 10300 possibilities. This has inspired a broad array of both classical [26] and quantum computing [27] optimizers. Recently, we have shown that tensor trains [28, 29] (also known as matrix product states) provide a way to vastly reduce the computational cost of exploring low-rank optimization cost functions, and have employed the approach to introduce an optimization algorithm that deterministically explores the full search space in data-compressed form, the tensor-train 'iterative power algorithm (IPA)' [30].

We recognize the strategy of tensor-train IPA can be implemented on quantum computers to enable global optimization of an even broader class of optimization problems. In tensor-train IPA, the optimization cost function of interest is taken to be a potential energy surface. A density is initialized in the potential energy surface, and an oracle is iteratively applied in a sifting approach akin to imaginary time propagation (with infinite mass) to localize the density as a delta function at the global minimum position. The expectation value of position then gives the location of the global minimum. Tensor-train IPA represents the density and potential energy surface as tensor trains to avoid calculation of the cost function everywhere in search space, which is efficient for representation of problems amenable to low-rank representations, such as prime factorization or molecular geometry optimization [30]. However, the tensor-train strategy faces the roadblock that highly-correlated systems cannot be efficiently represented in low-rank tensor-train format. In contrast, quantum computers excel in the simulation of highly-correlated systems, as the coupling or entanglement between qubits is limited only by the choice of ansatz [31].

The quantum iterative power algorithm (QIPA) takes advantage of the high degree of entanglement possible on quantum computers with a hybrid variational scheme. In standard variational approaches such as the VQE [15, 16], classical optimizers are used to determine the parameters of a quantum circuit, which are used to prepare trial wavefunctions measured to obtain expectation values. Analogously, the variational quantum simulator [17] evolves the parameters that define the time-evolved wavefunction by using a classical computer that integrates the Euler–Lagrange equation obtained from the Schrödinger equation with the McLachlan's variational principle. Parameters required by the Euler–Lagrange equation are obtained with a quantum circuit with a small number of quantum operations. QIPA generalizes the variational quantum approach to evolve an initial wavefunction such that the corresponding probability density (modulus squared of the wavefunction) becomes localized at the global minimum of a given cost function (see figure 1). As in IPA, the propagator of QIPA is not limited to the imaginary time quantum propagator enabling the use of other propagators that are maximal at the minimum of the cost function.

Figure 1.

Figure 1. Sketch of the quantum iterative power algorithm. First, the physical problem is mapped into the language of the quantum computer. Second, initialization of a parameterized wavefunction $\vert{\phi(\theta(\tau))}\rangle$ is achieved by using a certain quantum ansatz circuit. Third, based on the ansatz choice, Hadamard test measurements are performed to obtain the matrix A and vector C on the quantum computer. Fourth, the new parameters θ are obtained from A and C on the classical computer. If the desired convergence is obtained, the program is stopped and the global minima are identified. Otherwise, the step of evaluating A and C is repeated to obtain new angles θ .

Standard image High-resolution image

Figure 1 and algorithm 1 show the overall workflow of the QIPA. First, we select parameters $\theta_1,\theta_2,\dots,\theta_{\mathcal{N}_\theta}$ corresponding to the initial state. Second, we use a quantum coprocessor to perform the Hadamard tests, resulting in ${A}_{k,m}$ and Ck of $\sum_m {A}_{k,m}\dot{\theta}_m = C_k$. There are a number of ways to get an approximate solution to the linear equation. Here, we used the conjugate gradient method without needing to invert the matrix A to get a solution $\dot{\boldsymbol{\theta}}$, using a classical computer. Next, we update the parameters θ by the Euler method. Having updated the parameters, the process is iterated until convergence to obtain parameters θ corresponding to a distribution function localized at the global minimum.

Algorithm 1. Variational QIPA.
Require: Hamiltonian $\hat{H}$ and initial state $\vert{\psi(0)}\rangle = \vert{0}\rangle^{\otimes\mathcal{N}}$
  1: Start with an ansatz $\vert{\phi(\boldsymbol{\theta}_0)}\rangle = U(\boldsymbol{\theta}_0)\vert{\bar{0}}\rangle$ at time τ = 0;
  2: Evaluate Hadamard tests to form the matrix $\textbf{A}(\tau)$ and the vector $\textbf{C}(\tau)$ (quantum computer subroutine);
  3: Compute an approximate solution ξτ of $\textbf{A}(\tau)\dot{\boldsymbol{\theta}}(\tau) = \textbf{C}(\tau)$ via the conjugate gradient method(classical computer subroutine);
  4: Update the parameter as $\boldsymbol{\theta}(\tau+\delta\tau)\leftarrow\boldsymbol{\theta}(\tau)+\xi_\tau\delta\tau$ and set $\tau\leftarrow\tau+\delta\tau$;
  5: Repeat steps 2–4 until $\tau = \tau_{\textrm{total}}$ or the convergence criteria is met;

2. Results

We are interested in a particular case of global optimization involving the search of the ground state of a Hamiltonian $\hat{H}$: a problem that is typically solved by the imaginary time propagation. QIPA can solve the same problem analogously by using $\hat{H}$ in the normalized oracle function $f(\hat{H};\tau)$ that acts on the initial wavefunction $\vert{\psi(0)}\rangle$, as follows (onwards setting $\hbar = 1$):

Equation (1)

where ${U}(\tau)$ is an arbitrary oracle function with maximum at the global minimum position of the potential energy surface M, or here the Hamiltonian $\hat{H}$. In the following, we show that oracles defined by concatenated exponential functions,

Equation (2)

with $n\unicode{x2A7E}1$ the number of concatenated exponentials, $\beta_0(y) = y,\,\beta_1(y) = e^{b_1 y},\beta_2(y) = e^{b_2e^{b_1y}},\ldots$ and real constants $b_1,\dots,b_n\neq 0$, provide effective QIPAs based on a generalization of the McLachlan's variational principle (SI appendix A.2.). For example, the oracle defined by the double-exponential $U_2(\tau) = e^{e^{-\tau\hat{H}}}$ is obtained by setting n = 2 and $b_2 = b_1 = 1$.

We remark that the choice of U1 corresponds to the standard QITE, which is widely used in quantum Monte Carlo algorithms. References [18, 19] show that one can perform imaginary time evolution [20] with unitary gates defined by equation (1) with n = 1 that evolve the initial state according to the Wick-rotated Schrödinger equation: $ {\partial\vert{\psi(\tau)}\rangle}/{\partial\tau} = -\left(\hat{H}-E_1(\tau)\right)\vert{\psi(\tau)}\rangle, $ where $E_1(\tau) = \langle{\psi(\tau)}\vert\hat{H}\vert{\psi(\tau)}\rangle$. Here, we introduce a family of near-term quantum algorithms defined by βn with $n\unicode{x2A7E} 1$ that evolve the initial state according to the generalized Wick-like-rotated Schrödinger equation (SI appendix A.3.):

Equation (3)

where $\hat{S}_{n-1} = \sum_{k = 1}^{n-1}b_k\beta_{k-1}(-\hat{H}\tau)$.

With the choice n = 2 and $b_2 = b_1 = 1$ we arrive at a double-exponential function and the following Wick-like-rotated Schrödinger equation:

Equation (4)

with $E_2(\tau) = \langle\psi(\tau)\mid\hat{H}e^{-\hat{H}\tau}\mid\psi(\tau)\rangle$. According to the McLachlan's variational principle, when we constrain the equation of motion as such

Equation (5)

the result is equivalent in finding a solution of the linear equation: $ \sum_mA_{k,m}\dot{\theta}_m = C_k, $ where the entries of the symmetric and positive semi-definite matrix A and the right-hand side C can be computed on a quantum computer by deploying the Hadamard tests. The parameters θ are updated with $\dot{\boldsymbol{\theta}}$ for a short time step $\delta\tau\gt0$ according to the Euler method as $\boldsymbol{\theta}(\tau+\delta\tau)\approx\boldsymbol{\theta}(\tau)+\dot{\boldsymbol{\theta}}(\tau)\delta\tau$. The underlying assumption is that we can approximate $\vert{\psi(\tau)}\rangle$ by $\vert{\phi(\boldsymbol{\theta}(\tau))}\rangle = U(\theta_1(\tau))U(\theta_2(\tau))\cdots U(\theta_{\mathcal{N}_\theta}(\tau))\vert{\bar{0}}\rangle$, where $\vert{\bar{0}}\rangle = \vert{0}\rangle^{\otimes\mathcal{N}}$ and $U(\theta_1(\tau)),\dots,U(\theta_{\mathcal{N}_\theta}(\tau))$ are parameterized quantum circuits (PQCs), with $\boldsymbol{\theta} = (\theta_1,\dots,\theta_{\mathcal{N}_\theta})$ the corresponding real-valued parameter vector.

2.1. Exponential amplitude amplification

To precisely define what exponential amplitude amplification means, let us look at a general setting where we are interested to find a unique ground state $\vert{\Psi}\rangle$ of a quantum system $\hat{H}$, assuming no degeneracy. In variational quantum algorithms, one is interested to find the ground state as close as possible using hybrid quantum–classical approach and would end up obtaining an approximate state $\vert{\Phi}\rangle$, where $|\langle\Psi|\Phi\rangle| = \gamma$. It was recently shown that $\gamma \propto \exp(-\mathcal{N})$ [32] as the system size $\mathcal{N}$ grows for complex chemical molecular systems. In a specific condition that we are interested in (within the reach of the variational quantum ansatz), we prove analytically that γ can be amplified in exponentially less number of timesteps defined by the ratio $\iota = \lambda_{1,U_1}/\lambda_{2,U_1}$. The number of timesteps necessary to achieve more than $50\%$ fidelity with the final desired quantum state is bounded by $k_\mathrm{QIPA}/k_\mathrm{QITE}\unicode{x2A7E} \frac{\log \iota}{\lambda_{2,U_1}(\iota-1)}$ (SI appendix D), which serves as a lower bound for all optimization problems in the manuscript, and that the proof can be generalized to the case of multiple global optima.

We are aware that local quantum Hamiltonian ground state problem is quantum Merlin Arthur (QMA)-complete and our approach does not change such problem's computational complexity class. We are merely pointing out that there is a special case with the proposed algorithm, where we are able to converge the solution in exponentially less number of steps as compared to the existing QITE program.

We remark that we used double-exponential oracle function as a particular working example. Other types of oracle functions such as $U(\tau) = \operatorname{sech}(\hat{H}\tau)$ can also be used (SI appendix F). The choice of an oracle function highly depends on the problem considered and the desired rate of convergence. The change in oracle function would result in the different convergence rate, with $k_\mathrm{QIPA}/k_\mathrm{QITE}\unicode{x2A7E} \varepsilon$, where $\varepsilon \ll 1.$ Here, ε is an arbitrarily small number based on the choice of a new oracle.

2.2. Resource estimate and error analysis

In general, for an $\mathcal{N}$-qubit system with Hamiltonian $\hat{H}$ with $\mathcal{N}_H\unicode{x2A7E} 1$ Pauli words and a parameterized wavefunction $\vert{\phi (\boldsymbol{\theta})}\rangle$ (where τ dependency $\boldsymbol{\theta}(\tau)$ is understood throughout) with $\mathcal{N}_\theta\unicode{x2A7E} 1$ parameters, the upper bound for the number of distinct measurements $\mathcal{N}_{A}$ required to obtain the matrix A for QIPA via the Hadamard test and the number of gates required are $\mathcal{N}_\theta(\mathcal{N}_\theta-1)/2$ and $G_{\mathcal{N}_A}\unicode{x2A7E}\mathcal{N}_\theta$, respectively. Such an estimate can be understood as the number of times required to completely evaluate all the A matrix elements since A is symmetric. Moreover, to obtain the vector C, the number of measurements and gates required (assuming a second-order Taylor series expansion of the required function of the Hamiltonian) are $\mathcal{N}_\theta$ and $G_{\mathcal{N}_C}\unicode{x2A7E}\mathcal{N}_H+\mathcal{N}_H^2+\mathcal{N}_H^3+\mathcal{N}_\theta$, respectively. '$\gt$' sign in $G_{\mathcal{N}_{A}}$ and $G_{\mathcal{N}_{C}}$ holds when two-qubit gates are not parameterized, while '=' sign holds when they are parameterized. Assuming a polynomial scaling: $\mathcal{N}_H = \mathcal{O}(\mathcal{N}^h)$, $\mathcal{N}_\theta = \mathcal{O}(\mathcal{N}^d)$, the leading order becomes $\mathcal{N}_{A} = \mathcal{O}(\mathcal{N}^{d})$ and $\mathcal{N}_C = \mathcal{O}(\mathcal{N}^{\textrm{max}(3h,d)})$, respectively. In comparison, in QITE, one needs $\mathcal{N}_A = \mathcal{O}(\mathcal{N}^{d})$ and $\mathcal{N}_C = \mathcal{O}(\mathcal{N}^{\textrm{max}(h,d)})$, with the same number of Hadamard test measurements required. In general, QIPA yields improved convergence in shorter times compared to QITE, requiring the same number of Hadamard test operations and a higher number of unitary gates. More importantly, we have also estimated that the error from the Taylor expansion causing the major difference between QITE and QIPA is given by $ \epsilon = \sqrt{\Delta^2\delta\tau^2+\mathcal{O}(\delta\tau^3)} \unicode{x2A7D}\Delta\delta\tau+\mathcal{O}(\delta\tau^{3/2}),$ where $ \Delta^2 = \langle{\Psi(t)}\vert( (1+e^{-\hat{H}\delta\tau})^2/(\delta\tau^2)+2(e^{-\hat{H}\delta\tau}-1)\hat{H}/\delta\tau-(e^{-\hat{H}\delta\tau}-2)\hat{H}^2 )\vert{\Psi(t)}\rangle $ (SI appendix E).

2.3. Numerical experiments

Figure 2 shows that one can efficiently search for the ground-state energy of hydrogen molecule across various bond stretching distances with QIPA with fewer time steps than QITE. Results are shown in figure 2(a) comparing QIPA and QITE. For consistency and fair comparison, we use the same time step for each bond distance for both QIPA and QITE runs. The error difference between the exact energy obtained from full configuration interaction (CI) calculations and the QIPA and QITE results can be seen in figure 2(b). QIPA features less error for all bond distances considered even though the accuracy of both QITE and QIPA deteriorates as the system goes into the highly correlated regime. Alternative ansatz circuits could be considered for increased accuracy.

Figure 2.

Figure 2. (a) $\textrm{H}_2$ energy dissociation curve in the minimal basis set (sto-3g), 4-qubit numerical experiments. Exact diagonalization result/ full CI (black solid line) is seen with data points from QIPA (red squares) and QITE (black dots) runs for different bond distances. (b) Absolute energy difference between the exact energy and the QIPA and QITE results in Hatrees, corresponding to the data in (a). As the bond distance grows, the accuracy of both QITE and QIPA deteriorates as the system goes into the highly correlated regime. (c) Ground-state energy optimization plot for a flux tunable transmon at the external flux f = 0.25 as a function of the number of iteration steps for both QIPA and QITE, 4-qubit numerical experiments. In all results, both QIPA and QITE are run with the same time step δτ for a fair comparison. Here QIPA runs require significantly fewer steps to reach the convergence criteria. See SI appendix G and H for the respective Hamiltonians. See figure G1 for the quantum circuits used in the respective numerical simulations.

Standard image High-resolution image

As shown in figure 2(c), both QITE and QIPA successfully minimize the energy of a given transmon circuit. Moreover, QIPA requires significantly fewer iterations than QITE for global optimization of the energy. These results constitute the successful implementation of two forms of imaginary-time-like evolution to perform quantum computer-aided design (QCAD), i.e. to think in a 'reverse-engineering way' to find out optimal quantum system parameters, in this case being classical circuit parameters of the superconducting circuit, given one desired energy spectrum of the quantum system. Previous methods [3335] used VQE approach whereas ours is in the form of variational quantum simulator.

According to figures 3(a) and (b), we find QIPA identifies the prime factors of biprimes with fewer iterations than QITE for all integers factored. The number of required iterations varies depending on the biprime factored and the ansatz, with speedups shown here of up to 50%. In addition, QIPA successfully identifies both factors of biprimes. As expected, QIPA succeeds for stable integration with a small, converged time step, for which the twin solutions are readily identified as the two components of the final wavefunction with the largest and equal amplitude. Moreover, QIPA succeeds for unstable integration with a larger time step, for which the twin solutions are identified as the two largest components of the final wavefunction with unequal amplitude, as depicted in figure 3(c). To our knowledge this ability to identify multiple prime factors is unique among published quantum computing prime factorization results.

Figure 3.

Figure 3. QIPA factorization of biprimes 55, 65, 77, and 91 with 5 qubits for the (a) YZ and (b) Y Ansatz (SI appendix J) as compared to QITE for equal time steps, and (c) the amplitude of the wavefunction components corresponding to the prime factors of 15 with 4 qubits for varying numbers of time steps in QIPA. The black dashed line represents to the final amplitude of the wavefunction component with the largest magnitude at convergence. Here, all the horizontal dashed lines represent pre-defined numerical threshold where our algorithm would stop running.

Standard image High-resolution image

3. Discussion

In summary, we have presented a family of generalized imaginary-time-like near-term quantum algorithms which we coin the 'quantum iterative power algorithm,' inspired by its classical counterpart. (Plural 'algorithms' is used since depending on the choice of oracle function, the performance and behavior will differ. However, they all fall under the same family.) We have analyzed its convergence rate. One caveat is that since the proposed algorithm relies heavily on the ansatz circuit used, its convergence rate is difficult to discern in the generic case. We have also determined QIPA's estimated resource count as well as analytical error analysis, and demonstrated it can outperform the QITE while it reduces the number of required iterations, at the cost of a moderate increase in the number of gates. We note that even when the initial quantum state has an exponentially small overlap with the final target state, QIPA needs only a polynomial number of steps to reach convergence (SI appendix D). This is particularly important when starting with an initial state defined by a uniform superposition, or a low-rank reference state for a highly correlated system [32]. Furthermore, we have used the three numerical case studies—quantum chemical molecular simulation of the hydrogen molecule for various bond dissociation distances, quantum computer-aided design of a superconducting transmon, and finding optimal solutions for double prime factorization—to highlight how QIPA outperforms QITE. The simulation accuracy could be further improved by integrating with existing quantum error mitigation methods [17, 3641].

We would like to point out that an additional consideration for such an algorithm besides the choice of the ansatz circuit is setting the right parameter for the time step δτ at each evolution step. A number of proposals [42, 43] suggest the use of an adaptive time step to overcome such an issue. However, there exists an opportunity to develop a systematic way to adjust the time step δτ according to gradient descent, rather than with a heuristic argument on how to adjust δτ. A major drawback with quantum imaginary-time-like evolution algorithm is that it involves constructing the matrix elements of A with NISQ hardware. Since we are working with noisy quantum hardware, any large fluctuation in the matrix elements would result in suboptimal angles θ . Future work will explore conditioning the matrix based on errors associated with performing the Hadamard tests.

Acknowledgments

T H K, C S, and A A-G acknowledge funding from Dr Anders G Frøseth. A A-G also acknowledges support from the Canada 150 Research Chairs Program, the Canada Industrial Research Chair Program, and from Google, Inc. in the form of a Google Focused Award. M B S acknowledges financial support from the Yale Quantum Institute Postdoctoral Fellowship. V S B acknowledges support from the Center for Quantum Dynamics on Modular Quantum Devices (NSF Grant No. CHE-2124511) and computational resources from NERSC and the Yale Center for Research Computing High Performance Computing. We acknowledge fruitful discussions with Jakob Kottmann, Abhinav Anand, Sabre Kais, Eitan Geva, Raja Selvarajan, Suguru Endo, Xiao Yuan, Ellen Mulvihill, and Zi-jian Zhang. Numerical simulations of quantum circuit evaluations for the $\textrm{H}_2$ and transmon quantum systems were performed on the Niagara supercomputer at the SciNet HPC Consortium [44, 45]. SciNet is funded by the Canada Foundation for Innovation, the Government of Ontario, Ontario Research Fund-Research Excellence, and the University of Toronto. The Tequila package [46] has been used to implement all the quantum circuit operations, using Qulacs [47] as a quantum backend.

Data availability statement

The data that support the findings of this study are openly available at the following URL/DOI: https://github.com/aspuru-guzik-group/QIPA/.

Appendix A: Quantum iterative power algorithm

This section outlines a quantum version of a generalized IPA method [30], the so-called quantum iterative power algorithm (QIPA) inspired by the imaginary time propagation (appendix A.1) and the variational quantum simulator [17]. We introduce a series of oracles defined by concatenated exponential functions which evolve the initial state according to a Wick-like-rotated Schrödinger equation obtained from a generalized McLachlan's variational principle. Then, we focus on the particular case of a double-exponential function that provides an efficient implementation of QIPA. For completeness, we include a section introducing the QITE method obtained from the McLachlan's variational principle.

A.1. Quantum imaginary time evolution

A.1.1. McLachlan variational principle approach

Let us consider a many-body Hermitian Hamiltonian $\hat{H}$. 12 Given an initial state $\vert{\psi(0)}\rangle$, non-unitary quantum imaginary time evolution (QITE) is defined by

Equation (A.1)

Note that the denominator is a normalization factor. Since a key to our proposal is the realization that there is nothing except the requirement that there be a continuous, integrable, strictly positive oracle $\hat{U}$ that is maximized at the global minima of $\hat{H}$ to prevent us from assuming a particular form of the oracle; we present QITE more generally in terms of non-unitary time evolution according to an oracle, as follows:

Equation (A.2)

where β could be any strictly increasing positive function. When $\beta(y) = e^y$, we recover imaginary time evolution, which corresponds directly to the Wick rotation $(\tau = -it)$. With that choice of $\beta(y)$, we obtain that the above quantum state satisfies the Wick-like rotated Schrödinger equation:

Equation (A.3)

where $E_1(\tau) = \langle{\psi(\tau)}\vert\hat{H}\vert{\psi(\tau)}\rangle$. Even though $\vert{\psi(\tau)}\rangle$ is a valid wavefunction that can be represented in a quantum computer, the non-unitary time evolution cannot be straightforwardly mapped to a quantum circuit based solely on unitary gates. Here, the McLachlan's variational principle [18, 19, 48, 49] comes to the rescue and demands that

Equation (A.4)

with $\|\cdot\|$ representing the L2 norm and δ the functional derivative. In the following, we intend to simulate the action of non-unitary dynamics, (A.3), on a quantum computer via McLachlan's variational principle.

In variational quantum simulations, instead of directly encoding the quantum state $\vert{\psi(\tau)}\rangle$ at time τ, we approximate it with a PQC $\vert{\psi(\tau)}\rangle\approx\vert{\phi(\boldsymbol{\theta}(\tau))}\rangle$ with a real-valued parameter vector $\boldsymbol{\theta}(\tau) = (\theta_1 (\tau),\theta_2 (\tau),\dots,\theta_{\mathcal{N}_\theta}(\tau))$. We assume that physically relevant quantum states span a restricted region of the full Hilbert space [50] for a given time interval, such that the trial state parameterized by θ is sufficient to prepare a desired quantum state by applying a sequence of parameterized unitary gates $U(\boldsymbol{\theta}) = U_{\mathcal{N}_\theta}(\theta_{\mathcal{N}_\theta})\cdots U_k(\theta_k)\cdots U_1(\theta_1)$ to the initial state $\vert{\bar{0}}\rangle = \vert{0\cdots 0}\rangle$. Thus, we have $\vert{\phi(\boldsymbol{\theta})}\rangle = U(\boldsymbol{\theta})\vert{\bar{0}}\rangle$, where $U(\boldsymbol{\theta})$ is referred to as the ansatz, and $U_k (\theta_k)$ is the kth unitary gate controlled by classical parameter θk . Here, we are only concerned with single- or two-qubit gates, which is sufficient for universal quantum computing.

According to McLachlan's variational principle, we require $\partial\|(\partial/\partial\tau+(\hat{H}-E_\tau))\vert{\phi(\boldsymbol{\theta}(\tau))}\rangle\|/\partial\dot{\theta}_k = 0$. We have

Equation (A.5)

By differentiating with respect to $\dot{\theta}_k$, we obtain

Equation (A.6)

where we use $\langle{\phi(\boldsymbol{\theta}(\tau))}\rangle{\phi(\boldsymbol{\theta}(\tau))} = 1$. Finally, we conclude that

Equation (A.7)

is equivalent to the following linear equation

Equation (A.8)

with

Equation (A.9)

We note that

Equation (A.10)

where the hβ are Pauli matrices and λβ are corresponding coefficients. Hence, QITE reduces to solving the linear equation $\textbf{A}\dot{\boldsymbol\theta} = \textbf{C}$ for $\dot{\boldsymbol\theta}$ which could be accomplished by inversion of the matrix A, as follows $\dot{\boldsymbol\theta} = \textbf{A}^{-1}\textbf{C}$. In our numerical simulations, however, we solve the linear equation via the conjugate gradient method [51] using a subroutine from the SciPy library with a tolerance for convergence of 10−6. That approach by-passes the need of inverting the matrix A.

A.1.2. Quantum circuit evaluations of A and C

We efficiently evaluate the components of A and C following [18, 52, 53] by implementing the Hadamard test with an additional ancilla qubit. Recall that $\vert{\phi(\boldsymbol{\theta})}\rangle = U_{\mathcal{N}_\theta}(\theta_{\mathcal{N}_\theta})\cdots U_1 (\theta_1)\vert{\bar{0}}\rangle$ and that in the variational ansatz circuit we are only concerned with single- and two-qubit unitary gates $U_n(\theta_n)$, namely rotational or controlled rotational gates. The required derivatives of the ansatz wavefunction are then determined as follows.

Suppose $U_n(\theta_n)$ is a single-qubit rotational gate $R_{\theta_n}^{Z} = e^{-i\theta_n\hat{Z}/2}$, with derivative $\partial U_n(\theta_n)/\partial\theta_n =$ $-(i/2)\times\hat{Z}e^{-i\theta_n\hat{Z}/2}$. If $U_n(\theta_n)$ is a two-qubit controlled rotational gate $\vert 0\rangle\langle 0\vert\otimes\hat{I}+\vert 1\rangle\langle 1\vert\otimes R^{Z} _{\theta_n}$, the derivative is given by $\partial U_n(\theta_n)/\partial\theta_n = \vert 1\rangle\langle 1\vert\otimes\partial R_{\theta_n}^{Z}/\partial\theta_n = (-i/2)\times\vert 1\rangle\langle 1\vert\otimes\hat{Z} e^{-i\theta_n\hat{Z}/2}$. In our numerical simulations, we do not consider parameterized two-qubit gates for simplicity. Using the notation

Equation (A.11)

we conclude that

Equation (A.12)

This implies

Equation (A.13)

Consequently, we have

Equation (A.14)

and

Equation (A.15)

Since we are evaluating $\textrm{Re}(\langle{\bar{0}}\vert\bar{U}^\dagger_{k}\bar{U}_{m}\vert{\bar{0}}\rangle)$ and $\textrm{Re}(\langle{\bar{0}}\vert\bar{U}^\dagger_{k}\hat{h}_\beta {U}\vert{\bar{0}}\rangle)$, one can implement them on a quantum computer by carrying out the Hadamard tests shown in figure A1.

Figure A1.

Figure A1. (a) Quantum circuit to evaluate $\textrm{Re}(\langle{\bar{0}}\vert\bar{U}^\dagger_{i}\bar{U}_{j}\vert{\bar{0}}\rangle)$ as a probability of finding the ancillary qubit in 0. (b) Quantum circuit to evaluate $\textrm{Re}(\langle{\bar{0}}\vert\bar{U}_{i}^\dagger\hat{h} U\vert{\bar{0}}\rangle )$ as a probability of finding the ancillary qubit in 0.

Standard image High-resolution image

A.1.3. Parameter update

We make use of the Euler method (the first order Taylor series expansion) to update the variational parameters as

Equation (A.16)

where ξτ is the numerical solution to $\textbf{A}(\tau)\dot{\boldsymbol{\theta}}(\tau) = \textbf{C}(\tau)$. One needs to repeat this procedure $\mathcal{N}_T = \tau_{\textrm{total}}/\delta\tau$ times to simulate imaginary-time-like evolution. The difference between the above parameter update and the gradient descent method is that the latter uses

Equation (A.17)

which only considers information about the average energy at each time step without taking into account of information about the ansatz circuit itself.

Appendix B: General formulation of a concatenated exponential cooling function

As mentioned in the main text, the main ingredient of QIPA is the choice of a suitable cooling function or oracle to quickly reach the optimal solution. Here, we show that oracles defined by the concatenated exponential functions introduced by equation (2) (main text) evolve the initial state according to the generalized Wick-like rotated Schrödinger equation introduced by equation (3) (main text). We apply the chain rule for derivatives to equation (2) (main text) to obtain

Equation (B.1)

For a given initial wave function $\vert{\psi(0)}\rangle$, let us introduce the auxiliary functions

Equation (B.2)

Note that the normalized time-evolved wavefunction $\vert{\psi(\tau)}\rangle$ can be written as

Equation (B.3)

For the derivatives of the above functions we obtain

Equation (B.4)

which is identical to equation (3) (main text). As previously mentioned, the standard QITE is recovered for the choice $n = 1,\,b_1 = 1$ (standard exponential function, cf equation (A.3), as follows:

Equation (B.5)

Moreover, for the choice $n = 2,\,b_2 = 1,\,b_1 = 1$ (double-exponential function) we obtain

We see that the resulting equation for double-exponential QIPA takes a similar form to the original Wick-rotated equation of motion, but with more rapid convergence to the ground state of $\hat{H}$.

Appendix C: McLachlan's variational principle for the double-exponential oracle function

The McLachlan's variational principle is equivalent to the following minimization problem:

Equation (C.1)

Since θ is real, we have

Equation (C.2)

Differentiating equation (C.2) with respect to $\dot{\theta}_k$, we obtain

Equation (C.3)

Consequently, since $\langle\phi(\boldsymbol{\theta}(\tau))\mid\phi(\boldsymbol{\theta}(\tau))\rangle = 1$, we conclude that

Equation (C.4)

is equivalent to the following linear equation

Equation (C.5)

with

Equation (C.6)

Therefore, as in the case of the standard exponential oracle, the McLachlan's principle reduces to a linear system of equations.

C.1. Quantum circuit evaluations of A and C

The matrix A and the vector C can be obtained from the circuits shown in figure C1. As seen from the above equation (C.6), the main difference between QIPA and QITE, in terms of comparing the use of double-exponential and exponential cooling functions, is the presence of $e^{-\hat{H}\tau}$ in Ck . Here, we approximate the exponential by its Taylor series expansion to the second order, as follows:

Equation (C.7)

Figure C1.

Figure C1. (a) Quantum circuit to evaluate $\textrm{Re}(\langle{\bar{0}}\vert\bar{U}^\dagger_{k,i}\bar{U}_{l,j}\vert{\bar{0}}\rangle)$ as a probability of finding the ancillary qubit in 0. (b) Quantum circuit to evaluate $\textrm{Re}(\langle{\bar{0}}\vert\bar{U}_{k,i}^\dagger\hat{h}e^{b\tau\hat{h}} U\vert{\bar{0}}\rangle )$ as a probability of finding the ancillary qubit in 0.

Standard image High-resolution image

Appendix D: Convergence rate analysis

In [30] we presented a formal proof of convergence for IPA applied to discrete optimization problems with a single global minimum and showed that the number of IPA steps necessary to amplify the amplitude of the global minimum to a value higher than $1/2 = 50\%$ scales logarithmically with the number $n\unicode{x2A7E} 2$ of possible states. More precisely, assuming that the initial wavefunction is given by the uniform superposition over all elements of the finite search space and that the unique maximum of the oracle is given by $\lambda_1\gt0$, while all other values are given by the same value $0\lt\lambda_2\lt\lambda_1$ (here λ can be taken as eigenvalues of the problem Hamiltonian), it was shown that after $k\unicode{x2A7E} 1$ IPA iteration steps, the ratio between the minimum and the maximum amplitude of the evolved density function ρk (modulus squared of the wavefunction) is given by

Equation (D.1)

In the following we compare the ratio $\mu = \lambda_2/\lambda_1$ for the exponential oracle $U_1(\tau) = e^{-\tau\hat H}$ and the double-exponential oracle $U_2(\tau) = e^{e^{-\tau\hat H}}$.

Let us assume that $\hat H = M$ (quantum propagator with infinite mass) and that the potential energy surface M attains its unique global minimum at position $x^*$. The global maximum of the oracle function $U_1(\tau)$ is then given by

Equation (D.2)

where the index U1 is used to indicate that we consider the exponential oracle. Since $\lambda_{1,U_1}$ is the unique global maximum and all other values of the oracle are equal, it also follows that

Equation (D.3)

where $x_1\ne x^*$ is one of the remaining points of the search space. Moreover, for the double-exponential oracle $U_2(\tau)$ we obtain

Equation (D.4)

where the index U2 is used to indicate that we are now considering the double-exponential. Hence we get

Equation (D.5)

which shows that the ratio of the double-exponential oracle decays exponentially in the gap $\lambda_{1,U_1}-\lambda_{2,U_1}$ of the exponential oracle. The analysis presented in [30] therefore yields that the minimum number of required QIPA iterations (with double-exponential oracle) is given by

Equation (D.6)

which scales logarithmically with the size of the search space n and inversely with the difference $\lambda_{1,U_1}-\lambda_{2,U_1}$. Recall that this must be compared with the minimum number of required IPA iterations (exponential oracle), given by

Equation (D.7)

which is significantly larger if $\lambda_{1,U_1}/\lambda_{2,U_1}\approx 1$ and $\lambda_{1,U_1}-\lambda_{2,U_1}\gg 1$.

Appendix E: Analytical error analysis

Concerning the error of our proposed QIPA as compared to QITE, the difference lies in equation (C.6). To be precise,

Equation (E.1)

while

Equation (E.2)

In that sense, the main difference lies in $e^{-\hat{H}\tau}|\phi(\boldsymbol{\theta}(\tau))\rangle$ and $|\phi(\boldsymbol{\theta}(\tau))\rangle$. Since we are taking the Taylor expansion of the exponential term in $C_{k,\mathrm{QIPA}}$, the error can be calculated by the Euclidean distance between the exact imaginary time-evolved state and the approximate one as

Equation (E.3)

with $||\vert{\psi}\rangle|| = \sqrt{\langle{\psi}\rangle{\psi}}$ being the L2 norm. By expanding the norm and using the triangle inequality, we arrive at

Equation (E.4)

where

Equation (E.5)

Appendix F: McLachlan's variational principle for hyperbolic secant oracle function

The time-evolved wavefunction can be expressed as

Equation (F.1)

where

Equation (F.2)

Equation (F.3)

The evolution of the wavefunction is then

Equation (F.4)

where, without specifying the oracle $U_{n}\left(\tau\right)$, the required partial derivatives are

Equation (F.5)

Equation (F.6)

In the special case that

Equation (F.7)

the required functions are

Equation (F.8)

Equation (F.9)

such that the gradient of the first function is

Equation (F.10)

and the gradient of the second function is

Equation (F.11)

The evolution of the wavefunction is then

Equation (F.12)

in direct analogy to the exponential and double-exponential oracles. The McLachlan variational principle corresponding to the resulting minimization problem is

Equation (F.13)

which, again in direct analogy to the exponential and double-exponential oracles, is equivalent to the linear equation

Equation (F.14)

where

Equation (F.15)

Equation (F.16)

Appendix G: Ansatz circuits and example quantum circuit to evaluate a matrix element A

Appendix H: Molecular ground-state search

The Hamiltonian for a chemical system in the second quantization picture has the following general form

Equation (H.1)

where $\hat{a}^\dagger_i$ is a creation operator that creates an electron on the ith orbital, $\hat{a}_i$ is an annihilation operator which removes an electron from the ith orbital, and hij and Vijkl are the one-electron and two-electron interaction coefficients, respectively, which are determined for specific systems. The antisymmetric property of electrons is fulfilled by the anti-commutation relation of the creation and annihilation operators $\{\hat{a}_i,\hat{a}^\dagger_j\} = \delta_{ij},\,\{\hat{a}^\dagger_i,\hat{a}^\dagger_j\} = 0$. The above anti-commutation relation precludes direct encoding of a chemical Hamiltonian on a quantum computer, since the operating units of a quantum computer (i.e. qubits) obey the commutation relation of spins. The remedy to this discrepancy is to perform a fermion-spin mapping, such as the Jordan–Wigner transformation [54] presented here as an example. The transformation maps the fermionic creation and annihilation operators to qubit raising and lowering operators ${\hat{\sigma}}^{\pm} = \hat{X}\pm i\hat{Y}$ with a string of $\hat{Z}$ operators to enforce the fermionic anti-commutation properties: $ \hat{a}_j \rightarrow(\prod_{l = 1}^{j-1}-\hat{Z}_l)\hat{\sigma}^{-}_j,$ $\hat{a}^\dagger_j \rightarrow(\prod_{l = 1}^{j-1}-\hat{Z}_l)\hat{\sigma}^{+}_j $ With the above transformation, the fermionic anti-commutation relation is preserved. For other fermion-spin mapping approaches, the reader is referred to the literature [4]. An alternative method to decompose gates for molecular systems is provided in [55]. Here the atomic orbital basis (sto3g basis set) is used to ground-state energy is determined at the Hartree–Fock level of theory via PySCF [56].

Appendix I: Quantum computer-aided designs

As the number of high-quality qubits inside a quantum processing unit (QPU) grows over time, it is expected that eventually no classical supercomputer will be able to simulate, verify, and cross-check the inner working mechanism and data obtained from the QPU. This is commonly taken to be as crossing over the 'quantum advantage' threshold. Once such an event occurs, from a practical point-of-view, it is beneficial to make use of existing quantum hardware that is already well-calibrated to simulate subsets of new QPU designs. QCADs of superconducting qubits [33] and photonic chips [34] have recently been proposed and experimentally realized in a superconducting qubit architecture [35], but not yet with imaginary-time-like quantum simulation. Here, we show that, with the proposed QIPA, we are able to optimize for the ground-state-energy search of a flux-tunable superconducting transmon system.

Given an arbitrary classical electrical circuit diagram composed of inductors, capacitors, and Josephson junctions, one can quantize such circuit into a quantum Hamiltonian [57] via the Legendre transformation. Once we obtain the quantum Hamiltonian, the task is to translate it into a language that a quantum computer can understand, such as Pauli words or strings. Let us consider the case of a flux-tunable transmon system shown in the main text figure 1 prior to conversion as an example. The system has the following Hamiltonian:

Equation (I.1)

Here, e is the electron charge. The normalized external flux $f = \Phi_{\textrm{ext}}/\Phi_0$ is derived from the external magnetic flux $\Phi_{\textrm{ext}}$ that penetrates the loop formed by the two Josephson junctions of the transmon. The Josephson energy of the two junctions is equal and given by EJ while $\mathbf{C}_\mathrm{cap}$ is the capacitance. The magnetic flux quantum Φ0 is a fundamental constant that describes the smallest amount of flux that a superconducting loop can sustain. Here, $\hat\varphi$ and $\hat{N}$ are the phase and number operators, respectively and fulfill the commutation relation $[\hat{\varphi},\hat{N}] = i$. And, the following relations follow:

Equation (I.2)

where $\vert{n_j}\rangle$ are the eigenstates of $\hat{N}$. We notice that the operators $e^{\widehat{{\pm i}{\varphi_j}}}$ are similar to the usual bosonic creation and annihilation operators, without the square root prefactor. They are, in fact, the Susskind–Glogower phase operators [58]. When we write down the transmon Hamiltonian in the charge number basis, we use equation (I.2) and assign the operators as:

Equation (I.3)

Equation (I.4)

Equation (I.5)

In general, the number of Cooper pairs can take on infinitely many integer values. However, for practical purposes, we are only interested in low-lying energy states. In that case, we can truncate the Hilbert space as described above by introducing a finite maximum number of excitations $d = 2^k$. The number of data qubits used in the quantum simulation of the transmon qubit is $k\in\mathbb{N}$.

Next, we convert the eigenstates of the number operator $\hat{N}$ into the computational basis states of k data qubits by representing the integer charge number in a preferred encoding [5961]. This implies a truncation of the physical space to the subspace spanned by 2k Cooper pair numbers. There are combinatorially many ways to map such a state space to a set of qubits. For all the numerical quantum simulation experiments presented in this work, we have employed the Gray code [33, 34, 61] due to its resource-efficient representation of tridiagonal quantum matrix operators (table I1).

Table I1. Qubit encodings (standard binary and Gray code) of elementary operators used in this study, with a truncation of d = 16. In our numerical experiments, we utilize the Gray code [61]. Here, $X,Y,Z$ correspond to standard Pauli matrices and the subscript represents the qubit index number.

d = 16Std. BinaryGray
N −0.5 I −0.5 I
−4.0 Z3 −4.0 Z3
−2.0 Z2 −2.0 $Z_{2}Z_{3}$
−1.0 Z1 −1.0 $Z_{1}Z_{2}Z_{3}$
−0.5 Z0 −0.5 $Z_{0}Z_{1}Z_{2}Z_{3}$
$\cos\varphi$ +0.5 X0 +0.5 X0
+0.25 $X_{0}X_{1}$ +0.25 X1
+0.25 $Y_{0}Y_{1}$ −0.25 $Z_{0}X_{1}$
+0.125 $X_{0}X_{1}X_{2}$ +0.125 X2
+0.125 $X_{0}Y_{1}Y_{2}$ −0.125 $Z_{1}X_{2}$
+0.125 $Y_{0}X_{1}Y_{2}$ +0.125 $Z_{0}X_{2}$
−0.125 $Y_{0}Y_{1}X_{2}$ −0.125 $Z_{0}Z_{1}X_{2}$
+0.0625 $X_{0}X_{1}X_{2}X_{3}$ +0.0625 X3
+0.0625 $X_{0}X_{1}Y_{2}Y_{3}$ −0.0625 $Z_{2}X_{3}$
+0.0625 $X_{0}Y_{1}X_{2}Y_{3}$ +0.0625 $Z_{1}X_{3}$
−0.0625 $X_{0}Y_{1}Y_{2}X_{3}$ −0.0625 $Z_{1}Z_{2}X_{3}$
+0.0625 $Y_{0}X_{1}X_{2}Y_{3}$ +0.0625 $Z_{0}X_{3}$
−0.0625 $Y_{0}X_{1}Y_{2}X_{3}$ −0.0625 $Z_{0}Z_{2}X_{3}$
−0.0625 $Y_{0}Y_{1}X_{2}X_{3}$ +0.0625 $Z_{0}Z_{1}X_{3}$
−0.0625 $Y_{0}Y_{1}Y_{2}Y_{3}$ −0.0625 $Z_{0}Z_{1}Z_{2}X_{3}$
$\sin\varphi$ −0.5 Y0 −0.5 $Y_{0}Z_{1}Z_{2}Z_{3}$
−0.25 $X_{0}Y_{1}$ −0.25 $Y_{1}Z_{2}Z_{3}$
+0.25 $Y_{0}X_{1}$ +0.25 $Z_{0}Y_{1}Z_{2}Z_{3}$
−0.125 $X_{0}X_{1}Y_{2}$ −0.125 $Y_{2}Z_{3}$
+0.125 $X_{0}Y_{1}X_{2}$ +0.125 $Z_{1}Y_{2}Z_{3}$
+0.125 $Y_{0}X_{1}X_{2}$ −0.125 $Z_{0}Y_{2}Z_{3}$
+0.125 $Y_{0}Y_{1}Y_{2}$ +0.125 $Z_{0}Z_{1}Y_{2}Z_{3}$
−0.0625 $X_{0}X_{1}X_{2}Y_{3}$ −0.0625 Y3
+0.0625 $X_{0}X_{1}Y_{2}X_{3}$ +0.0625 $Z_{2}Y_{3}$
+0.0625 $X_{0}Y_{1}X_{2}X_{3}$ −0.0625 $Z_{1}Y_{3}$
+0.0625 $X_{0}Y_{1}Y_{2}Y_{3}$ +0.0625 $Z_{1}Z_{2}Y_{3}$
+0.0625 $Y_{0}X_{1}X_{2}X_{3}$ −0.0625 $Z_{0}Y_{3}$
+0.0625 $Y_{0}X_{1}Y_{2}Y_{3}$ +0.0625 $Z_{0}Z_{2}Y_{3}$
+0.0625 $Y_{0}Y_{1}X_{2}Y_{3}$ −0.0625 $Z_{0}Z_{1}Y_{3}$
−0.0625 $Y_{0}Y_{1}Y_{2}X_{3}$ +0.0625 $Z_{0}Z_{1}Z_{2}Y_{3}$

Appendix J: Biprime factorization

Prime factorization of biprimes is essential to modern Rivest–Shamir–Adleman (RSA) encryption algorithms [62] and is seen as a classic test of the power of quantum computing to address problems that are computationally intensive on classical computers [6366]. Prime factorization algorithms for NISQ quantum computers are essential to demonstrate the promise of quantum computers for this task and complement current approaches such as Shor's algorithm [1, 63], variational quantum factoring (VQF) [67, 68], exact search [27, 65, 69], QITE [1820, 66, 7074], and quantum annealing [64, 7580]. Recently QITE has been used to identify prime factors via global optimization [66], and here we show such an imaginary-time-like approach can be further accelerated by using QIPA.

To solve the prime factorization problem for a given biprime (product of two prime numbers) $N = q^*\times p^*$, we consider the Hamiltonian

Equation (J.1)

defined on the space of prime numbers $q,p\unicode{x2A7D}\sqrt{N}$. This Hamiltonian is a non-negative function that attains its global minimum $\hat H_N(q,p) = 0$ for the unique pair of solutions $q = q^*$ and $p = p^*$. Binary representation [33, 34, 61, 64, 66, 67] of the prime factors yields

Equation (J.2)

where $(q_L,\dots,q_0),(p_L,\dots,p_0)\in\{0,1\}^L$ are the binary representations of q and p, respectively, and $L = \lfloor\log_2(N/2)\rfloor+1$. Assuming that $p^*,q^*\gt2$ (otherwise N is an even number), we further restrict the search space by setting $q_0 = p_0 = 1$ such that (J.2) can also be written in terms of the combined parameter $\vec x = (q_1,\dots,q_L,p_1,\dots,p_L)$, as follows:

Equation (J.3)

where $x_l^2 = x_l$ holds for all $1\unicode{x2A7D} l\unicode{x2A7D} 2L$ since $x_l\in\{0,1\}$. Equivalently, in terms of the scaled spin parameters $s_l = 2x_l-1$, we write

Equation (J.4)

where $s_l^2 = 1$ holds since $s_l\in\{-1,1\}$. For example, for N = 15 we obtain L = 2 and $d(15;\vec s) = 15-(4+s_1+$ $2s_2)\times(4+s_3+2s_4) = -1-4s_1-8s_2-4s_3-s_1s_3-2s_2s_3-8s_4-2s_1s_4-4s_2s_4$, which gives the Hamiltonian $H_{15}(\vec s) = d(15;\vec s)^2 = 186+48s_1+96s_2+84s_1s_2+48s_3+34s_1s_3+68s_2s_3+32s_1s_2s_3+96s_4+68s_1s_4+$ $136s_2s_4+64s_1s_2s_4+84s_3s_4+32s_1s_3 s_4+64s_2s_3s_4+16s_1s_2s_3s_4$, with twin global minima. Alternatively, with previous information about the prime factors of 15, the integer can be factorized with fewer qubits via the test Hamiltonian [66] $\hat{H} = 196-52\hat{Z}_2-52\hat{Z}_0-56\hat{Z}_2\hat{Z}_0-96\hat{Z}_1-48\hat{Z}_2\hat{Z}_1+16\hat{Z}_0\hat{Z}_1+128\hat{Z}_0\hat{Z}_1\hat{Z}_2$, which features a unique ground state $\vert{011}\rangle$ that corresponds to the correct factorization of the number 15 to 3 and 5. The resulting circuit implementation is given in figure G2.

Figure G2.

Figure G2. (a) Ansatz circuit used for the factorization of number 15. (b) Quantum circuit to evaluate the matrix element $A_{4,9} = \textrm{Re}(\frac{\partial\langle{\phi(\tau)}\vert}{\partial\theta_4}\frac{\partial\vert{\phi(\tau)}\rangle}{\partial\theta_9})$ as a probability of finding the ancillary qubit in 0.

Standard image High-resolution image

Footnotes

  • 12 

    In practice, the Hamiltonian may be expressed as the weighted sum $H = \sum_i\lambda_i h_i$ with real coefficients λi and tensor products of Pauli matrices hi , since Pauli matrices form a complete basis.

Please wait… references are loading.