Quantum phase estimation algorithm

Quantum phase estimation algorithm
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.
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, and the quantum counting algorithm.
Formal description of the problem
Let be a unitary operator acting on an -qubit register. Unitarity implies that all the eigenvalues of have unit modulus, and can therefore be characterized by their phase. Thus if is an eigenvector of , then for some . Due to the periodicity of the complex exponential, we can always assume .
Our goal is to find a good approximation to with a small number of gates and with high probability. The quantum phase estimation algorithm achieves this under the assumptions of having oracular access to , and having available as a quantum state.
More precisely, the algorithm returns an approximation for , with high probability within additive error , using qubits (without counting the ones used to encode the eigenvector state) and controlled-U operations.
The algorithm
Setup
The input consists of two registers (namely, two parts): the upper qubits comprise the first register, and the lower qubits are the second register.
The initial state of the system is:
After applying n-bit Hadamard gate operation on the first register, the state becomes:
.
Let be a unitary operator with eigenvector such that . Thus,
.
Overall, the transformation implemented on the two registers by the controlled gates applying isThis can be seen by the decomposition of into its bitstring and binary representation , where . Clearly, becomesEach will only apply if the qubit is , implying that it is controlled by that bit. Therefore the overall transformation to is equivalent to the controlled gates from each -th qubit.
Therefore, the state will be transformed by the controlled gates like so:At this point, the second register with the eigenvector is not needed. It can be reused again in another run of phase estimation. The state without is
Apply inverse quantum Fourier transform
Applying the inverse quantum Fourier transform on
yields
We can approximate the value of by rounding to the nearest integer. This means that where is the nearest integer to and the difference satisfies .
Using this decomposition we can rewrite the state as where
Measurement
Performing a measurement in the computational basis on the first register yields the outcome with probabilityIt follows that if , that is, when can be written as , one always finds the outcome . On the other hand, if , the probability readsFrom this expression we can see that when . To see this, we observe that from the definition of we have the inequality , and thus:We conclude that the algorithm always provides the best -bit estimate of with high probability. By adding a number of extra qubits on the order of and truncating the extra qubits the probability can increase to .
Toy examples
Consider the simplest possible instance of the algorithm, where only qubit, on top of the qubits required to encode , is involved. Suppose the eigenvalue of reads . The first part of the algorithm generates the one-qubit state . Applying the inverse QFT amounts in this case to applying a Hadamard gate. The final outcome probabilities are thus where , or more explicitly,Suppose , meaning . Then and we recover deterministically the precise value of from the measurement outcomes. The same applies if .
If on the other hand , then , that is, and . In this case the result is not deterministic, but we still find the outcome as more likely, compatibly with the fact that is close to 1 than to 0.
More generally, if , then if and only if . This is consistent with the results above because in the cases , corresponding to , 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
Quantum algorithms