דף זה טרם תורגם. התוכן מוצג באנגלית.
Phase estimation procedure
Next, we'll discuss the phase-estimation procedure, which is a quantum algorithm for solving the phase estimation problem.
We'll begin with a low-precision warm-up, which explains some of the basic intuition behind the method. We'll then talk about the quantum Fourier transform, which is an important quantum operation used in the phase-estimation procedure, as well as its quantum circuit implementation. Once we have the quantum Fourier transform in hand, we'll describe the phase-estimation procedure in full generality and analyze its performance.
Warm-up: approximating phases with low precision
We'll begin with a couple of simple versions of the phase-estimation procedure that provide low-precision solutions to the phase-estimation problem. This is helpful for explaining the intuition behind the general procedure that we'll see a bit later in the lesson.
Using the phase kickback
A simple approach to the phase-estimation problem, which allows us to learn something about the value we seek, is based on the phase kick-back phenomenon. As we'll see, this is essentially a single-qubit version of the general phase-estimation procedure to be discussed later in the lesson.
As part of the input to the phase estimation problem, we have a unitary quantum circuit for the operation We can use the description of this circuit to create a circuit for a controlled- operation, which can be depicted as this figure suggests (with the operation viewed as a quantum gate, on the left and a controlled- operation on the right).
We can create a quantum circuit for a controlled- operation by first adding a control qubit to the circuit for and then replacing every gate in the circuit for with a controlled version of that gate — so our one new control qubit effectively controls every single gate in the circuit for This requires that we have a controlled version of every gate in our circuit, but we can always build circuits for these controlled operations in case they're not included in our gate set.
Now consider the following circuit, where the input state of all of the qubits except the top one is the quantum state eigenvector of
The measurement outcome probabilities for this circuit depend on the eigenvalue of corresponding to the eigenvector Let's analyze the circuit in detail to determine exactly how.
The initial state of the circuit is
and the first Hadamard gate transforms this state to
Next, the controlled- operation is performed, which results in the state
Using the assumption that is an eigenvector of having eigenvalue we can alternatively express this state as follows.
Here we observe the phase kickback phenomenon. It is slightly different this time than it was for Deutsch's algorithm and the Deutsch-Jozsa algorithm because we're not working with a query gate — but the idea is similar.
Finally, the second Hadamard gate is performed. After just a bit of simplification, we obtain this expression for this state.
The measurement therefore yields the outcomes and with these probabilities:
Here's a plot of the probabilities for the two possible outcomes, and as functions of
Naturally, the two probabilities always sum to Notice that when the measurement outcome is always and when the measurement outcome is always So, although the measurement result doesn't reveal exactly what is, it does provide us with some information about it — and if we were promised that either or we could learn from the circuit which one is correct without error.
Intuitively speaking, we can think of the circuit's measurement outcome as being a guess for to "one bit of accuracy." In other words, if we were to write in binary notation and round it off to one bit, we'd have a number like this:
The measurement outcome can be viewed as a guess for the bit When is neither nor there's a nonzero probability that the guess will be wrong — but the probability of making an error becomes smaller and smaller as we get closer to or
It's natural to ask what role the two Hadamard gates play in this procedure:
-
The first Hadamard gate sets the control qubit to a uniform superposition of and so that when the phase kickback occurs, it happens for the state and not the state, creating a relative phase difference that affects the measurement outcomes. If we didn't do this and the phase kickback produced a global phase, it would have no effect on the probabilities of obtaining different measurement outcomes.
-
The second Hadamard gate allows us to learn something about the number through the phenomenon of interference. Prior to the second Hadamard gate, the state of the top qubit is
and if we were to measure this state, we would obtain and each with probability telling us nothing about By performing the second Hadamard gate, however, we cause the number to affect the output probabilities.
Doubling the phase
The circuit above uses the phase kickback phenomenon to approximate to a single bit of accuracy. One bit of accuracy may be all we need in some situations — but for factoring we're going to need a lot more accuracy than that. A natural question is, how can we learn more about
One very simple thing we can do is to replace the controlled- operation in our circuit with two copies of this operation, like in this circuit:
Two copies of a controlled- operation is equivalent to a controlled- operation. If is an eigenvector of having eigenvalue then this state is also an eigenvector of this time having eigenvalue
So, if we run this version of the circuit, we're effectively performing the same computation as before, except that the number is replaced by Here's a plot illustrating the output probabilities as ranges from to
Doing this can indeed provide us with some additional information about If the binary representation of is
then doubling effectively shifts the binary point one position to the right:
And because we're equating with as we move around the unit circle, we see that the bit has no influence on our probabilities, and we're effectively obtaining a guess for the second bit after the binary point if we round to two bits. For instance, if we knew in advance that was either or then we could fully trust the measurement outcome to tell us which.
It's not immediately clear, though, how this estimation should be reconciled with what we learned from the original (non-doubled) phase kickback circuit to give us the most accurate information possible about So let's take a step back and consider how to proceed.
Two-qubit phase estimation
Rather than considering the two options described above separately, let's combine them into a single circuit like so.
The Hadamard gates after the controlled operations have been removed and there are no measurements here yet. We'll add more to the circuit as we consider our options for learning as much as we can about
If we run this circuit when is an eigenvector of the state of the bottom qubits will remain throughout the entire circuit, and phases will be "kicked" into the state of the top two qubits. Let's analyze the circuit carefully, by means of the following figure.
We can write the state like this:
When the first controlled- operation is performed, the eigenvalue gets kicked into the phase when (the top qubit) is equal to but not when it's So, we can express the resulting state like this:
The second and third controlled- gates do something similar, except for