Calculating Unknown Eigenvalues with a Quantum Algorithm

Calculating Unknown Eigenvalues with a Quantum Algorithm

Xiao-Qi Zhou Centre for Quantum Photonics, H. H. Wills Physics Laboratory & Department of Electrical and Electronic Engineering, University of Bristol, BS8 1UB, United Kingdom    Pruet Kalasuwan Centre for Quantum Photonics, H. H. Wills Physics Laboratory & Department of Electrical and Electronic Engineering, University of Bristol, BS8 1UB, United Kingdom    Timothy C. Ralph Centre for Quantum Computation and Communication Technology, School of Mathematics and Physics, University of Queensland, Brisbane 4072, Australia    Jeremy L. O’Brien Centre for Quantum Photonics, H. H. Wills Physics Laboratory & Department of Electrical and Electronic Engineering, University of Bristol, BS8 1UB, United Kingdom

Quantum algorithms are able to solve particular problems exponentially faster than conventional algorithms, when implemented on a quantum computer. However, all demonstrations to date have required already knowing the answer to construct the algorithm. We have implemented the complete quantum phase estimation algorithm for a single qubit unitary in which the answer is calculated by the algorithm. We use a new approach to implementing the controlled-unitary operations that lie at the heart of the majority of quantum algorithms that is more efficient and does not require the eigenvalues of the unitary to be known. These results point the way to efficient quantum simulations and quantum metrology applications in the near term, and to factoring large numbers in the longer term. This approach is architecture independent and thus can be used in other physical implementations.

A quantum algorithm is a program, designed to be run on a quantum computer, that solves a computational task using less physical resources than the best known classical algorithm Nielsen and Chuang (2000); of most interest are those for which an exponential reduction is achieved. The key example is the phase estimation algorithm Kitaev (1996), which provides the quantum speedup in Shor’s factoring algorithm Shor (1994) and quantum simulation algorithms Lloyd (1996); Aspuru-Guzik et al. (2005). To date experiments have demonstrated only the read-out phase of quantum algorithms, but not the steps in which input data is read-in and processed in order to calculate the final quantum state; knowing the answer beforehand was essential in preparing this state.

We present a full, scalable demonstration of the iterative quantum phase estimation algorithm (IPEA) for a one-qubit unitary in which the extracted answer is truly calculated by the algorithm. In contrast to previous work, no prior knowledge of the unitary is required for the implementation of the algorithm. We also use the IPEA circuit to generate eigenstates of a unitary, which is important in the context of quantum chemistry simulation algorithms Kassal et al. (2011), for example. The scheme itself is architecture independent and can be used in other physical architectures. These results point to practical applications of the phase estimation algorithm, including quantum simulations and quantum metrology in the near term, and factoring in the long term.

Quantum computation—the processing and read-out of information encoded on quantum systems—can in principle solve computational problems that are intractable using classical computation. Examples of classically intractable problems that can be solved by a quantum computer are the determination of the prime factors of a large number and the simulation of complex chemical reactions. In both these examples, the key quantum sub-routine employed is the phase estimation algorithm which, given some non-diagonal representation of a Hamiltonian plus one of its eigenstates, enables the corresponding eigenvalue to be estimated to arbitrary precision in polynomial time.

Many quantum computations can be roughly broken down into two sections: read-in and processing of the input data; and processing and read-out of the solution. In the first phase the initial data is read in to a quantum register and processed with quantum gates, sometimes multiple times. This produces a quantum state in which the solution is encoded. In the second phase the quantum state may be subjected to further processing followed by measurement, producing a classical data string containing the solution. Even though quantum computers are currently limited to a small number of qubits, there is considerable interest in the small scale demonstration of quantum algorithms even if the size of the problems solved means that they remain easily tractable with classical techniques. Such demonstrations remain challenging even for small numbers of qubits as they typically require the sequential application of a large number of quantum gates.

In recent years a number of elegant demonstrations of the read-out phase of Shor’s factoring algorithm Vandersypen et al. (2001); Lu et al. (2007); Lanyon et al. (2007); Politi et al. (2009) and a quantum chemistry simulation algorithm Lanyon et al. (2010) have been made. In these demonstrations, quantum gates have been used to produce the quantum state corresponding to a particular solution of the algorithm. It was then shown that the corresponding solution could be read-out with high fidelity from this state. However, in each case, the method for producing the quantum state explicitly required the solution to already be known from a classical calculation. That is, the solution was put into the quantum state by hand, before being read-out through further processing and measurement. It is clearly important to go beyond this restriction and demonstrate both phases of a quantum algorithm.

First, we briefly review the standard phase estimation algorithm Nielsen and Chuang (2000): Given a unitary and one of its eigenstates which fulfill the equation


the task is to find what the corresponding eigenvalue is—in other words, find the value of . As shown in Fig. 1(a), ancillary qubits act as controls, where each qubit is prepared in , and the target is the given eigenstate . After applying a Hadamard gate to each of the control qubits, we obtain the state , where . This state can also be represented as


Then a series of controlled-unitary gates are applied on the state as shown in Fig. 1(a) and thus convert it to


The target state is intact and all the information about is contained in the state of the control qubits. The qubits of the control register then undergo an inverse quantum Fourier transform (), and the control qubits are converted to , where  () is an estimated bit equal to 0 or 1. By measuring the control qubits in the computational basis, one obtains the values of , and the estimated phase in binary expansion:

Figure 1: The phase estimation algorithm. (a) The standard quantum circuit for phase estimation, where is the standard Hadamard gate and is the inverse quantum Fourier transform. The measurements are all implemented in computational basis. (b) The iteration of the iterative phase estimation algorithm (IPEA). The algorithm is iterated times to get an -bit  (see Eq. 4), which is the approximation to the phase of the eigenstate  (see Eq. 1). The measurement is implemented in basis, where /. Each iteration obtains one estimated bit ; starting from the least significant (), is iterated backwards from to 1. The feedback angle depends on the previously measured bits as , where in binary expansion and .

As the inverse quantum Fourier transform can be scalably realized in a semiclassical way Griffiths and Niu (1996) where no entangling gates are needed, the circuit with ancillary qubits in Fig. 1(a) can be simplified to an round iterative single ancillary qubit circuit. This simplified version is called the iterative phase estimation algorithm (IPEA) Dobšíček et al. (2007). Figure 1(b) shows the IPEA at the iteration. At the end of this iteration, a measurement of the ancillary qubit in the computational basis is performed, yielding the result 0 or 1, which is the estimate of the bit of in the binary expansion. Note that in the IPEA scheme the least significant bits are evaluated first (that is, k is iterated backwards from m to 1) and the information obtained is used to improve the estimation of the more significant bits. This information transfer between iterations is realized via a single qubit rotation , whose angle is determined by all previously measured bits, as described in the caption of Fig. 1(b).

Figure 2: (a) Simplified entanglement-based circuit for - gate. The initial input state is , where is a multi-qubit polarization-encoded state and red and blue denote different spatial modes of the photons. After the blue modes pass through the unitary gate , which is realized by cascading copies of , the red and blue modes of each target qubit are mixed on beamsplitters (BS). By post-selecting the case where an even number of target photons arrives in lower spatial modes, - is realized for the input state , where . The rotation and the measurement in basis are then used to extract —the estimate of the bit of the phase . (b) Experimental setup for the th iteration of the two-qubit iterative phase estimation algorithm (IPEA). A 60 mW continuous-wave (CW) laser beam with a central wavelength of 404nm is focused onto a type-II BBO crystal to create the polarization entangled photon-pairs. The PBS part of the BS/PBS cube and the following waveplates convert the two photons to the desired polarization-spatial entangled state (see Equation 7). Based on this state, the - gate is effectively realized, where is the unitary whose eigenvalue is target to be estimated. The rotation gate  (for the value of , see the caption of Figure 1b) is implemented by three waveplates — two quarter-waveplates with a half-waveplate in between. The displaced-Sagnac structure make the phase between modes and inherently stable.

In the case where the phase has exactly bits in binary expansion, a perfect implementation of iterations of the algorithm will deterministically extract the exact phase, which means . When has a binary expansion more than m bits, it has been proven that a perfect implementation of the algorithm achieves a precision of with an error probability less than , which is independent of  Dobšíček et al. (2007). This error can always be eliminated by simply repeating each IPEA iteration several times and choosing the most frequently observed result as the corresponding estimated bit. Note that this procedure is scalable.

From the description of the IPEA above, it is clear that the key procedure of this algorithm is to implement a sequence of controlled unitary gates - (see Fig. 1(b)). The standard method for implementing a controlled-unitary gate relies on its decomposition into controlled-NOT (CNOT) and single-qubit gates Nielsen and Chuang (2000). Even for the simplest two-qubit case, where the unitary is a single-qubit unitary, two CNOT gates and three single-qubit gates are needed to realise this controlled-unitary gate Nielsen and Chuang (2000).

Recently, a scheme for simplifying the construction of controlled-unitary gates was proposed Ralph et al. (2007) and experimentally demonstrated Lanyon et al. (2009). Based on this scheme, the realization of the IPEA in linear optics has been reported Lanyon et al. (2010). However, this realization has a critical drawback: The method of constructing the controlled-unitary gate in that experiment is based on decomposing the single-qubit unitary to the product of , and , where and are two complementary unitary gates and is a phase-shift gate with phase shift in the computational basis. The paradox is that one can directly calculate the phase introduced by from the information of how to decompose in this way—i.e. there is no need to use the phase estimation algorithm to estimate the phase because it is already known exactly. To overcome this and realize the phase estimation algorithm generally, control qubits should be added to the unitary without already knowing this information.

Figure 3: Phase estimation data for 12 different s. Each is composed of two half-waveplates (HWPs); the first is set to , the second HWP is oriented at (a) , (b) , (c) , (d) , (e) , (f) , (g) , (h) , (i) , (j) , (k) and (l) . For each , three iterations of the algorithm are implemented and thus a three-digits estimated phase is obtained. Compared with the phase the error in is always less then in binary, which is consistent with theoretical prediction.
Figure 4: Using the phase estimation algorithm to generate the eigenstates of . Panels (a)-(i) show the density matrix of the target output; (L) experimental (R) ideal. Unitaries , and are implemented with a single half-waveplate (HWP)set to , and , respectively. Panels (a), (b), (c) show the case where the unitary is , , , the initial target state is and the measurement outcome of the control qubit is . Panels (d), (e), (f) show the case where the unitary is , , , the initial target state is and the measurement result of the control qubit is . Panels (g), (h), (i) show the case where the unitary is , , , the initial target state is and the measurement result of the control qubit is . The output target state is determined only by the measurement result of the control qubit and not affected by changing the initial target state, as verified by the similarity between the matrices (a) and (g), (b) and (h), (c) and (i). State tomography and maximum-likelihood are used for the reconstruction of the density matrices. The fidelities of the reconstructed density matrices with the ideal case are shown. The error estimates are obtained by performing many reconstructions with random noise added to the raw data in each case.

We recently proposed and demonstrated a new scheme for adding control qubits to quantum gates Zhou et al. (2011). In the case of the phase estimation algorithm, the key advantage of this scheme is that a controlled-unitary gate can be implemented without needing to know any information about the unitary—i.e. the unitary can be a “black box” and still the controlled-unitary can be implemented. This feature is critical for the phase estimation application. Details of this scheme can be found in Ref. Zhou et al., 2011;

For the IPEA application, where the control qubit is always prepared in state, the implementation of the controlled-unitary gate can be simplified. As shown in Fig. 2(a), the initial state is , where and denote horizontal and vertical polarization respectively, denotes the given (eigen)state encoded in polarization qubits, and denote the red and blue spatial modes respectively.

The blue modes of the target pass through the unitary and thus the state is converted to


Then the red and blue modes of each target qubit are mixed on non-polarising beamsplitters (BS) to remove the path information and the state is now changed to


where  () denotes the cases where an even (odd) number of target photons arrive in the lower spatial modes. By post-selecting any case in , the desired state is obtained with a probability of success. There are such cases in that the total probability of success is , regardless of the size of the unitary gate . Here is implemented by simply placing copies of the unitary into the path of the blue modes ( could alternatively be realised by passes through Higgins et al. (2007)). Finally, to finish the iteration, the first qubit passes through the rotation and is measured in basis to extract — the estimate bit of the phase . There is another probability that one of the cases in occurs which means the state is obtained. Using the same procedures will extract the same as long as the measurement result of  () is redefined as  (). In this way, the circuit shown in Fig. 2(a) can be used to implement the IPEA deterministically—i.e with probability 1.

By using the entanglement-based controlled-unitary gates described above, we implement the IPEA without having to already know the value of the phase i.e. without already knowing the answer to the algorithm. The experimental setup is shown in Fig. 2(b): A mw 404 nm continuous wave laser is focused on a BBO crystal cut for type-II spontaneous parametric down-conversion (SPDC) to create a two-photon polarization-entangled state , where and denote the control and target photons, respectively. A special beamsplitter cube, which on one half is a non-polarization beamsplitter (BS) and the other half is polarization beamsplitter (PBS) Gao et al. (2008), is used as shown to build a displaced-Sagnac structure to increase the inherent phase stability of the setup. The photon passes through the PBS part of the BS/PBS cube and thus the two-photon state is converted to . Waveplates are used in the path of and to prepare the required polarization-spatial entangled state


where is the eigenstate of the target unitary i.e . Then, after the blue mode passes through the unitary , the two modes of photon 2 are combined at the BS side of the BS/PBS cube (Fig. 2(b)). By post-selecting the case where photon 2 exits at port 2, we get the desired two-photon state , which can be written as . To finish the iteration, photon 1 passes through the gate ( is set to an angle determined by all previously measured bits; see Fig. 1(b) caption) and then is measured in the basis to obtain the bit of the estimated phase.

We implemented three iterations of the IPEA to estimate the value of the phase to three bits of precision. The unitaries , , and are used in the first, second and third iterations, and and are realized by four and two consecutive gates, respectively. The gate is implemented by two consecutive HWPs. A convenient feature of this unitary is that and are always eigenstates, where . This can be understood by considering the following fact: a HWP always convert the states no matter what the angle of the HWP is. Two consecutive HWPs therefore leave and unchanged, up to a phase factor—i.e. and are the eigenstates of this unitary . We therefore choose as the input eigenstate . Other than convenience there is nothing special about this choice of . The eigenvalue of is determined by the angles of the two HWPs. We fixed the angle of the first HWP to and changed the second HWP’s angle to various values to realize a number of different unitaries. For each of these unitaries, we get a 3-digit estimate of the phase in binary expansion. The results are shown in Fig. 3. We see that the IPEA gives an accurate estimate of the phase . We note: (i) that is non-trivially related to , i.e. appears in a non-diagonal representation of U which must be diagonalized to extract ; and (ii) in principle a third party could prepare the waveplates without revealing , and the experimenter would still be able to successfully extract .

It has been shown Abrams and Lloyd (1999) that the phase estimation algorithm still works even when the input target state is not the eigenstate of  (provided the iterations are coherent): Assume the input state is where and are the eigenstates of with distinctive eigenvalues and respectively. By passing the control and the target through the same circuit as shown in Fig. 1(a), the state would be obtained at the output, where and are the estimates of and , respectively. When the number of control qubits is sufficiently large to make and distinguishable, measuring the control qubits in the computational basis yields either , which means the estimated eigenvalue is and the target state automatically collapses to the corresponding eigenstate , or , which means the estimated eigenvalue is and the target state collapses to the state . In this way, the phase estimation circuit can be regarded as an eigenvalue measuring device or as an eigenstate generator.

We performed an experiment to show this eigenstate generation feature of the phase estimation algorithm. We use a similar experimental setup as shown in Fig. 2(b). The gate, whose eigenvalue is the target to be estimated, is implemented by a single HWP. Two HWPs oriented at the same angle realize an identity operator, which means . Based on this fact, one can deduce that, for , all the gates - are equal to identity operators. No iterations are required and we implement the only non-trivial circuit - (corresponds to ). We set the initial target state to and measure the control photon in the basis. When the result is or , the target qubit collapses to the eigenstate of with eigenvalue or , respectively. To evaluate this process, we perform state tomography on the output target state and compare the result with the theoretical prediction. The results are shown in Figs. 4(a)–(f). The output target state, which is only determined by the measurement result of the control qubit, is not affected by changing the initial target state. We verify this feature by changing the initial target state to and performing the state tomography on the output target state. The results are shown in Figs. 4(g)–(i).

The non-unit fidelities observed above arise primarily due to two effects: the partial distinguishability of the photons generated in the SPDC source that results in some incoherent mixture; and the imperfect optical components, including settings of waveplate angles. In the case of the eigenstate generation results (Fig. 4), the fidelities of the output states range from to , which is, in part, due to the varying overlap between the input state and the output states; this results in a large difference in the output count rates. The total counts of the output are 600 s in Fig. 4(a) and 2200 s in Fig. 4(c), for example, while the error counts of the output are similar in both cases.

The ability to construct quantum algorithms without the need to know the answer in advance is clearly essential to their practical application. In the case of the phase estimation algorithm this requires that the controlled unitaries - are realised without already knowing the eigenvalues of . The approach demonstrated here achieves this efficiently and opens the way to practical applications of quantum simulation algorithms, for calculating molecular properties Lanyon et al. (2010) for example, and metrology applications Higgins et al. (2007), for enhanced measurement precision, in the near term, and factoring in the long term. For Shor’s factoring algorithm, coherent iterations are required Parker and Plenio (2000), which can be realized by employing the path entangling gates of Ref. Zhou et al., 2011.

We note that the approach taken here is scalable: the IPEA is itself scalable; the scheme of Fig. 2(a) works deterministically, provided can be performed and the entangled input state can be prepared; the realization of controlled unitaries is scalable to multi-qubit unitaries and applicable to any physical implementation where a higher dimensional Hilbert space is accessible, which typically is the case. Trapped ions systems, for example, offer a large number of precisely controllable internal electronic and external vibrational degrees of freedom. For photons path degrees of freedom, as used here, are ideal, and the required entangled input state can be efficiently prepared using the ‘KLM’ Knill et al. (2001) or derivative approaches to linear optical quantum computing. For other architectures this entangled input may be directly prepared using deterministic entangling gates, and the BS operations (Fig. 2(a)) would correspond to single qudit operations.

We thank P.J. Shadbolt for writing the quantum process tomography code and J.C.F. Matthews, A. Peruzzo, G.J. Pryde and P. Zhang for helpful discussions. This work was supported by EPSRC, ERC, PHORBITECH and NSQI. J.L.O’B. acknowledges a Royal Society Wolfson Merit Award.


  • Nielsen and Chuang (2000) M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information (Cambridge University Press, 2000).
  • Kitaev (1996) A. Y. Kitaev, Electr. Coll. Comput. Complex. 3 (1996).
  • Shor (1994) P. W. Shor, Proc. 35th Annu. Symp. Foundations of Computer Science and IEEE Computer Society and Los Alamitos and CA pp. 124–134 (1994), ed. S. Goldwasser.
  • Lloyd (1996) S. Lloyd, Science(Washington) 273, 1073 (1996).
  • Aspuru-Guzik et al. (2005) A. Aspuru-Guzik, A. D. Dutoi, P. J. Love, and M. Head-Gordon, Science 309, 1704 (2005).
  • Kassal et al. (2011) I. Kassal, J. Whitfield, A. Perdomo-Ortiz, M.-H. Yung, and A. Aspuru-Guzik, Annu. Rev. Phys. Chem. 625, 185 (2011).
  • Vandersypen et al. (2001) L. M. K. Vandersypen, M. Steffen, G. Breyta, C. S. Yannoni, M. H. Sherwood, and I. L. Chuang, Nature 414, 883 (2001).
  • Lu et al. (2007) C.-Y. Lu, D. E. Browne, T. Yang, and J.-W. Pan, Phys. Rev. Lett. 99, 250504 (2007).
  • Lanyon et al. (2007) B. P. Lanyon, T. J. Weinhold, N. K. Langford, M. Barbieri, D. F. V. James, A. Gilchrist, and A. G. White, Phys. Rev. Lett. 99, 250505 (2007).
  • Politi et al. (2009) A. Politi, J. C. F. Matthews, and J. L. O’Brien, Science 325, 1221 (2009).
  • Lanyon et al. (2010) B. P. Lanyon, J. D. Whitfield, G. G. Gillett, M. E. Goggin, M. P. Almeida, I. Kassal, J. D. Biamonte, M. Mohseni, B. J. Powell, M. Barbieri, et al., Nature Chem. 2, 106 (2010).
  • Griffiths and Niu (1996) R. B. Griffiths and C.-S. Niu, Phys. Rev. Lett. 76, 3228 (1996).
  • Dobšíček et al. (2007) M. Dobšíček, G. Johansson, V. Shumeiko, and G. Wendin, Phys. Rev. A 76, 030306 (2007).
  • Ralph et al. (2007) T. C. Ralph, K. J. Resch, and A. Gilchrist, Phys. Rev. A 75, 022313 (2007).
  • Lanyon et al. (2009) B. P. Lanyon, M. Barbieri, M. P. Almeida, T. Jennewein, T. C. Ralph, K. J. Resch, G. J. Pryde, J. L. O’Brien, A. Gilchrist, and A. G. White, Nat. Phys. 5, 134 (2009).
  • Zhou et al. (2011) X.-Q. Zhou, T. C. Ralph, P. Kalasuwan, M. Zhang, A. Peruzzo, B. P. Lanyon, and J. L. O’Brien, Nat. Commun. 2, 413 (2011).
  • Higgins et al. (2007) B. L. Higgins, D. W. Berry, S. D. Bartlett, H. M. Wiseman, and G. J. Pryde, Nature 450, 393 (2007).
  • Gao et al. (2008) W.-B. Gao, C.-Y. Lu, X.-C. Yao, P. Xu, O. Guhne, A. Goebel, Y.-A. Chen, C.-Z. Peng, Z.-B. Chen, and J.-W. Pan (2008).
  • Abrams and Lloyd (1999) D. S. Abrams and S. Lloyd, Phys. Rev. Lett. 83, 5162 (1999).
  • Parker and Plenio (2000) S. Parker and M. B. Plenio, Phys. Rev. Lett. 85, 3049 (2000).
  • Knill et al. (2001) E. Knill, R. Laflamme, and G. J. Milburn, Nature 409, 46 (2001).
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description