This section of the lesson explains the phase estimation problem.
We'll begin with a short discussion of the spectral theorem from linear algebra, and then move on to a statement of the phase estimation problem itself.
The spectral theorem is an important fact from linear algebra that states that matrices of a certain type, called normal matrices, can be expressed in a simple and useful way.
We'll only need this theorem for unitary matrices in this lesson, but down the road in this series we'll apply it to Hermitian matrices as well.
A square matrix M with complex number entries is said to be a normal matrix if it commutes with its conjugate transpose:
MM†=M†M.
Every unitary matrix U is normal because
UU†=I=U†U.
Hermitian matrices, which are matrices that equal their own conjugate transpose, are another important class of normal matrices.
If H is a Hermitian matrix, then
HH†=H2=H†H,
so H is normal.
Not every square matrix is normal.
For instance, this matrix isn't normal:
(0010)
(This is a simple but great example of a matrix that's often very helpful to consider.)
It isn't normal because
Spectral theorem: Let M be a normal N×N complex matrix.
There exists an orthonormal basis of N-dimensional complex vectors {∣ψ1⟩,…,∣ψN⟩} along with complex numbers λ1,…,λN such that
M=λ1∣ψ1⟩⟨ψ1∣+⋯+λN∣ψN⟩⟨ψN∣.
The expression of a matrix in the form
M=k=1∑Nλk∣ψk⟩⟨ψk∣(1)
is commonly called a spectral decomposition.
Notice that if M is a normal matrix expressed in the form (1), then the equation
M∣ψj⟩=λj∣ψj⟩
must be true for every j=1,…,N.
This is a consequence of the fact that {∣ψ1⟩,…,∣ψN⟩} is orthonormal:
That is, each number λj is an eigenvalue of M and ∣ψj⟩ is an eigenvector corresponding to that eigenvalue.
Example 1.
Let
I=(1001),
which is normal.
The theorem implies that I can be written in the form (1) for some choice of λ1,λ2,∣ψ1⟩, and ∣ψ2⟩.
There are multiple choices that work, including
λ1=1,λ2=1,∣ψ1⟩=∣0⟩,∣ψ2⟩=∣1⟩.
Notice that the theorem does not say that the complex numbers λ1,…,λN are
distinct — we can have the same complex number repeated, which is necessary for this example.
These choices work because
I=∣0⟩⟨0∣+∣1⟩⟨1∣.
Indeed, we could choose {∣ψ1⟩,∣ψ2⟩} to be any orthonormal basis and the
equation will be true. For instance,
I=∣+⟩⟨+∣+∣−⟩⟨−∣.
Example 2.
Consider a Hadamard operation.
H=21(111−1)
This is a unitary matrix, so it is normal. The spectral theorem implies that H can be written in the
form (1), and in particular we have
As the first example above reveals, there can be some freedom in how eigenvectors are selected.
There is, however, no freedom at all in how the eigenvalues are chosen, except for their ordering:
the same N complex numbers λ1,…,λN, which can include repetitions of the same complex number, will always occur in the equation (1) for a given choice of a matrix M.
Now let's focus in on unitary matrices.
Suppose we have a complex number λ and a non-zero vector ∣ψ⟩ that satisfy the equation
U∣ψ⟩=λ∣ψ⟩.(2)
That is, λ is an eigenvalue of U and ∣ψ⟩ is an eigenvector corresponding to this eigenvalue.
Unitary matrices preserve Euclidean norm, and so we conclude the following from (2).
∣ψ⟩=U∣ψ⟩=λ∣ψ⟩=∣λ∣∣ψ⟩
The condition that ∣ψ⟩ is non-zero implies that ∣ψ⟩=0, so we can cancel it from both sides to obtain
∣λ∣=1.
This reveals that eigenvalues of unitary matrices must always have absolute value equal to one, so they lie on the unit circle.
T={α∈C:∣α∣=1}
(The symbol T is a common name for the complex unit circle. The name S1 is also common.)
In the phase estimation problem, we're given a quantum state ∣ψ⟩ of n qubits, along with a unitary quantum circuit that acts on n qubits.
We're promised that ∣ψ⟩ is an eigenvector of the unitary matrix U that describes the action of the circuit, and our goal is to compute or approximate the eigenvalue λ to which ∣ψ⟩ corresponds.
More precisely, because λ lies on the complex unit circle, we can write
λ=e2πiθ
for a unique real number θ satisfying 0≤θ<1.
The goal of the problem is to compute or approximate this real number θ.
Phase estimation problem
Input: A unitary quantum circuit for an n-qubit operation U along with an n-qubit quantum state ∣ψ⟩
Promise: ∣ψ⟩ is an eigenvector of U
Output: an approximation to the number θ∈[0,1) satisfying U∣ψ⟩=e2πiθ∣ψ⟩
Here are a few remarks about this problem statement:
The phase estimation problem is different from other problems we've seen so far in the course in that the input includes a quantum state. Typically we focus on problems having classical inputs and outputs, but nothing prevents us from considering quantum state inputs like this. In terms of its practical relevance, the phase estimation problem is typically encountered as a subproblem inside of a larger computation, like we'll see in the context of integer factorization later in the lesson.
The statement of the phase estimation problem above isn't specific about what constitutes an approximation of θ, but we can formulate more precise problem statements depending on our needs and interests. In the context of integer factorization, we'll demand a very precise approximation to θ, but in other cases we might be satisfied with a very rough approximation. We'll discuss shortly how the precision we require affects the computational cost of a solution.
Notice that as we go from θ=0 toward θ=1 in the phase estimation problem, we're going all the way around the unit circle, starting from e2πi⋅0=1 and moving counter-clockwise toward e2πi⋅1=1. That is, when we reach θ=1 we're back where we started at θ=0. So, as we consider the accuracy of approximations, choices of θ near 1 should be considered as being near 0. For example, an approximation θ=0.999 should be considered as being within 1/1000 of θ=0.