Quantum phase estimation is an application of the quantum Fourier transform, that was developed by Kitaev.
It is used for, e.g., finding eigenvalues of a Hamiltonian. It was developed after Shor’s algorithm, but it is useful to understand prior to Shor’s algorithm, since Shor’s algorithm, at it’s core, relies on it.
Consider a unitary U with an eigenstate |ui. For example, this unitary could result from Hamiltonian evolution,
U = eiHt/¯h, (187)
where the eigenstates of the Hamiltonian H will be eigenstates of U , and the eigenvalues of the Hamiltonian (energies) will be proportional to the acquired phases
U |ui = e2πiφ|ui . (188)
Remember: if we write down the energy spectrum of the Hamiltonian H |ui = E |ui we accrue a phase of 2πφ = Et¯h under free evolution. In general, the eigenvalues of U can always be written as eiφ, since we know that U†U = 1, such that the eigenvalues of U† will be e−iφ. The goal of quantum phase estimation is to find the phase φ, which can be approximated using k bits in binary notation 0.φk−1φk−2...φk, given a unitary matrix U and eigenvector |ui. The quantum phase estimation algorithm is given by the circuit,
|0ik−1 H . . . •
QFT−1
φk−1
... . .. ...
|0i2 H • . . . φ2
|0i1 H • . . . φ1
|0i0 H • . . . φ0
|ui / U U2 U4 . . . U2k−1
where the slashed wire next to state |ui indicates that it is possibly a multi-qubit register (and thus, U can be a multi-qubit gate).
We prepare our k input qubits in the superposition state H⊗k|0i. These k qubits act as control qubits implementing these controlled unitaries on our data register, which is in the subspace of U . Next, we will use the kth qubit to implement conditional U2k−1. Consider the case where the data register is initialized in |ui. The unitary U will result in accumulation of the phase e2πiφ. Thus, we can describe the effect solely on the state of the control qubit, which transforms
|0i + |1i
√2 → |0i + e2πiφ|1i
√2 . (189)
Similarly, the second qubit will transform as
|0i + |1i
√
2 → |0i + e2πiφ(2)|1i
√
2 , (190)
continuing to the kth qubit which picks up the phase
|0i + |1i
√2 → |0i + e2πiφ(2k−1)|1i
√2 . (191)
Clearly, the data register is completely unchanged since it is an eigenstate of U2j. Going back to our Hamiltonian evolution, we can see that this evolution is obtained by evolving for times t, 2t, 4t, ..., 2k−1t conditionally on the state of the relevant data register qubit.
At this point, we need to implement the inverse quantum Fourier transform. To see why this is useful, we can explicitly consider the output of these conditional unitaries:
|ψIi = 1
2k/2( |0i + ei2πφ2k−1|1i ) ⊗ ... ⊗ ( |0i + ei2πφ20|1i ) ⊗ |ui . (192) Now, we can rewrite this expression using binary fractions. Consider, for simplicity, the special case where φ = 0.φk−1...φ0exactly. In other words, φ < 1 can be expressed with exactly k digits. Looking at the first phase factor in (192), we see that
2π2k−1φ = 2π(φk−12k−2+ ... + φ0
2 ) = 2πφ0
2 + 2πm = 2π(0.φ0) + 2πm, m ∈ Z. (193) We see that only the φ0 term contributes, since the rest are integers and are multiplied by 2π, and can be neglected. We can continue this analysis for all terms in (192). For example, considering the next term, we will have contributions from the last two digits
2π2k−2φ = 2π(0.φ1φ0) + 2πm, m ∈ Z. (194)
Now we can rewrite (192) in a form that is extremely familiar from our definition of the quantum fourier transform:
|ψIi = 1
2k/2( |0i + ei2π(.φ0)|1i ) ⊗ ... ⊗ ( |0i + ei2π(.φk−1...φ0)|1i ), (195) where we have now dropped the irrelevant register |ui. We can see that this is exactly the quantum fourier transform of the register |φk−1...φ0i, in other words,
QFT−1|ψIi = |φk−1...φ0i . (196)
Now, all we have to do is measure the k qubits in the computational basis, and we get all digits of φ at once.
Remarks
1. Consider the case of a general phase φ which cannot be exactly represented in terms of k digits. Quantum phase estimation gives a very good approximation to φ, with very high probability. We can rewrite the intermediate state prior to the inverse QFT
|ψIi = 1 2k/2
2k−1
X
x=0
ei2πφx|xi , (197)
where we have now transformed to decimal integer value x ∈ [0, 2k−1]. Now we can perform the inverse quantum fourier transform and get
QFT−1|ψIi = 1 2k
X
y
X
x
ei2π(φx−xy2k)|yi . (198)
We can now consider the probability of getting a certain outcome y,
This is a geometric series which can be evaluated to
P (y) = 1
Now we can write y and φ in binary notation as y
where δ is the truncation error from expressing φ with only k bits. Now, looking at (200), we see that this is a sharply peaked function φi = yi and δ → 0. Formally, one can show that P (y) ∼ 1 requires that δ 21k. In other words, on average we will, with probability exponentially approaching 1, get the outcome that is exponentially close to the correct phase.
2. Consider the example of k = 3, shown in the following circuit.
|0i2 H • H • •
|0i1 H • R1 H •
|0i0 H • R0 R1 H
|ui / U U2 U4
Looking at the top qubit, we see that we prepare a superposition state, and apply the controlled phase rotation
U4|ui = ei2π(4)(φ22+φ14+φ08)= ei2πφ02 . (203) (Note that the overall operation looks a bit like an interferometer, where we prepare a superposition, apply a phase, and then return back to the original basis.) Now, if we measure this phase, we see that we will measure |0i if φ0= 0, and |1i if φ0= 1. So this circuit simply measures the least significant digit of φ.
This is a bit surprising - we would expect to begin by measuring the most significant digit. But this is the clever aspect of quantum phase estimation! Now, we can move onto the next qubit, which will now be sensitive to both the least significant digit, and the second least significant digit:
U2= ei2π2(φ22+φ14+φ08 )= ei2π(φ12+φ04). (204) However, the controlled rotation from the first qubit, as part of the inverse QFT, exactly compensates for the value of the least significant digit, allowing the second qubit to measure the second-least-significant digit precisely. Continuing along this line of reasoning, we can see how the QFT is used to measure each subsequent digit of the phase very efficiently in this unintuitive order.
3. This algorithm is very useful for estimating energies of eigenstates of a Hamiltonian.
4. However, in general, controlling the Hamiltonian evolution required for this algorithm is challenging to experimentally implement.
5. Because of the sequential nature of the measurement, often times we don’t need many qubits to estimate a phase with high precision. It turns out, with only k = 1, we can already measure many digits with high precision. The idea here is that we can reuse this qubit, since we are able to perform operations in a sequential manner. We first use the qubit to measure φ0 by using a long time evolution. Then we measure φ1by cutting the measurement time in half, and so on.