Quantum phase estimation algorithm

From testwiki
Jump to navigation Jump to search

Template:Use American EnglishTemplate:Short description In quantum computing, the quantum phase estimation algorithm is a quantum algorithm to estimate the phase corresponding to an eigenvalue of a given unitary operator. 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.[1][2]Template:Rp

Phase estimation is frequently used as a subroutine in other quantum algorithms, such as Shor's algorithm,[2]Template:Rp the quantum algorithm for linear systems of equations, 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 acting on the m-qubit register. The eigenvalues of a unitary operator have unit modulus, and are therefore characterized by their phase. Thus if |ψ is an eigenvector of U, then U|ψ=e2πiθ|ψ for some θ. Due to the periodicity of the complex exponential, we can always assume 0θ<1.

The goal is producing a good approximation for θ 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 |ψ 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 an approximation for θ, within additive error ε, using n=O(log(1/ε)) qubits in the first register, and O(1/ε) controlled-U operations. Furthermore, we can improve the success probability to 1Δ for any Δ>0 by using a total of O(log(1/Δ)/ε) uses of controlled-U, and this is optimal.[3]

Detailed description of the algorithm

The circuit for quantum phase estimation.

State preparation

The initial state of the system is:

|Ψ0=|0n|ψ,

where |ψ is the m-qubit state that evolves through U. We first apply the n-qubit Hadamard gate operation Hn on the first register, which produces the state:|Ψ1=(HnIm)|Ψ0=12n2(|0+|1)n|ψ=12n/2j=02n1|j|ψ.Note that here we are switching between binary and n-ary representation for the n-qubit register: the ket |j on the right-hand side is shorthand for the n-qubit state |j=0n1|j, where j==0n1j2 is the binary decomposition of j.

Controlled-U operations

This state |Ψ1 is then evolved through the controlled-unitary evolution UC whose action can be written asUC(|k|ψ)=|k(Uk|ψ), for all k=0,...,2n1. This evolution can also be written concisely asUC=k=02n1|kk|Uk, which highlights its controlled nature: it applies Uk to the second register conditionally to the first register being |k. Remembering the eigenvalue condition holding for |ψ, applying UC to |Ψ1 thus gives|Ψ2UC|Ψ1=(12n/2k=02n1e2πiθk|k)|ψ, where we used Uk|ψ=e2πikθ|ψ.

To show that UC can also be implemented efficiently, observe that we can write UC==0n1C(U2), where C(U2) denotes the operation of applying U2 to the second register conditionally to the -th qubit of the first register being |1. Formally, these gates can be characterized by their action asC(Uk)(|j|ψ)=|j(Ujk|ψ).This equation can be interpreted as saying that the state is left unchanged when j=0, that is, when the -th qubit is |0, while the gate Uk is applied to the second register when the -th qubit is |1. The composition of these controlled-gates thus gives=0n1C(U2)(|j|ψ)=|j(U=0n1j2|ψ)=UC, with the last step directly following from the binary decomposition j==0n1j2.

From this point onwards, the second register is left untouched, and thus it is convenient to write |Ψ2=|Ψ~2|ψ, with |Ψ~2 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 (QFT) 𝒬𝒯 on the first register of |Ψ2:|Ψ~3=𝒬𝒯2n1|Ψ~2.The QFT and its inverse are characterized by their action on basis states as𝒬𝒯N|k=N1/2j=0N1e2πiNjk|j,𝒬𝒯N1|k=N1/2j=0N1e2πiNjk|j. It follows that

|Ψ~3=12n2k=02n1e2πiθk(12n2x=02n1e2πikx2n|x)=12nx=02n1k=02n1e2πik2n(x2nθ)|x.

Decomposing the state in the computational basis as |Ψ~3=x=02n1cx|x, the coefficients thus equalcx12nk=02n1e2πik2n(x2nθ)=12nk=02n1e2πik2n(xa)e2πiδk,where we wrote 2nθ=a+2nδ, with a is the nearest integer to 2nθ. The difference 2nδ must by definition satisfy 0|2nδ|12. This amounts to approximating the value of θ[0,1] by rounding 2nθ to the nearest integer.

Measurement

The final step involves performing a measurement in the computational basis on the first register. This yields the outcome |y with probabilityPr(y)=|cy|2=|12nk=02n1e2πik2n(ya)e2πiδk|2. It follows that Pr(a)=1 if δ=0, that is, when θ can be written as θ=a/2n, one always finds the outcome y=a. On the other hand, if δ0, the probability readsPr(a)=122n|k=02n1e2πiδk|2=122n|1e2πi2nδ1e2πiδ|2. From this expression we can see that Pr(a)4π20.405 when δ0. To see this, we observe that from the definition of δ we have the inequality |δ|12n+1, and thus:[4]Template:Rp[5]Template:RpPr(a)=122n|1e2πi2nδ1e2πiδ|2for δ0=122n|2sin(π2nδ)2sin(πδ)|2|1e2ix|2=4|sin(x)|2=122n|sin(π2nδ)|2|sin(πδ)|2122n|sin(π2nδ)|2|πδ|2|sin(πδ)||πδ|122n|22nδ|2|πδ|2|22nδ||sin(π2nδ)| for |δ|12n+14π2.

We conclude that the algorithm provides the best n-bit estimate (i.e., one that is within 1/2n of the correct answer) of θ with probability at least 4/π2. By adding a number of extra qubits on the order of O(log(1/ϵ)) and truncating the extra qubits the probability can increase to 1ϵ.[5]

Toy examples

Consider the simplest possible instance of the algorithm, where only n=1 qubit, on top of the qubits required to encode |ψ, is involved. Suppose the eigenvalue of |ψ reads λ=e2πiθ, θ[0,1). The first part of the algorithm generates the one-qubit state |ϕ12(|0+λ|1). Applying the inverse QFT amounts in this case to applying a Hadamard gate. The final outcome probabilities are thus p±=|±|ϕ|2 where |±12(|0±|1), or more explicitly,p±=|1±λ|24=1±cos(2πθ)2. Suppose λ=1, meaning |ϕ=|+. Then p+=1, p=0, and we recover deterministically the precise value of λ from the measurement outcomes. The same applies if λ=1.

If on the other hand λ=e2πi/3, then p±=[1±cos(2π/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 | as more likely, compatibly with the fact that 2/3 is closer to 1 than to 0.

More generally, if λ=e2πiθ, then p+1/2 if and only if |θ|1/4. This is consistent with the results above because in the cases λ=±1, corresponding to θ=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

References

Template:Reflist

Template:Quantum information