A Modified Phase Estimation Algorithm to Compute the Eigenvalue of a Matrix with a Positive Eigenvector Anmer Daskin∗ Department of Computer Engineering, Istanbul Medeniyet University, Uskudar, Istanbul, Turkey Quantum phase estimation algorithm finds the ground state energy, the lowest eigenvalue, of a quantum Hamiltonian more efficiently than its classical counterparts.
arXiv:1505.02984v3 [quant-ph] 20 May 2015
Furthermore, with different settings, the algorithm has been successfully adapted as a sub frame of many other algorithms applied to a wide variety of applications in different fields. However, the requirement of a good approximate eigenvector given as an input to the algorithm hinders the application of the algorithm to the problems where we do not have any prior knowledge about the eigenvector. This paper presents a modification to the phase estimation algorithm for the positive operators to determine the eigenvalue corresponding to the positive eigenvector without the necessity of the existence of an initial approximate eigenvector. Moreover, by this modification, we show that the success probability of the algorithm becomes to depend on the normalized absolute sum of the matrix elements of the unitary operator whose eigenvalue is being estimated. This provides a priori information to know the success probability of the algorithm beforehand and makes the algorithm output the right solution with high probability in many cases.
I.
INTRODUCTION
In the recent decades, there have been many quantum algorithms proposed for the problems inefficient to solve on classical computers. The quantum phase estimation algorithm [1, 7] is a leading illustration of such algorithms. It is used for quantum simulations to estimate the eigenenergy corresponding to a given approximate eigenvector of the unitary evolution operator of a quantum Hamiltonian. Furthermore, with different settings, it has been adapted as a sub frame of many quantum algorithms applied to wide variety of applications in different fields (see the review article ref.[6] and the references therein). The phase estimation algorithm (PEA) in general sense is defined as to find the value of φj ∗
email:
[email protected] for a given approximate eigenvector |µj i in the eigenvalue equation U |µj i = ei2πφj |µj i. The algorithm mainly uses two quantum registers: Viz. |reg1i initially set to zero state and |reg2 i holding an approximate eigenstate of a unitary matrix U . The first operation in the algorithm j
puts |reg1i into the equal superposition. In this setting, a sequence of operators, U 2 , controlled by the jth qubit of |reg1i are applied to |reg2 i. Here, j = 1 . . . m and m is the number of qubits in |reg1i and also determines the precision of the output. These sequential operations generate the quantum Fourier transform (QF T ) of the phase on |reg1i. Therefore, the application of the inverse quantum Fourier transform (QF T † ) turns the value of |reg1i into the binary value of the phase. Consequently, one measures |reg1i to obtain the phase. Here, if the unitary operator U is the time evolution operator of a quantum Hamiltonian, then one also obtains the eigenenergy of that Hamiltonian. Although PEA is successfully used for many different applications, since it requires a preexisting approximate eigenvector, it may fail in the cases where the approximation of the eigenvector is not good. This hinders the uses of the algorithm when there is not enough prior knowledge about the eigenvector to procure a good approximation. In this article, we show that for a matrix with only one positive eigenvector, e.g. positive matrices, one can obtain the associated eigenvalue with probability dependent on the absolute sum of the matrix elements of the unitary operator by modifying the conventional phase estimation algorithm in the following way: i) Instead of an approximate eigenvector, initial value of |reg2 i is set to |0i and then put into equal superposition state by applying Hadamard gates. ii) In the output, we change the basis of the second register by applying the Hadamard gates. Then, we show that if the measurement of the second register is equal to |0 . . . 0i state, then the eigenvalue can be estimated on the first register. We also show that the probability to measure |reg2 i in |0 . . . 0i state is dependent on the absolute value of the normalized sum of the matrix elements of U and very close to it. The probability to see the eigenvalue on |reg1 i is close to one when the positive eigenvector is the principal eigenvector. In the next section, the modified algorithm is defined in steps and details.
II.
THE MODIFIED PHASE ESTIMATION ALGORITHM
For a unitary operator U of order 2n with eigenvalues λ1 . . . λ2n and corresponding phases φ1 . . . φ2n and eigenvectors |µ1 i . . . |µ2n i , respectively; assuming that there is only one positive eigenvector: i.e. |µ1 i, we describe the steps of the algorithm as follows: • The system is prepared in a way so that it includes two register: viz., |reg1 i and |reg2 i 2
with m and n number of qubits, respectively. • Both registers are initialized into zero state: |ψ0 i=|reg1 i|reg2 i=|0i|0i. • Then the Hadamard operator is applied to both registers: |ψ1 i = (H
⊗m
⊗H
⊗n
) |0i |0i =
1 2n+m
2m+n X−1
|xi
(1)
x=0 j
• As in the customary phase estimation algorithm; the unitary evolution operators U 2
controlled by the jth qubit of |reg1 i are applied to |reg2 i, and finally the inverse of the quantum Fourier transform (QF T † ) is applied to |reg1i. At this point of the algorithm, we have a quantum state in which |reg1 i and |reg2 i hold the superposition of the eigenvalues and the associated eigenvectors, respectively: PN −1 |ψ2 i = j=0 αj |φj i |µj i. The amplitude αj is related to the angle between the equal √ Pn superposition state and the eigenvector |µj i: αj = 1/ 2n 2i=1 µji (note that |reg2 i P n −1 was √12n 2x=0 |xi at the beginning). If the second register is written in the Hadamard p basis,|+ · · · + +i + |+ · · · + −i + · · · + |− · · · − −i, where |±i = 1/ (2)(|0i ± |1i); then the following quantum state is obtained: n
|ψ2 i =
2 X
β1j |φj i |+ · · · +i
j=1
(2)
n
+ ··· +
2 X
β2n j |φj i |− · · · −i
j=1
where βij s are new coefficients. Now, since there is only one eigenvector, viz. |µ1 i, elements in which are all positive, in the Hadamard basis this positive eigenvector can be considered to be the closest state to |+ + · · · + +i. • To revert the above state back to the standard basis, the Hadamard operator H ⊗n is again applied to |reg2 i: |ψ3 i = (I ⊗ H ⊗n ) |ψ2 i: n
|ψ3 i =
2 X
β1j |φj i |0 . . . 0i
j=1
(3)
n
+ ··· +
2 X
β2n j |φj i |1 . . . 1i
j=1
• |reg2 i is measured in the standard basis. As a result, for |reg2 i= |0 . . . 00i, the system collapses to the state where the phase associated with the positive eigenvector is expected to be dominant in the first register. 3
• In the final step, the first register is measured to obtain the phase φ1 and compute λ1 = ei2πφ1 . These steps also drawn in Fig.1.
FIG. 1. Circuit design for the modified phase estimation algorithm. In the end, note that the second register is measured in the Hadamard basis.
III.
THE SUCCESS PROBABILITY OF THE ALGORITHM
As obvious in Eq.(3), the success probability of getting |0 . . . 0i is
P2n
j=1
β1j . In addition,
after measuring |0 . . . 0i on |reg2 i, the probability to measure |φ1 i on |reg1 i is |β11 |2 . Since we apply an equal superposition as an input, the component of an eigenvector in this direction determines the probability to get the corresponding eigenvalue on |reg1 i. More formally, after √ P2n P −1 n the application of QF T † , we get |ψ2 i = N j=0 αj |φj i |µj i, where αj = 1/ 2 i=1 µji . If |reg2 i of the state in Eq.(2) is measured in the Hadamard basis, the probability to see |+ · · · +i is the sum of the amount of the components of the eigenvectors in the direction of the initial vector: n
Preg2 =
2 X
|αj |4 ≥
j=1
(4)
P2n
β1j , i.e. the probability of measuring |reg2 i in |0 . . . 0i state at the √ takes the smallest value only when all |αj |s are equal to 1/ 2n . Moreover, when
This is also equal to end. Preg2
1 2n
j=1
|reg2 i=|0 . . . 0i, the probability to see |φ1 i on |reg1 i is: Preg1 = |β11 |2 =
α14 . Preg2
(5)
Although we have drawn the equalities for probabilities, without knowing the eigenvectors, it is not possible to compute exact |αj |s and so Preg1 and Preg2 . Therefore, we will try to estimate a bound for them: Since α1 is the normalized sum of the vector elements, it is easy to see that √ α1 ≥ 1/ 2n . A similar observation is also made in ref.[4] where the principal eigenvector is 4
found for a given eigenvalue equal to 1. Now,using the eigenvalue decomposition, we get the following: n
n
2 2 X X 1 XX 2 | Uij | = | λj αj | ≤ αj2 = 1, N i j j=1 j=1
(6)
from which we can draw the following inequality: 2n
X 1 XX | Uij | ≥ αj4 = Preg2 . N i j j=1
(7)
However, If we ignore the impact of the eigenvalues having on the probabilities, then the operations on the second register can be considered as: H ⊗n U H ⊗n |0i, which turns out to P P be the normalized absolute sum of the matrix elements of U : N1 | i j Uij |. Therefore, we can expect Preg2 not to be much less than the sum. Furthermore, if we consider the positive eigenvector as the principal eigenvector corresponding to the largest eigenvalue, then α1 becomes much greater than any of αj s and so the probability Preg1 =
α41 Preg2
. In Fig.2 and Fig.3, these
observations are also shown by numerical simulations, where the comparison of the probabilities Preg1 and Preg2 and the normalized absolute sum of the matrix elements are represented for random matrices with a positive eigenvector of different dimensions. In the simulations, we have used MATLAB’s randn function to generate a complex matrix A; then we use it to have a non-negative symmetric matrix[9] H = |A + A† |; and made sure the existence of a positive eigenvector by checking the signs of the eigenvectors[10]. As seen in the figure, especially in large dimensions, the sum of the matrix elements of U = ei2πH are directly related to the success probability. Therefore, this provides a priori information which can be used to determine when and how to apply the algorithm. This also gives us an insight to determine for which class of the problems, this technique can be used.
IV.
DISCUSSION AND CONCLUSION
In conclusion, here we have described a modified phase estimation algorithm where the eigenvalue of the matrices particularly with a positive eigenvector can be found with high probability. This eliminates the necessity of knowing an initial approximate eigenvector to apply the phase estimation algorithm. Therefore, it solves one of the bottlenecks the algorithm has. In addition, this modified algorithm can be used for a wide variety of problems. One of the classes of problems which guarantee the use of the algorithm is the problems represented by irreducible non-negative matrices: According to Perron-Frobenius theorem, these matrices have 5
only one positive eigenvector and a corresponding principal eigenvalue [8]. There is also more general but the same statement for compact operators [5]. One of the applications of these matrices can be found in quantum mechanics where such matrices called stoquastic matrices [2, 3]: i.e., matrices with positive off diagonal elements. One may also apply permutation matrices or splitting techniques to guarantee the existence of a positive eigenvector. In the application of the algorithm, since the success probability is related to the sum of the matrix elements, in many applications it can deliver a good probability. However, when the probability is low than an acceptable value, similar permutations or splitting techniques may be used again to obtain better probability.
[1] Abrams, D.S., Lloyd, S.:
Quantum Algorithm Providing Exponential Speed Increase for
Finding Eigenvalues and Eigenvectors.
Phys. Rev. Lett. 83(24), 5162–5165 (1999).
doi:
10.1103/PhysRevLett.83.5162 [2] Bravyi, S., Divincenzo, D.P., Oliveira, R., Terhal, B.M.: The complexity of stoquastic local hamiltonian problems. Quantum Info. Comput. 8(5), 361–385 (2008). URL http://dl.acm. org/citation.cfm?id=2011772.2011773 [3] Bravyi, S., Terhal, B.: Complexity of stoquastic frustration-free hamiltonians. SIAM Journal on Computing 39(4), 1462–1485 (2010). doi:10.1137/08072689X. URL http://dx.doi.org/10. 1137/08072689X [4] Daskin, A., Grama, A., Kais, S.: Multiple network alignment on quantum computers. Quantum Information Processing 13(12), 2653–2666 (2014). doi:10.1007/s11128-014-0818-7. URL http: //dx.doi.org/10.1007/s11128-014-0818-7 [5] Du, Y.: Order structure and topological methods in nonlinear partial differential equations, vol. 2. World Scientific (2006) [6] Georgescu, I., Ashhab, S., Nori, F.: Quantum simulation. Reviews of Modern Physics 86(1), 153 (2014) [7] Kitaev, A.: Quantum measurements and the Abelian Stabilizer Problem. Electronic Colloquium on Computational Complexity (ECCC) 3(3) (1996) [8] Meyer, C.: Matrix analysis and applied linear algebra book and solutions manual, vol. 2. Society for Industrial and Applied Mathematics (2000) [9] Note that the corresponding unitary operator is generated in MATLAB by expm(1i ∗ 2pi ∗ H) [10] To find eigenvectors in MATLAB, the function eig(H) has been used.
6
(a)2 by 2 Matrices
(b)4 by 4 Matrices
(c)8 by 8 Matrices
(d)16 by 16 Matrices
(e)32 by 32 Matrices
(f)64 by 64 Matrices
FIG. 2. Representations of Preg1 , Preg2 and the normalized sum of the matrix elements P P 1/N | i j Uij |
7
(a)128 by 128 Matrices
(b)256 by 256 Matrices
(c)512 by 512 Matrices
FIG. 3. Representations of Preg1 , Preg2 and the normalized sum of the matrix elements P P 1/N | i j Uij |.
8