<<

Chemical Physics xxx (2018) xxx–xxx

Contents lists available at ScienceDirect

Chemical Physics

journal homepage: www.elsevier.com/locate/chemphys

Direct application of the phase estimation algorithm to find the eigenvalues of the Hamiltonians ⇑ Ammar Daskin a, Sabre Kais b, a Department of Computer Engineering, Istanbul Medeniyet University, Kadikoy, Istanbul, Turkey b Department of Chemistry, Department of Physics and Birck Nanotechnology Center, Purdue University, West Lafayette, IN, USA article info abstract

Article history: The eigenvalue of a Hamiltonian, H, can be estimated through the phase estimation algorithm given the Available online xxxx exponential of the Hamiltonian, expðiHÞ. The difficulty of this exponentiation impedes the appli- cations of the phase estimation algorithm particularly when H is composed of non-commuting terms. In this paper, we present a method to use the Hamiltonian matrix directly in the phase estimation algorithm by using an ancilla based framework: In this framework, we also show how to find the power of the Hamiltonian matrix-which is necessary in the phase estimation algorithm-through the successive appli- cations. This may eliminate the necessity of for the phase estimation algorithm and therefore provide an efficient way to estimate the eigenvalues of particular Hamiltonians. The classical and quantum algorithmic complexities of the framework are analyzed for the Hamiltonians which can be written as a sum of simple unitary matrices and shown that a Hamiltonian of order 2n written as a sum of L number of simple terms can be used in the phase estimation algorithm with ðn þ 1 þ logLÞ num- ber of qubits and Oð2anLÞ number of quantum operations, where a is the number of iterations in the phase estimation. In addition, we use the Hamiltonian of the hydrogen molecule as an example system and pre- sent the simulation results for finding its ground state energy. Ó 2018 Elsevier B.V. All rights reserved.

1. Introduction in terms of unitary matrices, then a possible implementation may yield a computational efficiency over the classical algorithms: e.g. With the recent efforts such as digitalizing adiabatic quantum Shor’s integer factoring algorithm [7]. Many quantum algorithms computers [1], a digital quantum simulation of the real-time use the exponential expðihHÞ to map the description of the orig- dynamic of a lattice gauge theory [2], a simulation of the Hubbard inal problem H to a . An exact mapping through model [3], and the race to build universal quantum computers matrix exponential generally requires eigendecomposition of H: among the big companies [4], quantum computers become closer In spite of the existence of various numerical methods, the eigen- to be used in unsolved real-world applications. decomposition in the cases where H is a large-dense matrix is still As Feynman suggested [5], one of the breakthroughs of quan- a big computational challenge for classical computers. Because of tum computers is expected to be in the simulation of quantum sys- this computational difficulty, it is common to use some order of tems, a known difficult problem for classical computers because of Trotter-Suzuki approximation [8] by writing H as a sum of terms the exponential growth of the system size with the number of whose exponentials are known or easy to compute. In general case, qubits (e.g., see Ref. [6]). In the standard formalism of quantum the order of the approximation affects the correctness and the high mechanics, the Hamiltonian of a quantum system is considered order approximations dramatically increases the computational as a . Since the exponential of a skew-Hermitian complexity [9]. Therefore, the complexity of this exponentiation matrix is a unitary matrix, the time evolution, expðihHÞ,ofa should be also embodied in the consideration of the computational quantum system represented by the Hamiltonian H describes a complexity of a quantum algorithm (see Ref. [10] for a relevant dis- unitary transformation. In general, a computation or an algorithm cussion of the topic). should be represented by a unitary matrix in order to be imple- It is known that using additional qubits eases the implemen- mented on a quantum computer. If an algorithm can be formalized tation difficulty of a quantum circuit. A quantum operator (or a dynamic of a system) can be implemented inside a larger system, ⇑ Corresponding author. where some reduced part of the system represents the action of E-mail address: [email protected] (S. Kais). the original system. This idea is used in different contexts such https://doi.org/10.1016/j.chemphys.2018.01.002 0301-0104/Ó 2018 Elsevier B.V. All rights reserved.

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002 2 A. Daskin, S. Kais / Chemical Physics xxx (2018) xxx–xxx as designing circuits from matrix elements [11,12], and generat- iH He ¼ I ð1Þ ing exponential of a matrix written as a sum of unitary matrices j through Taylor series [13]. Moreover, in Ref. [14], to use a matrix where I is an , and j is a coefficient. The eigenvalues on a quantum computer directly, we considered converting a ek k =j k non-unitary matrix, H, to a unitary by using its square root. In of this matrix are in the form j ¼ð1 i j Þ, where j is the jth a more general fashion, Ref. [15] described a qubitization eigenvalue of H. When j is sufficiently large; in the polar form of e approach to complete a non-unitary matrix to a unitary matrix kj, the value of the angle becomes kj=j since sinðkj=jÞkj=j: whose multiple applications generate Chebyshev polynomials of k k k j H ek j j ij : . j ¼ 1 i j ¼ 1 þ i je ð2Þ In this paper, we follow a different approach: for a Hamiltonian n H j H of order 2 with real eigenvalues; we first put the matrix in the Also note that when j is large, He gives an approximation to ei .To e form H ¼ ðÞI iH=j , where I is an identity matrix and j is a coef- be able to use the matrix in Eq. (1) directly in the phase estimation, ficient. For a sufficiently large j; the value of the angle, the phase, we will initially assume that we have an efficient mechanism to seen in the polar form of the eigenvalue of He becomes approxi- produce the following unitary matrix: ! mately equal to kj=j, where kj is an eigenvalue of H. Using this fact He and assuming H is a sum of some simple terms which can be easily Uð1Þ ¼ ; ð3Þ mapped to quantum circuits; we present a phase estimation framework for finding k =j. In this framework, we use He directly j where the first part of the matrix is equal to He with/without some and show that necessary powers of He can be estimated through normalization, and a indicates another part of the matrix. As also successive applications after the application of the oblivious ampli- mentioned in the introduction, these types of matrices are used in tude amplification. This provides a way to estimate the eigenvalues various contexts: either to design quantum circuits from matrix ele- H a of by using ðn þ 1 þ logLÞ qubits and Oð2 nLÞ number of quantum ments [11,12] or to be able to use it with the oblivious amplitude operations. Here, a is the number of iterations in the phase estima- amplification[14], or to estimate unitary dynamic of a Hamiltonian H tion and L is the number of terms in the sum yielding . We also through truncated Taylor series [13] and its generalized form [15]. e show that the powers of H can be more accurately estimated by In the next section we will discuss how the above matrix can be using additional qubits and a permutation operator in the phase generated by using an ancilla register. Now let us consider the input estimation algorithm, which requires also the same number of state ji0 jiu , where jiu represents an abstract quantum state on the quantum gates and Oða þ n þ logLÞ number of qubits. As an exam- system register and ji0 is the first vector in the standard basis and ple system, we use the Hamiltonian matrix of the hydrogen mole- the state on the ancilla register. The application of Uð1Þ to this input cule and estimated its ground state energy within the presented yields the following state [13]: framework. ffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffiffiffiffiffi ð1Þ u p He u u : In the following sections, after first describing the proposed U ji0 ji¼ p0ji0 jiþ 1 p0ji1 ji ð4Þ framework, we will present the complexity analysis. Then, in Sec- He u tion 5, the simulation results for the hydrogen molecule are pre- The application of to the input jion the system register can be sented and discussed. And in the final section the paper is obtained from the above output with the probability given by He u : He concluded with a summary. p0k k ik, where jj jj represents a vector norm. For a unitary , the probability simply becomes p0. The desired output can be sin- gled out through the application of a projector P ¼j0ih0j to the 2. Notes on notations ancilla register.

Throughout this paper, we use the following notations: j 3.1. Estimation of He 2 While the Hamiltonian is represented by H, bold capital letters For the phase estimation, we need to be able to efficiently gen- are used for other matrices. ð20Þ ð2aÞ n is used to represent the number of qubits in the system. erate the set of operators fU ...U g which consist of n e 0 e a N ¼ 2 represents the size of the Hamiltonian operator (matrix) H2 ...H2 . This can be done through the successive applications on an n-qubit system size. of Uð1Þ after the application of the oblivious amplitude amplifica- When the Hamiltonian is a sum of unitary matrices, L is used to tion described in Section 3.3: The amplitude amplification process represent the number of unitaries in the sum. L is considered to to maximize the probability of ji0 in the ancilla turns Uð1Þ into the be smaller than N or at least be bounded by OðNÞ. following form: l ¼ logL represents the number of qubits necessary for the ! e ancilla system. Here, logL means log L. Therefore, the dimension e H 0 2 Uð1Þ ; ð5Þ of any operator acting on the ancilla is represented by L. 0 a represents the number of iterations used in the phase estima- e tion algorithm. k number of applications of the matrix Uð1Þ can be used to obtain k is an index used in different contexts to represent a kth step. kth power of He : M is equal to LK represents the number of unitary matrices in ! He k the Taylor series which is truncated from the Kth term. e 1 e 1 0 |fflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflffl}Uð Þ ...Uð Þ : ð6Þ 0 k times 3. Proposed eigenvalue estimation A more accurate estimation for the kth power of He in UðkÞ can be = Phase estimation algorithm (PEA) estimates the phase / for a obtained from Uðk 2Þ by using an additional qubit in the ancilla and / given operator with the eigenvalue ei . For a Hamiltonian a : For instance, if He 2 is desired, we first add H 2 Cn, we propose to consider the following matrix in the phase one more qubit to the ancilla. Then the matrix representation of estimation algorithm: the circuit becomes

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002 A. Daskin, S. Kais / Chemical Physics xxx (2018) xxx–xxx 3 0 1  E e 1 H 00 w ffiffiffi u B C ji2 ¼ p ji0 ji0 j B 00C 2 I1 Uð1Þ ¼ B C: ð7Þ  E pffiffiffiffiffiffiffiffiffiffiffiffiffiffi @ He A ji1 p/ k 00 ffiffiffi ^ i2 j2 u ^2 U ; þ p ji0 pe j þ 1 p ji ð12Þ 00 2 ffiffiffiffiffi k ^ p ek 2 Using a permutation matrix, P, similar to the one below, we can where p ¼ p0j jj . The application of the operator P to the ancilla obtain the square from a successive application of this matrix as register causes the state to collapse into the following unnormal- shown below: ized state: 0 1 0 1 e 2  E E I000 H 1 p/ k B CB C jiw ¼ pffiffiffi ji0 ji0 u þ p^ji1 ji0 ei2 j2 u : ð13Þ B 00I0C B C 3 j j 1 ð1Þ B C 1 ð1Þ B C; 2 I U @ A I U ¼ @ A 0I00 In the iterative phase estimation, in each iteration we get the 000I estimate kth bit value of the phase. This is achieved with the help ð8Þ of a Rz gate whose rotation angle is determined from the previous iterations (please refer to Fig. 1 for the value of the angle.). This where the dimension of the sub-matrices are assumed to conform p/ k p : gate converts the term ei2 2 into the form ei2 ð0 xkÞ, where x repre- to the multiplications. In more general sense, k = = sents a binary bit: i.e., simply: UðkÞ ¼ðIlogk Uðk 2ÞÞPðIlogk Uðk 2ÞÞ. Here, P can be implemented ÀÁ E through some swap operations on the ancilla register. 1 p : w ffiffiffi ^ i2 ð0 xkÞ u ; 0 a ji3 ¼ p ji0 þ pji1 e ji0 j ð14Þ Consequently, we can use the set of operators fUð2 Þ ...Uð2 Þg 2 generated by successive applications in the phase estimation algo- k In the final step, the Hadamard gate is applied again to the phase rithm and estimate the value of j and hence the eigenvalue of the j qubit: Hamiltonian with an accuracy affected by a. Because of the addi- ÀÁ E 1 p : tional qubits, it may be easier to implement this method through w ^ i2 ð0 xkÞ u final ¼ 1 þ pe ji0 ji0 j the iterative version of the phase estimation algorithm as depicted 2 ÀÁ E in Fig. 1. 1 i2p 0:x þ 1 pe^ ð kÞ ji1 ji0 u ð15Þ 2 j 3.2. Steps inside PEA Measurement on the phase qubit in this unnormalized state yields

the bit value of xk: The phase estimation algorithm at the x ¼ða k 1Þth itera- tion is composed of three registers: vis., the phase with one-qubit, When xk ¼ 0, the probability ofji 0 becomes greater in the final the ancilla with x þ logL qubits, and the system register with n state: qubits. The initial input to the algorithm is given by the following: E 1 E ^ ^ u ðÞðÞ1 þ p jiþ0 ðÞ1 p ji1 ji0 j ð16Þ w u ; 2 ji0 ¼ ji0 ji0 j ð9Þ E In the case xk ¼ 1, the probability ofji 1 becomes greater: u H E where j is an estimation to the jth eigenvector of . In PEA, we 1 ðÞðÞ1 p^ jiþ0 ðÞ1 þ p^ ji1 ji0 u ð17Þ first apply the Hadamard gate to the phase qubit which simply puts 2 j this qubit into the superposition and yields the state: Here the probability difference between measuring 1 and 0 is  E E ^ 1 determined by 2p, where l is a normalization constant. Before w ffiffiffi u u : l ji1 ¼ p ji0 ji0 þ ji1 ji0 ð10Þ 2 j j the application of the projector P; l can also be eliminated by applying the oblivious amplitude amplification to Uð1Þ as ð2kÞ Then, U controlled by the phase qubit is applied to the remaining described below. qubits:  E E 1 k w ffiffiffi u ð2 Þ u : ji2 ¼ p ji0 ji0 þ ji1 U ji0 ð11Þ 2 j j 3.3. Application of the oblivious amplitude amplification w With the help of Eq. (4), ji2 can be rewritten in the following The amplitude amplification [16–18] is based on the Grover’s form: search algorithm [19] where one applies a sequence of the opera- tors to increase the magnitude of the amplitudes of some desired states: Consider the following output state: X X A0ji¼ axjix jiþU axjix jiU ; ð18Þ

x2Xgood x2Xbad

where A is a quantum algorithm, Xgood and Xbad are the sets of good (desired) states and bad (undesired) states of the first register, x represents a standard basis vector, and jiU represents the states of the qubits in the second register. The probability of the good states in this output can be increased by the application of the iter- w Fig. 1. The kth iteration of the phase estimation algorithm: In the circuit, j is an ation operator: approximate eigenvector of H and w ¼2pð0:0/ / .../ Þ, where k k k1 a ? y / ; / ; ...; / : k k1 a represents the previously measured bit values. Q ¼ AU0 A Uf ð19Þ

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002 4 A. Daskin, S. Kais / Chemical Physics xxx (2018) xxx–xxx

Here the operator Uf marks (multiply by 1) the amplitudes of the to the main qubits. Here, jij represents the jth vector in the standard ? basis. For an arbitrary state w , this can be shown as: desired states and U0 ¼ 2ji0 hj0 I. ji A version of the amplitude amplification called oblivious ampli- selectðVÞjij jiw ¼ jij Vjjiw : ð25Þ tude amplification[13,20,21] can be used to increase the probabil- pffiffiffiffiffi The state on the ancilla can be put into a superposition state ity of the part p ji0 He jiu in Eq. (3). In the oblivious amplitude 0 b where each basis biased by the coefficients js: ? amplification algorithm, Uf and U0 only operates on the ancilla and XM qffiffiffiffi the probability change does not affect the state in the second reg- 1 B0ji¼pffiffiffiffiffi b jij ; ð26Þ ister. In our case, we use the following iteration operator: p j 0 j¼0 ÀÁÀÁ y P Q ¼ Uð1Þ U? In Uð1Þ U? In ; ð20Þ M b b 0 0 where p0 ¼ j¼0 j and js are assumed to be positive. The time evo- lution U can be obtained by combining the operator selectðVÞ with where U? acts on the ancilla register. The main difference from Eq. r 0 B in the following way: (19) is that Eq. (20) does not depend on the input to the system reg- ? ister and the marking and the amplifying operators, U , are applied Ur 0 U ¼ðBy IÞselectðVÞðB IÞ¼ ; ð27Þ only on the ancilla register. The oblivious amplitude amplification algorithm best works As similarly explained in the previous sections, this matrix can be when He is a unitary process. However, recently it is shown that used to simulate action of Ur on some arbitrary state jiw with the the algorithm also works when He is close to a unitary matrix probability determined by p0. [13]. In this case, the error in the output of one step of the oblivious When H given in the form of Eq. (22), the matrix described in amplification is bounded by the distance which in our case mea- Eq. (1) can also be represented as a sum of unitary matrices: sured as: kHe He y Ik. Since He He y ¼ I þ H2=j2, this distance iH 1 XL XL becomes: He ¼ I ¼ ia H ¼ b V ; ð28Þ j j l l l l l¼0 l¼0 kHe He y Ik¼ He 2=j2 : ð21Þ where H0 ¼ ijI. Using the same methodology given in Eq. (27),we Thus, the error in the output of the oblivious amplitude amplifica- can form the matrix Uð1Þ in Eq. (3) easily. e tion is bounded by OðkHe 2=j2kÞ. For a large j; kH2=j2k and so the Also note that since H is a sum of unitary matrices, its powers order of the error can be expected to be very small. In addition, are also similar to those of H. For instance, its kth power reads as since He j gives an approximation to eiH, in the iterations of PEA, follows: j He 2 for some j can be expected to be nearly a unitary matrix. There- XL e k 1 k e H ¼ ðiÞ a H ...a H : ð29Þ fore, in the case of H with a large j, it is possible to use oblivious jk l1 l1 lk lk l1;...;l ¼0 amplitude amplification. To observe this, the simulation results in k Section 5 presented with and without the oblivious amplitude Therefore, amplification. ! He k UðkÞ ¼ : ð30Þ 3.4. Simulating sums of unitary matrices However, in terms of complexity, the required number of qubits is Any Hamiltonian can be decomposed into a klogL which grows linearly with the power. In the case of using this of unitary matrices: matrix inside PEA, the required number of qubits grows exponen- j XL tially with the : That means if we need U2 at an iteration H ¼ alHl; ð22Þ j 2 j l¼1 of PEA, we need to use 2 logL qubits to represent L number of a terms in the matrix selectðVÞ. Therefore, when the available number where l is some complex coefficient, H bfl represents a unitary of qubits is limited, the power should be taken through successive 6 matrix and we assume L N. applications of Eq. (5) or Eq. (8). In the case of Eq. (8), only one addi- Berry et al. [13] have showed that the time evolution of H can tional qubit is necessary to find the square of He from the previous be simulated as follows: The time is considered to be divided into iteration of the phase estimation algorithm. iHt=r r-segments so that the time evolution at segment r, Ur ¼ e ,is approximated through the following Taylor expansion: 3.5. Simulating sums of rank one matrices XK k 1 iHt Ur ð Þ : ð23Þ Any matrix can also be written as a sum of rank one matrices. k! r k¼0 Consider the matrices in the following form: P X X k L Since H ¼ ;...; al ...al Hl ...Hl , this expansion is rewritten H ; l1 lk¼1 1 k 1 k ¼ Hj ¼ xj xj ð31Þ as: j j XK k XL XM ðit=rÞ where Hj ¼ xj xj is a rank one Hermitian matrix constructed by Ur al Hl ...al Hl ¼ b Vj; ð24Þ ! 1 1 k k j the normalized vector xj . Such sums are frequently seen in the k ;...; k¼0 l1 lk¼1 j¼0 form XXT in machine learning problems and statistical analysis of k ... ; b data points-where a column of the matrix X represents a data point. where Vj is in the form of ðiÞ Hl1 Hlk j is a complex coefficient, K We can rewrite Eq. (31) as follows: and M is the number of terms in the summation and equal to L . ! Assuming a mechanism to implement each V exist, then V s are XL Âà XL XL j j 1 Rj L H ¼ ðI 2 x x ÞI ¼ þ I ¼ a R ; ð32Þ combined in a quantum circuit selectðVÞ by using m ¼ logM ancilla 2 j j 2 2 j j j¼1 j¼1 j¼0 qubits in a way that for each state jij on the ancilla, a Vj is applied

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002 A. Daskin, S. Kais / Chemical Physics xxx (2018) xxx–xxx 5

T T T T where ajs are coefficients and R0 ¼ I. The above equation describes ...... rotations: That is, R ¼ GL1 G3 G2G1G2G3 GL1. As a result, the H in terms of a sum of ðL þ 1Þ number of idempotent-unitary matri- circuit for R can be formed via plane rotations in this decomposi- 2 H ces: i.e., Rj ¼ I. As a result, can be simulated in the phase estima- tion. Since a can be implemented through a multi tion after being turned into the form of Eq.(1). In the next section, controlled quantum gate [27]; when considered together, the rota- we will analyze the complexity of the method in the case the Hamil- tions in the product form a uniformly controlled gate-network. tonian is given as a sum of unitary matrices. These networks are well-studied in Ref. [28] where it is shown that a uniformly controlled network acting on l qubits can be simplified l into Oð2 Þ number of one- and two-qubit gates. Also note that the 4. Computational complexity sparsity of the vector xj directly affects the number of plane rota- There are two aspects of the computational complexity of a tions in the decomposition and hence the number of gates required quantum algorithm: vis., classical and quantum complexities. for the implementation. The classical complexity covers the preprocessing time of circuits implementing the quantum algorithm, i.e. eiH, and post-process- 4.3. Circuit implementation of selectðVÞ ing of the output for obtaining a desired solution. In this paper, H The circuit for select V is determined by the number of terms we have mainly focused on avoiding the necessity of ei in the ð Þ which is given by L and the number of gates required to implement estimation of the eigenvalue of H on quantum computers. When each term. If each term in the sum can be implemented through the matrix H can be mapped to quantum circuits easily (e.g., it is simple O n quantum gates on different qubits, then the combina- a sum of ‘‘simple” unitary matrices); then the classical complexity ð Þ tion of the all terms form OðnÞ different gray-coded networks con- is bounded by the number of matrix elements: i.e., OðN2Þ, assum- trolled by l number of qubits in the ancilla. The decomposition of ing all the matrix elements are needed to be processed and this networks will require OðnLÞ quantum gates. stored. Therefore, the total complexity to implement On the other hand, quantum complexity of a quantum algo- Uð1Þ By I select V B I is bounded by O nL 2L O nL rithm is determined by the number of qubits and the number of ¼ð Þ ð Þð Þ ð þ Þ¼ ð Þ with the assumption that each term in the sum can be imple- one-and two-qubit quantum gates involved in the circuit imple- mented with O n quantum gates. In an iteration of the phase esti- menting the quantum algorithm (Here, we only consider algorith- ð Þ k mic complexity.). In this perspective, the complexity analysis of the mation, finding the power Uð2 Þ requires 2k number of successive method is given below. applications of Uð1Þ. Therefore, the total required quantum gates for an iteration of the algorithm becomes Oð2knLÞ, where 4.1. Number of qubits 1 6 k 6 a with a being the total number of iterations.

e When the powers of H are obtained through Eq. (5), the 5. Example application to the Hamiltonian of H2 required number of qubits is ðn þ 1 þ logLÞ. However, when obtained through Eq. (8), it becomes ða þ n þ logLÞ, where a is the The concept of the second quantization is used in quantum number of iterations in the phase estimation. chemistry to simplify the formalism of fermionic many particle Here, note that with the current quantum computer technology, systems. It represents the interacting systems of electrons and the physical implementation of many entangling qubits is a diffi- nuclei through the creation and annihilation operators. The molec- cult task. Although 50-qubit quantum computers are being cur- ular electronic Hamiltonian in electronic structure problem is rently built by the companies such as IBM [22] and Google [4], expressed in the second quantization form as follows [29–31]: using extra ða þ logLÞ or ð1 þ logLÞ qubits will increase the simula- X X y 1 y y tion burden and hinder the applicability of the algorithm on the H ¼ hpqa aq þ hpqrsa a asar; ð33Þ p 2 p q current quantum computers. pq pqrs

where hpq is the one-electron integrals including the electronic

4.2. Circuit Implementation of B kinetic energy and the electron nuclear attraction terms. hpqrs repre- sents the set of two-electron integrals with the electron-electron l y For a normalized L-dimensional column vector x 2 C and interactions. a and a are the lowering and raising operators. This j j j the identity matrix I; R I 2x x is an Householder transfor- type of Hamiltonians can be represented in terms j ¼ j j mation describing a reflection operator around the vector x .On by using the following Jordan-Wigner transforms: j ! ! quantum computers, a Householder transformation [23] can be Yj1 Yj1 l r j rk ; y r j rk ; implemented by using Oð2 Þ total number of two- and one-qubit aj ! z and aj ! þ z ð34Þ quantum gates [24–26] (In Ref.[24], an implementation with the k¼1 k¼1 same complexity is also presented for a general version of the where iu Householder transformation: i.e., I ðe 1Þ xj xj ). rx iry rx þ iry Note that a Householder matrix, R, can also be implemented rþ ¼ ; and rz ¼ : ð35Þ through ð2L 3Þ number of plane (Givens) rotations[23] as fol- 2 2 lows: It is known that a Givens rotation Gj1 can be used to zero Whitfield et al. [29,30] and Seeley et al. [31] thoroughly studied this out jth entry in the column of a matrix. The Givens rotation GL1 mapping and used the Hamiltonian for the hydrogen molecule as an applied to R not only nullifies the last element in the first column example system: Using a minimal number of basis, only four spin of R but all the entries on the Lth row up to the first sub-diagonal orbitals indexed from 0 to 3 are involved in the above sum. They T found the values of the one- and two-electron integrals by using a entry as well. Furthermore, the matrix product ðGL1RGL1Þ yields a matrix where all entries but the diagonal entry on the last row and restricted Hartree-Fock calculation at an internuclear separation column are zeros and the diagonal element is one. Because of this of 7:414 1011 m. Because of the overlap in the integral values, property, R can be shown as a product of ð2L 3Þ number of plane the Hamiltonian is reduced to the following form:

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002 6 A. Daskin, S. Kais / Chemical Physics xxx (2018) xxx–xxx

H h ay a h ay a h ay a h ay a ; h ay ay a a so that all b s become positive real numbers (This is because ¼ 00 0 0 þ 11 1 1 þ 22 2 2 þ 33 3 3 þ 0110 0 1 1 0 pffiffiffiffi j b y y y y y y js are involved in the construction of B). þ h2332a2a3a3a2 þ h0330a0a3a3a0 þ h1221a1a2a2a1 In the circuit, an ancilla of 4 qubits is required to control each h h ay ay a a h h ay ay a a þð 0220 0202Þ 0 2 2 0 þð 1331 1313Þ 1 3 3 1 term separately and construct selectðVÞ. As also mentioned in the y y y y y y þðh0132Þða0a1a3a2 þ a2a3a1a0Þþðh0312Þða0a3a1a2 previous section, in Ref. [32], a circuit decomposition technique y y is described for circuits (called gray-coded networks) where each þ a a a3a0Þ: ð36Þ 2 1 quantum gate on a qubit is controlled by 2l distinct states of some Using the mappings in Eq. (34), the Hamiltonian is rewritten into other l qubits. It is shown that the network can be decomposed into the terms of Pauli matrices with the values of the coefficients given 2l number of CNOT and 2l number of single gates by using some in Table 1 (taken from Eq. (80) of Ref. [31]): form of the Hadamard transformation. The circuit for selectðVÞ con- sists of 4 such networks (one network for per qubit in the system) H b b r0 b r1 b r2 b r3 b r1r0 b r2r0 ¼ 1I þ 2 z þ 3 z þ 4 z þ 5 z þ 6 z z þ 7 z z each controlled by logL qubits in the ancilla. Since each decom- b r2r1 b r3r0 b r3r1 b r3r2 posed network will require L number of CNOTs and L number of þ 8 z z þ 9 z z þ 10 z z þ 11 z z single quantum gates, the circuit complexity of selectðVÞ is b r3r2r1r0 b r3r2r1r0 b r3r2r1r0 þ 12 x x y y þ 13 x y y x þ 14 y x x y bounded by OðnLÞ, where n is the number of qubits in the system. 3 2 1 0 b r r r r As a result, the circuit for H2 will require 64 CNOT gates. Combining þ 15 y y x x ð37Þ this with the circuit of B given in the previous subsection makes The simulation of this Hamiltonian within the phase estimation the whole circuit complexity 100 gates. Note that in the phase algorithm is done after generating a circuit equvailent of eiHt estimation, since we have also a phase qubit added to the control, through the Trotter-Suzuki approximation (In the simulations gen- the required number of gates for selectðVÞ will be 128 gates. erally the ground state of the Hamiltonian is estimated. We will also The simulation is done by running the iterative phase estima- estimate the ground state. However, the excited states can be also tion in three different ways: obtained within the same framework.). As mentioned before, the complexity of the generated circuit is determined by the order of In the first case, the powers are estimated through the succes- e the approximation which affects the accuracy of the obtained sive application of Uð1Þ described in Eq. (5). In addition, the ground state energy of the Hamiltonian from the phase estimation amplitude amplification operator Q given in Eq. (20) is applied algorithm. six times to obtain a maximum probability. The phase estima- In our case, we first convert the Hamiltonian into the form of Eq. tion algorithm is then run for 25 iterations. The resulting unnor- j H (1) by using ¼ 10 jj jj1, which guaranties that malized probabilities for the phase qubit are shown in Fig. 2.A jkj=jj 6 0:1 sinð0:1Þ. This results in total 16 terms for selectðVÞ, possible measurement on the phase qubit yields bit values that where j is taken as the coefficient for the additional identity and produces 0.014603 as the value of the phase. This gives p : the negative signs and i are shifted to the terms inside selectðVÞ ei2 0 014603 ¼ð0:995794 0:091624iÞ as an eigenvalue. Con- verting this into ð1 þ ik=jÞ form, we compute the value of k: i.e., the eigenvalue is divided by the real part,i.e. Table 1 ð1:0 0:0920114iÞ. Then, the estimated ground state energy is The values of the coefficients in Eq. (37). found from j 0:0920114 as 1:8510403. In comparison to Coefficient Value Coefficient Value the classically computed eigenvalue 1:851046 through the b b 1 0.8126 9 0.1659 eigen-decomposition, this displays an estimation error around b b 2 0.1712 10 0.1205 106 caused by the error in the estimation of the powers of b b 3 0.1712 11 0.1743 b b the matrices through Eq. (5)the error in the approximation 4 0.2228 12 -0.0453 b b 6 5 0.2228 13 0.0453 sinðkj=jÞkj=j. the error is around 10 . b b 6 0.1686 14 0.0453 In the other two cases, the power of the matrices is computed b 0.1205 b 0.0453 7 15 through Eq. (8) by adding one more qubit to the ancilla in each b 0.1659 j 20.117 8 iteration. Here, because of the computational difficulty-the

Fig. 2. The probabilities on the phase qubit with the amplitude amplification applied only to Uð1Þ: i.e. Q 6Uð1Þ. The power of the matrix is estimated by direct application: for square it is Q 6Uð1ÞQ 6Uð1Þ. Also note that the probabilities are not normalized after the application of P.

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002 A. Daskin, S. Kais / Chemical Physics xxx (2018) xxx–xxx 7

by using oblivious amplitude amplification algorithm in the subsequent iterations when the probability difference starts to drop and changing the value of j. Note that a larger j will require more iterations to obtain a higher precision. Also note that bit values and the probabilities are affected by the number of iterations because the iterative phase estimation algorithm uses a rotation gate whose angle determined by the bit values measured in the previous iterations.

6. Conclusion and future direction

In this paper, we have described a framework to estimate the eigenvalues of Hamiltonians in the phase estimation algorithm without using the time evolution operator, the exponential, of the Hamiltonian. We have showed how to find the powers of the matrices necessary in the phase estimation algorithm by succes- sive applications. We have analyzed the circuit implementation of the whole framework in terms of classical and quantum com- plexities and showed that the framework provides an efficient way to estimate the eigenvalues of Hamiltonians which are written

Fig. 3. The probabilities on the phase qubit without the amplitude amplification in terms of sums of simple unitary matrices (here, ‘‘simple” means applied to Uð1Þ. Note that the probabilities are not normalized after the application a unitary matrix which can be implemented through a few number of P. of one- and two-qubit quantum gates.). The circuits for the sum of unitary and the sum of rank one matrices have been analyzed. In addition, we have used the Hamiltonian of hydrogen molecule as system size for 9 iteration requires 17 qubits, we present the an example system and showed how to estimate its ground state output of the phase qubit for only 9 iterations of the phase esti- energy through the described method. We believe this framework mation without and with the amplitude amplification applied can be used efficiently for many eigenvalue related problems such ð1Þ to U respectively in Fig. 3 and Fig. 4. In comparison to classi- as the finding ground state energy of quantum systems. However, cally computed value, the simulation results produce the cor- there is still a need for further research to be able simulate a rect eigenvalue if the previous bit values are provided; Hamiltonian which is not given as a sum of simple unitaries. otherwise, it generates an estimate of the eigenvalue, as expected, with an error bounded by Oðj29Þ. As seen in Fig. 3, References without the amplitude amplification, depending on the value 2k [1] Rami Barends, Alireza Shabani, Lucas Lamata, Julian Kelly, Antonio Mezzacapo, of k in U , the probability difference between 1 and 0 on the Urtzi Las Heras, Ryan Babbush, A.G. Fowler, Brooks Campbell, Yu Chen, et al., phase qubit diminishes and the total success probability Digitized adiabatic quantum computing with a superconducting circuit, approaches to 0.5 (the probability of the part of the ancilla sys- Nature 534 (2016) 222–226. e [2] Esteban A. Martinez, Christine A. Muschik, Philipp Schindler, Daniel Nigg, tem simulating H). As shown in Fig. 3 with the same j value, Alexander Erhard, Markus Heyl, Philipp Hauke, Marcello Dalmonte, Thomas the total probability can be maximized by the application of Monz, Peter Zoller, et al., Real-time dynamics of lattice gauge theories with a ð1Þ few-qubit quantum computer, Nature 534 (2016) 516–519. the amplitude amplification only to U . The probability differ- [3] J. Salfi, J.A. Mol, R. Rahman, G. Klimeck, M.Y. Simmons, L.C.L. Hollenberg, S. ence now survives for 9 iterations. This can be further improved Rogge, Quantum simulation of the hubbard model with dopant atoms in silicon, Nat. Commun. 7 (2016). [4] D. Castelvecchi, Quantum computers ready to leap out of the lab in 2017, Nature 541 (2017) 9. [5] Richard P. Feynman, Simulating physics with computers, Int. J. Theor. Phys. 21 (1982) 467–488. [6] Matthias Troyer, Uwe-Jens Wiese, Computational complexity and fundamental limitations to fermionic quantum monte carlo simulations, Phys. Rev. Lett. 94 (2005) 170201. [7] Peter W. Shor, Algorithms for quantum computation: discrete logarithms and factoring, in: 35th Annual Symposium on Foundations of Computer Science, 1994 Proceedings, IEEE, 1994, pp. 124–134. [8] Masuo Suzuki, Generalized trotter’s formula and systematic approximants of exponential operators and inner derivations with applications to many-body problems, Commun. Math. Phys. 51 (1976) 183–190. [9] David Poulin, Matthew B. Hastings, Dave Wecker, Nathan Wiebe, Andrew C. Doberty, Matthias Troyer, The trotter step size required for accurate quantum simulation of quantum chemistry, Quantum Info. Comput. 15 (2015) 361–384. [10] Scott Aaronson, Read the fine print, Nat. Phys. 11 (2015) 291–293. [11] Anmer Daskin, Ananth Grama, Giorgos Kollias, Sabre Kais, Universal programmable quantum circuit schemes to emulate an operator, J. Chem. Phys. 137 (2012) 234112. [12] Anmer Daskin, Ananth Grama, Sabre Kais, A universal quantum circuit scheme for finding complex eigenvalues, Quantum Inf. Process. 13 (2014) 333–353, https://doi.org/10.1007/s11128-016-1452-3. [13] Dominic W. Berry, Andrew M. Childs, Richard Cleve, Robin Kothari, Rolando D. Somma, Simulating hamiltonian dynamics with a truncated taylor series, Phys. Rev. Lett. 114 (2015), https://doi.org/10.1103/PhysRevLett.114.090502, 090502. [14] Ammar Daskin, Sabre Kais, An ancilla-based quantum simulation framework Fig. 4. The probabilities on the phase qubit with the amplitude amplification for non-unitary matrices, Quantum Inf. Process. 16 (2017) 33. applied only to Uð1Þ. Note that the probabilities are not normalized after the [15] Guang Hao Low, Isaac L. Chuang, Hamiltonian simulation by qubitization, application of P. arXiv preprint arXiv: 1610.06546, 2016.

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002 8 A. Daskin, S. Kais / Chemical Physics xxx (2018) xxx–xxx

[16] Michele Mosca et al., Quantum searching, counting and amplitude [25] Stephen S. Bullock, Dianne P. Leary, Gavin K. Brennen, Asymptotically optimal amplification by eigenvector analysis, in: MFCS98 workshop on Randomized quantum circuits for d-level systems, Phys. Rev. Lett. 94 (2005) 230502. Algorithms, 1998, pp. 90–100. [26] Jesús Urías, Diego A. Quiñones, Householder methods for quantum circuit [17] Gilles Brassard, Peter Hoyer, Michele Mosca, Alain Tapp, Quantum amplitude design, Can. J. Phys. 94 (2015) 150–157. amplification and estimation, Contemporary Math. 305 (2002) 53–74. [27] George Cybenko, Reducing quantum computations to elementary unitary [18] Phillip Kaye, Michele Mosca, Raymond Laflamme, An Introduction to Quantum operations, Comput. Sci. Eng. 3 (2001) 27–32. Computing, Oxford Univ. Press, UK, 2006. [28] Juha J. Vartiainen, ikko Möttönen, Martti M. Salomaa, Efficient decomposition [19] Lov K. Grover, Quantum computers can search rapidly by using almost any of quantum gates, Phys. Rev. Lett. 92 (2004) 177902. transformation, Phys. Rev. Lett. 80 (1998) 4329. [29] Benjamin P. Lanyon, James D. Whitfield, Geoff G. Gillett, Michael E. Goggin, [20] Adam Paetznick, Krysta M. Svore, Repeat-until-success: non-deterministic Marcelo P. Almeida, Ivan Kassal, Jacob D. Biamonte, Masoud Mohseni, Ben J. decomposition of single-qubit unitaries, Quantum Inf. Comput. 14 (2014) Powell, Marco Barbieri, et al., Towards quantum chemistry on a quantum 1277–1301. computer, Nat. Chem. 2 (2010) 106–111. [21] Dominic W. Berry, Andrew M. Childs, Richard Cleve, Robin Kothari, Rolando D. [30] James D. Whitfield, Jacob Biamonte, Alán Aspuru-Guzik, Simulation of Somma, Exponential improvement in precision for simulating sparse electronic structure hamiltonians using quantum computers, Mol. Phys. 109 hamiltonians, in: Proceedings of the 46th Annual ACM Symposium on (2011) 735–750. Theory of Computing, ACM 2014, pp. 283–292. [31] Jacob T. Seeley, Martin J. Richard, Peter J. Love, The bravyi-kitaev [22] Shi-Jie Wei, Tao Xin, Gui-Lu Long, Efficient universal quantum channel transformation for quantum computation of electronic structure, J. Chem. simulation in ibm’s cloud quantum computer, arXiv preprint arXiv: 1706. Phys. 137 (2012) 224109, https://doi.org/10.1063/1.4768229. 08080, 2017. [32] Mikko Möttönen, Juha J. Vartiainen, Ville Bergholm, Martti M. Salomaa, [23] Gene H. Golub, Charles F. Van Loan, Matrix Computations, vol. 3, JHU Press, Quantum circuits for general multiqubit gates, Phys. Rev. Lett. 93 (2004) 2012. 130502, https://doi.org/10.1103/PhysRevLett.93.130502. [24] Peter A. Ivanov, E.S. Kyoseva, N.V. Vitanov, Engineering of arbitrary u (n) transformations by quantum householder reflections, Phys. Rev. A 74 (2006), 022323.

Please cite this article in press as: A. Daskin, S. Kais, Chem. Phys. (2018), https://doi.org/10.1016/j.chemphys.2018.01.002