# Interpreting the phase in QPE

Given a unitary operator $$U$$, the quantum phase estimation algorithm estimates the phase $$\theta$$ in $$U|\psi\rangle = e^{2\pi i\theta}|\psi\rangle$$. From this Qiskit tutorial, the phase is estimated through reading the highest bins in the histogram. Say if the highest bin corresponds to the 011 string, then a 'bound' of the phase is calculated as 3(dec)/2^3 = 0.375. Does that imply $$\theta\in[0,1]$$ for all phase estimations? What if the phase is out of the range? How we can translate the phase back to energies of a Hamiltonian?

Also, to make the algorithm work, is it necessary to initialize the register (for time evolution) to the eigenstate $$|\psi\rangle$$? I'm still confused about how the initial state might influence the phase being measured.

Thanks a lot for the help!!

• As to your second question, as long as the spectral decomposition of your initial state has a significant component that's exponentially close to the eigenstate of interest, you're exponentially likely to measure the corresponding eigenvalue (but you might have an exponentially small probability of measuring some garbage eigenvalue). Jan 30 at 19:10
• @Mark S Thanks for the comment! Is there any reference I can learn more about the dependency of QPE on initial state?
– IGY
Jan 31 at 0:37
• Well, I like this paper from Wocjan and Zhang. They define a natural probability distribution supported by the spectral decomposition of the corresponding initial state. That is, for a given $U$ entries of the distribution are eigenvalues $\theta_i$ of $U$, and the probability of sampling $\theta_i$ after the QPE applied to $\vert\psi\rangle$ is determined by the decomposition of $\vert\psi\rangle$ into the $U$-eigenvalues. (The paper proves that sampling from such a distribution is BQP-complete - implying it's hard to simulate classically). Jan 31 at 1:18

Given your definition $$U|\psi\rangle=e^{2\pi i\theta}|\psi\rangle$$, then the $$U$$ that you use can be any value of $$\theta$$. However, the answer you get out will (with high probability) be the best $$t$$-bit approximation to the fractional part of $$\theta$$, with no information about the integer part.
So, if you're trying to make some correspondence with, say, $$U=e^{iHt}$$, there is this big ambiguity in the identification of the eigenvalues of $$H$$. Usually, the strategy is to have some sort of bound on $$\|H\|$$, the largest eigenvalue of $$H$$. If $$\|H\|\leq\mu$$, you might select $$t=2\pi/\mu$$, to guarantee that all values $$\theta$$ are within the correct range. If you don't have such a bound, you can probably (I've never thought about it very carefully) run the algorithm a few times with different values of $$t$$, and figure out what integer component is needed to reconcile them.
As for the initial state, then yes, if you have an eigenvector of $$U$$, $$|\psi\rangle$$, and it's that eigenvalue that you want to estimate, you need to start your register in $$|\psi\rangle$$, or a state that has a large component of $$|\psi\rangle$$ in it. In general, if my input is of the form $$|\psi\rangle=\sum_i\alpha_i|\theta_i\rangle$$ where $$|\theta_i\rangle$$ are distinct eigenvectors with eigenvalues $$e^{i2\pi\theta_i}$$, then you will get (with high probability) the best $$t$$-bit approximation to the fractional part of $$\theta_i$$ with probability $$|\alpha_i|^2$$. This for example, is one of the key ways in which Shor's algorithm wins. You don't need to know the individual eigenvectors because it happens there's a simple to make input state with support on all the eigenvectors of possible interest.
• Thanks so much for the answer! Is it true that the initial state $|\psi\rangle$ should be prepared as the eigenvector of $U$, instead of the original Hamiltonian?
• @IGY, the eigenvectors are the same, but regarding your question "how can we translate the phase back to energies of a Hamiltonian?", I think you need to rescale the measured eigenvalues - that is, I think you need to rescale $\theta_i$ by the $2\pi/\mu$ factor mentioned above. Jan 31 at 15:32