Quantum phase estimation algorithm

From HandWiki
Short description: Quantum algorithm for eigenvalue estimation

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]: 246 

Phase estimation is frequently used as a subroutine in other quantum algorithms, such as Shor's algorithm,[2]: 131  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⟩=|0⟩⊗n|ψ⟩,

where |ψ⟩ is the m-qubit state that evolves through U. We first apply the n-qubit Hadamard gate operation H⊗n on the first register, which produces the state:|Ψ1⟩=(H⊗n⊗Im)|Ψ0⟩=12n2(|0⟩+|1⟩)⊗n|ψ⟩=12n/2∑j=02n−1|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⟩≡⨂ℓ=0n−1|jℓ⟩, where j=∑ℓ=0n−1jℓ2ℓ 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,...,2n−1. This evolution can also be written concisely asUC=∑k=02n−1|k⟩⟨k|⊗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|Ψ2⟩≡UC|Ψ1⟩=(12n/2∑k=02n−1e2πiθk|k⟩)⊗|ψ⟩, where we used Uk|ψ⟩=e2πikθ|ψ⟩.

To show that UC can also be implemented efficiently, observe that we can write UC=∏ℓ=0n−1Cℓ(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⟩⊗(Ujℓk|ψ⟩).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∏ℓ=0n−1Cℓ(U2ℓ)(|j⟩⊗|ψ⟩)=|j⟩⊗(U∑ℓ=0n−1jℓ2ℓ|ψ⟩)=UC, with the last step directly following from the binary decomposition j=∑ℓ=0n−1jℓ2ℓ.

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⟩=𝒬ℱ𝒯2n−1|Ψ~2⟩.The QFT and its inverse are characterized by their action on basis states as𝒬ℱ𝒯N|k⟩=N−1/2∑j=0N−1e2πiNjk|j⟩,𝒬ℱ𝒯N−1|k⟩=N−1/2∑j=0N−1e−2πiNjk|j⟩. It follows that

|Ψ~3⟩=12n2∑k=02n−1e2πiθk(12n2∑x=02n−1e−2πikx2n|x⟩)=12n∑x=02n−1∑k=02n−1e−2πik2n(x−2nθ)|x⟩.

Decomposing the state in the computational basis as |Ψ~3⟩=∑x=02n−1cx|x⟩, the coefficients thus equalcx≡12n∑k=02n−1e−2πik2n(x−2nθ)=12n∑k=02n−1e−2πik2n(x−a)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=|12n∑k=02n−1e−2πik2n(y−a)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=02n−1e2πiδk|2=122n|1−e2πi2nδ1−e2πiδ|2. From this expression we can see that Pr⁡(a)⩾4π2≈0.405 when δ≠0. To see this, we observe that from the definition of δ we have the inequality |δ|⩽12n+1, and thus:[4]: 157 [5]: 348 Pr⁡(a)=122n|1−e2πi2nδ1−e2πiδ|2for δ≠0=122n|2sin⁡(π2nδ)2sin⁡(πδ)|2|1−e2ix|2=4|sin⁡(x)|2=122n|sin⁡(π2nδ)|2|sin⁡(πδ)|2⩾122n|sin⁡(π2nδ)|2|πδ|2|sin⁡(πδ)|⩽|πδ|⩾122n|2⋅2nδ|2|πδ|2|2⋅2nδ|⩽|sin⁡(π2nδ)| for |δ|⩽12n+1⩾4π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

  1. ↑ Kitaev, A. Yu (1995-11-20). "Quantum measurements and the Abelian Stabilizer Problem". arXiv:quant-ph/9511026.
  2. ↑ 2.0 2.1 Nielsen, Michael A. & Isaac L. Chuang (2001). Quantum computation and quantum information (Repr. ed.). Cambridge [u.a.]: Cambridge Univ. Press. ISBN 978-0521635035. 
  3. ↑ Mande, Nikhil S.; Ronald de Wolf (2023). "Tight Bounds for Quantum Phase Estimation and Related Problems". arXiv:2305.04908 [quant-ph].
  4. ↑ Benenti, Guiliano; Casati, Giulio; Strini, Giuliano (2004). Principles of quantum computation and information (Reprinted. ed.). New Jersey [u.a.]: World Scientific. ISBN 978-9812388582. 
  5. ↑ 5.0 5.1 Cleve, R.; Ekert, A.; Macchiavello, C.; Mosca, M. (8 January 1998). "Quantum algorithms revisited". Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences 454 (1969): 339–354. doi:10.1098/rspa.1998.0164. Bibcode: 1998RSPSA.454..339C.