HOME

TheInfoList



OR:

In
quantum computing A quantum computer is a computer that exploits quantum mechanical phenomena. On small scales, physical matter exhibits properties of wave-particle duality, both particles and waves, and quantum computing takes advantage of this behavior using s ...
, the quantum phase estimation algorithm is a
quantum algorithm In quantum computing, a quantum algorithm is an algorithm that runs on a realistic model of quantum computation, the most commonly used model being the quantum circuit model of computation. A classical (or non-quantum) algorithm is a finite seq ...
to estimate the phase corresponding to an eigenvalue of a given
unitary operator In functional analysis, a unitary operator is a surjective bounded operator on a Hilbert space that preserves the inner product. Non-trivial examples include rotations, reflections, and the Fourier operator. Unitary operators generalize unitar ...
. Because the eigenvalues of a unitary operator always have unit modulus, they are characterized by their phase, and therefore the algorithm can be equivalently described as retrieving either the phase or the eigenvalue itself. The algorithm was initially introduced by Alexei Kitaev in 1995. Phase estimation is frequently used as a subroutine in other quantum algorithms, such as Shor's algorithm, the
quantum algorithm for linear systems of equations The Harrow–Hassidim–Lloyd (HHL) algorithm is a quantum algorithm for numerically solving a system of linear equations, designed by Aram Harrow, Avinatan Hassidim, and Seth Lloyd. The algorithm estimates the result of a scalar measurement on t ...
, and the quantum counting algorithm.


Overview of the algorithm

The algorithm operates on two sets of qubits, referred to in this context as registers. The two registers contain n and m qubits, respectively. Let U be a
unitary operator In functional analysis, a unitary operator is a surjective bounded operator on a Hilbert space that preserves the inner product. Non-trivial examples include rotations, reflections, and the Fourier operator. Unitary operators generalize unitar ...
acting on the m-
qubit In quantum computing, a qubit () or quantum bit is a basic unit of quantum information—the quantum version of the classic binary bit physically realized with a two-state device. A qubit is a two-state (or two-level) quantum-mechanical syste ...
register. The eigenvalues of a unitary operator have unit modulus, and are therefore characterized by their phase. Thus if , \psi \rangle is an
eigenvector In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by ...
of U, then U, \psi\rangle = e^\left, \psi \right\rangle for some \theta\in\mathbb . Due to the periodicity of the complex exponential, we can always assume 0 \leq \theta < 1 . The goal is producing a good approximation for \theta with a small number of gates and a high probability of success. The quantum phase estimation algorithm achieves this assuming oracular access to U , and having , \psi\rangle available as a quantum state. This means that when discussing the efficiency of the algorithm we only worry about the number of times U needs to be used, but not about the cost of implementing U itself. More precisely, the algorithm returns
with high probability In mathematics, an event that occurs with high probability (often shortened to w.h.p. or WHP) is one whose probability depends on a certain number ''n'' and goes to 1 as ''n'' goes to infinity, i.e. the probability of the event occurring can be m ...
an approximation for \theta, within additive error \varepsilon, using n=O(\log(1/\varepsilon)) qubits in the first register, and O(1/\varepsilon) controlled-''U'' operations. Furthermore, we can improve the success probability to 1-\Delta for any \Delta>0 by using a total of O(\log(1/\Delta)/\varepsilon) uses of controlled-U, and this is optimal.


Detailed description of the algorithm


State preparation

The initial state of the system is: : , \Psi_0\rangle = , 0\rangle^, \psi\rangle , where , \psi\rangle is the m-qubit state that evolves through U. We first apply the ''n-qubit'' Hadamard gate operation H^ on the first register, which produces the state:, \Psi_1\rangle = (H^\otimes I_m), \Psi_0\rangle = \frac(, 0\rangle + , 1\rangle)^, \psi\rangle = \frac \sum_^ , j\rangle , \psi\rangle.Note that here we are switching between binary and n-ary representation for the n-qubit register: the ket , j\rangle on the right-hand side is shorthand for the n-qubit state , j\rangle\equiv \bigotimes_^ , j_\ell\rangle, where j=\sum_^ j_\ell 2^\ell is the binary decomposition of j.


Controlled-U operations

This state , \Psi_1\rangle is then evolved through the controlled-unitary evolution U_C whose action can be written as U_C(, k\rangle\otimes, \psi\rangle) = , k\rangle\otimes( U^, \psi\rangle), for all k=0,...,2^n-1. This evolution can also be written concisely asU_C = \sum_^ , k\rangle\!\langle k, \otimes U^k, which highlights its controlled nature: it applies U^k to the second register conditionally to the first register being , k\rangle. Remembering the eigenvalue condition holding for , \psi\rangle, applying U_C to , \Psi_1\rangle thus gives, \Psi_2\rangle \equiv U_C, \Psi_1\rangle = \left(\frac\sum_^ e^, k\rangle\right)\otimes , \psi\rangle, where we used U^, \psi\rangle = e^, \psi \rangle. To show that U_C can also be implemented efficiently, observe that we can write U_C = \prod_^ C_\ell(U^), where C_\ell(U^) denotes the operation of applying U^ to the second register conditionally to the \ell-th qubit of the first register being , 1\rangle. Formally, these gates can be characterized by their action asC_\ell(U^k) (, j\rangle\otimes , \psi\rangle) = , j\rangle\otimes ( U^, \psi\rangle).This equation can be interpreted as saying that the state is left unchanged when j_\ell=0, that is, when the \ell-th qubit is , 0\rangle, while the gate U^k is applied to the second register when the \ell-th qubit is , 1\rangle. The composition of these controlled-gates thus gives\prod_^ C_\ell(U^)(, j\rangle\otimes, \psi\rangle) = , j\rangle\otimes\left(U^ , \psi\rangle\right)= U_C , with the last step directly following from the binary decomposition j=\sum_^ j_\ell 2^\ell. From this point onwards, the second register is left untouched, and thus it is convenient to write , \Psi_2\rangle=, \tilde\Psi_2\rangle\otimes, \psi\rangle, with , \tilde\Psi_2\rangle the state of the n-qubit register, which is the only one we need to consider for the rest of the algorithm.


Apply inverse quantum Fourier transform

The final part of the circuit involves applying the inverse
quantum Fourier transform In quantum computing, the quantum Fourier transform (QFT) is a linear transformation on qubit, quantum bits, and is the quantum analogue of the discrete Fourier transform. The quantum Fourier transform is a part of many quantum algorithms, notably ...
(QFT) \mathcal on the first register of , \Psi_2\rangle:, \tilde\Psi_3\rangle = \mathcal^_ , \tilde\Psi_2\rangle.The QFT and its inverse are characterized by their action on basis states as\begin \mathcal_N, k\rangle &= N^\sum_^ e^, j\rangle, \\ \mathcal_N^, k\rangle &= N^\sum_^ e^, j\rangle. \end It follows that :, \tilde\Psi_3\rangle = \frac\sum_^ e^ \left( \frac\sum_^ e^, x\rangle \right) = \frac\sum_^ \sum_^e^ , x\rangle. Decomposing the state in the computational basis as , \tilde\Psi_3\rangle = \sum_^ c_x , x\rangle, the coefficients thus equal c_x \equiv \frac \sum_^ e^ = \frac \sum_^ e^ e^,where we wrote 2^n \theta = a + 2^n \delta, with a is the nearest integer to 2^n \theta. The difference 2^n\delta must by definition satisfy 0 \leqslant , 2^n\delta, \leqslant \tfrac. This amounts to approximating the value of \theta \in
, 1 The comma is a punctuation mark that appears in several variants in different languages. Some typefaces render it as a small line, slightly curved or straight, but inclined from the vertical; others give it the appearance of a miniature fille ...
/math> by rounding 2^n \theta to the nearest integer.


Measurement

The final step involves performing a
measurement Measurement is the quantification of attributes of an object or event, which can be used to compare with other objects or events. In other words, measurement is a process of determining how large or small a physical quantity is as compared to ...
in the computational basis on the first register. This yields the outcome , y\rangle with probability\Pr(y) = , c_y, ^2 = \left, \frac \sum_^ e^ e^ \right , ^2. It follows that \operatorname(a)=1 if \delta=0, that is, when \theta can be written as \theta=a/2^n, one always finds the outcome y=a. On the other hand, if \delta\neq0, the probability reads\operatorname(a)=\frac \left , \sum_^ e^ \right , ^2 = \frac \left , \frac \^2. From this expression we can see that \Pr(a) \geqslant \frac \approx 0.405 when \delta\neq0. To see this, we observe that from the definition of \delta we have the inequality , \delta, \leqslant \tfrac, and thus:\begin \Pr(a) &= \frac \left , \frac \right , ^2 && \text \delta \neq 0 \\ &= \frac \left , \frac \right , ^2 && \left, 1-e^\^2 = 4\left, \sin (x)\^2 \\ &= \frac \frac \\ &\geqslant \frac \frac && , \sin(\pi \delta) , \leqslant , \pi \delta , \\ &\geqslant \frac \frac && , 2\cdot2^n \delta , \leqslant , \sin(\pi 2^n\delta) , \text , \delta, \leqslant \frac \\ &\geqslant \frac .\end We conclude that the algorithm provides the best n-bit estimate (i.e., one that is within 1/2^n of the correct answer) of \theta with probability at least 4/\pi^2. By adding a number of extra qubits on the order of O(\log(1/\epsilon)) and truncating the extra qubits the probability can increase to 1 - \epsilon.


Toy examples

Consider the simplest possible instance of the algorithm, where only n=1 qubit, on top of the qubits required to encode , \psi\rangle, is involved. Suppose the eigenvalue of , \psi\rangle reads \lambda=e^, \theta\in ">\phi\rangle\equiv \frac(, 0\rangle+\lambda , 1\rangle). Applying the inverse QFT amounts in this case to applying a Hadamard gate. The final outcome probabilities are thus p_\pm = , \langle\pm, \phi\rangle, ^2 where , \pm\rangle\equiv\frac(, 0\rangle\pm, 1\rangle), or more explicitly,p_\pm = \frac =\frac. Suppose \lambda=1, meaning , \phi\rangle=, +\rangle. Then p_+=1, p_-=0, and we recover deterministically the precise value of \lambda from the measurement outcomes. The same applies if \lambda=-1. If on the other hand \lambda=e^, then p_\pm = [1 \pm \cos(2\pi/3)]/2, that is, p_+=1/4 and p_-=3/4. In this case the result is not deterministic, but we still find the outcome , -\rangle as more likely, compatibly with the fact that 2/3 is closer to 1 than to 0. More generally, if \lambda=e^, then p_+\ge 1/2 if and only if , \theta, \le 1/4 . This is consistent with the results above because in the cases \lambda=\pm1, corresponding to \theta=0,1/2, the phase is retrieved deterministically, and the other phases are retrieved with higher accuracy the closer they are to these two.


See also

* Shor's algorithm * Quantum counting algorithm * Parity measurement


References

{{DEFAULTSORT:Quantum Phase Estimation Algorithm Quantum algorithms