Quantum phase estimation

\( \def\ket#1{{ \left| #1 \right> }} \) \( \def\bracket#1{{ \left( #1 \right) }} \)

As discussed in the QFT note, given a frequency  $\varphi \; \left( 0 \le \varphi < 1\right)$ that satisfies

\[ k \equiv 2^n \varphi \in \mathbb{N}, \label{condition} \]

the matrix representation of the following vector is the $k^{\text{th}}$-column of DFT matrix 

\[ 
\ket{\widetilde{\varphi}} = \frac{1}{2^{n/2}} \sum_{j=0}^{2^n-1} \underbrace{\exp \left(2 \pi i \; \varphi j \right)}_{\varphi_j} \ket{j},
\label{input}
\]

and thus inverse Fourier transform maps $\ket{\widetilde{\varphi}}$ to the computational basis vector $\ket{k}$ which could be deterministically measured. (Hereafter, Greek letters with tilde like, $\widetilde{\varphi}$, will denote column vector of DFT matrix while Latin letters stand for computational basis vectors.) Such property is judiciously employed to estimate phase of a unitary operator. Suppose we have a unitary operator $U$ and its eigenvector $\ket{u}$ such that

\[
U \ket{u} = e^{2 \pi i \varphi} \ket{u},
\]

phase $\varphi$ could be converted to $\ket{\widetilde{\varphi}}$ in Eq. (\ref{input}) via the following phase kickback circuit

Figure 1: Phase kickback circuit. The product state of register qubits are identical to one in Eq. (\ref{input})

However, the condition of deterministic measurement implied in Eq. (\ref{condition}) may not be satisfied for a finite number of register qubits $n$. In such circumstance, $\ket{k}$ is no longer a computational basis vector, and thus measurements at the end of inverse FT will become probabilistic.

 

Question: Given the eigenvector $\ket{u}$ is properly prepared, get the probability distribution of register qubits' measurements. Prove that mode of the distribution corresponds to the best estimation of phase $\varphi$.

In fact, inverse QFT of the quantum state $\ket{\widetilde{\varphi}}$ is identical to inverse DFT of amplitudes $\varphi$'s

\[
\text{QFT}^\dagger  \ket{\widetilde{\varphi}} = \sum^{2^n-1}_{k=0} y_k \ket{k} ,
\]

where

\[
y_k = \frac{1}{2^{n/2}} \sum_{j=0}^{2^n-1} \varphi \exp \left(- \frac{2 \pi i}{2^n} j k\right) = \frac{1}{2^{n/2}} \sum_{j=0}^{2^n-1}  \exp \left[2 \pi i \left(\varphi - \frac{k}{2^n} \right) j\right].
\label{amplitude}
\]

With little algebra, we might simplify Eq. (\ref{amplitude}) as

\[
y_k \left( \varphi, n\right) = \frac{1}{2^n} \frac{1- \exp \left[2\pi i \left(  2^n \varphi - k\right) \right]}{1- \exp \left[\frac{2\pi i}{2^n} \left( 2^n \varphi - k\right) \right]}.
\label{amplitudek}
\]

We have just obtained the state of register qubits going through the phase estimation process, where the amplitudes $y_k$ depends on estimated phase $\varphi$ and the number of qubits being used $n$. The probability distribution is straightforwardly derived by taking square of the norm of $y_k \left( \varphi, n\right)$.

Figure 2: Probability distributions for particular values of register qubits and phase.

Fig. 2 shows numerical probability distributions of measuring register qubits. In Fig. 2a, the phase $\varphi = 0.5$ can be written exactly by one bit so we get a Kronecker delta peak as expected. In Fig. 2b, the phase $\varphi = 0.49$ cannot be written exactly within 5 bits, we observe the previous peak spreading out. As we increase the number of register qubits, the spread will decrease and will ultimately achieve a Kronecker delta again for $\varphi$ being exactly written in $n$ bits. 

Figure 3: Probability amplitudes $y_k$ around the phase needed to be estimated $\varphi$.

Fig. 3 provides a closer look at probability amplitudes around $2^n \varphi$. Altogether with analyzing Eq. (\ref{amplitudek}), we could draw some remarks here. First of all, $k = \lfloor 2^n \varphi \rfloor $ and $k = \lceil 2^n \varphi \rceil $ are two best estimations. Probability of getting them is computed as 

\[
\text{Prob}_{2^{-n}} = \vert y_{ \lfloor 2^n \varphi \rfloor} \vert^2 + \vert y_{ \lceil 2^n \varphi \rceil} \vert^2 \ge \frac{8}{\pi^2}.
\]

The equality happens when $k -2^n \varphi = 1/2$ and $2^n \gg 1$, with a probability of $\frac{4}{\pi^2}\approx 0.41$ for each. Secondly, when $k -2^n \varphi \in \left( 0, \frac{1}{2} \right)$, $\lfloor 2^n \varphi \rfloor $ becomes the mode of the distribution. As well, in comparison to the ceiling, $\lfloor 2^n \varphi \rfloor $ gets closer to the true value of $\varphi$, and thus becomes the best estimation. We argue similarly for $k -2^n \varphi \in \left( \frac{1}{2},1 \right)$ where $\lceil 2^n \varphi \rceil $ is the closest estimation.

Question 2: Get the probability distribution in the case that QPE input vector is not properly prepared, i.e., a superposition of operator $U$'s eigenstates $\ket{\psi} = \sum_{u} c_u \ket{u}$.

The phase estimation process could be summarized as

\[
\ket{00\ldots0} \otimes \sum_{u}c_u\ket{u} \xrightarrow[]{\text{Phase kickback}} \sum_{u}c_u \ket{\widetilde{\varphi}_u} \otimes \ket{u} \xrightarrow[]{\text{IFT}} \sum_{u}c_u \ket{k_u} \otimes \ket{u},
\]

with $k_u = 2^n \widetilde{\varphi}_u$. The whole process of phase estimation entangles register qubits with eigenstates of $U$, and therefore by performing measurements on $\ket{k_u}$, the system state will collapse to one of the eigenstate $\ket{u}$ with corresponding probability $\vert c_u \vert^2$. To estimate phase $\varphi_u$ of an particular $\ket{u}$, it is a joint event of system collapsing to $\ket{u}$ and $\ket{k_u}$ being projected to computational basis within an error of $2^{-t}$. Therefore, the total probability of measuring $\ket{k}$ yields $\vert c_u \vert^2 \vert y_k \vert^2$ - the probability distribution is scaled by $\vert c_u \vert^2$.

Figure 4: Probability distributions for input state being an equal-weight superposition of $\varphi_1$ and $\varphi_2$ eigenstates.

Useful reference: Chapter 5,  Quantum computation and quantum information (Nielsen MA, Chuang I.)