Quantum algorithm for eigenvalue estimation
The Quantum phase estimation algorithm (also referred to as quantum eigenvalue estimation algorithm ), is a quantum algorithm to estimate the phase (or eigenvalue) of an eigenvector of a unitary operator. More precisely, given a unitary matrix
U
{\displaystyle U}
and a quantum state
|
ψ
⟩
{\displaystyle |\psi \rangle }
such that
U
|
ψ
⟩
=
e
2
π
i
θ
|
ψ
⟩
{\displaystyle U|\psi \rangle =e^{2\pi i\theta }|\psi \rangle }
, the algorithm estimates the value of
θ
{\displaystyle \theta }
with high probability within additive error
ε
{\displaystyle \varepsilon }
, using
O
(
1
/
ε
)
{\displaystyle O(1/\varepsilon )}
controlled-U operations.
Phase estimation is frequently used as a subroutine in other quantum algorithms, such as Shor's algorithm [1] :131 and the quantum algorithm for linear systems of equations .
The problem [ edit ]
Let U be a unitary operator that operates on m qubits with an eigenvector
|
ψ
⟩
,
{\displaystyle |\psi \rangle ,}
such that
U
|
ψ
⟩
=
e
2
π
i
θ
|
ψ
⟩
,
0
≤
θ
<
1
{\displaystyle U|\psi \rangle =e^{2\pi i\theta }\left|\psi \right\rangle ,0\leq \theta <1}
.
We would like to find the eigenvalue
e
2
π
i
θ
{\displaystyle e^{2\pi i\theta }}
of
|
ψ
⟩
{\displaystyle |\psi \rangle }
, which in this case is equivalent to estimating the phase
θ
{\displaystyle \theta }
, to a finite level of precision. We can write the eigenvalue in the form
e
2
π
i
θ
{\displaystyle e^{2\pi i\theta }}
because U is a unitary operator over a complex vector space, so its eigenvalues must be complex numbers with absolute value 1.
The algorithm [ edit ]
Quantum phase estimation circuit
The input consists of two registers (namely, two parts): the upper
n
{\displaystyle n}
qubits comprise the first register , and the lower
m
{\displaystyle m}
qubits are the second register .
Create superposition [ edit ]
The initial state of the system is
|
0
⟩
⊗
n
|
ψ
⟩
{\displaystyle |0\rangle ^{\otimes n}|\psi \rangle }
. After applying n-bit Hadamard gate operation
H
⊗
n
{\displaystyle H^{\otimes n}}
on the first register, the state of the first register can be described as
1
2
n
2
(
|
0
⟩
+
|
1
⟩
)
⊗
n
{\displaystyle {\frac {1}{2^{\frac {n}{2}}}}(|0\rangle +|1\rangle )^{\otimes n}}
.
Apply controlled unitary operations [ edit ]
Let
U
{\displaystyle U}
be a unitary operator with eigenvector
|
ψ
⟩
{\displaystyle |\psi \rangle }
such that
U
|
ψ
⟩
=
e
2
π
i
θ
|
ψ
⟩
,
{\displaystyle U|\psi \rangle =e^{2\pi i\theta }|\psi \rangle ,}
thus
U
2
j
|
ψ
⟩
=
U
2
j
−
1
U
|
ψ
⟩
=
U
2
j
−
1
e
2
π
i
θ
|
ψ
⟩
=
⋯
=
e
2
π
i
2
j
θ
|
ψ
⟩
{\displaystyle U^{2^{j}}|\psi \rangle =U^{2^{j}-1}U|\psi \rangle =U^{2^{j}-1}e^{2\pi i\theta }|\psi \rangle =\cdots =e^{2\pi i2^{j}\theta }|\psi \rangle }
.
C
−
U
{\displaystyle C-U}
is a controlled-U gate which applies the unitary operator
U
{\displaystyle U}
on the second register only if its corresponding control bit (from the first register) is
|
1
⟩
{\displaystyle |1\rangle }
.
After applying all the
n
{\displaystyle n}
controlled operations
C
−
U
2
j
{\displaystyle C-U^{2^{j}}}
with
0
≤
j
≤
n
−
1
,
{\displaystyle 0\leq j\leq n-1,}
as seen in the figure, and using
|
0
⟩
⊗
|
ψ
⟩
+
|
1
⟩
⊗
e
2
π
i
θ
|
ψ
⟩
=
(
|
0
⟩
+
e
2
π
i
θ
|
1
⟩
)
⊗
|
ψ
⟩
{\displaystyle |0\rangle \otimes |\psi \rangle +|1\rangle \otimes e^{2\pi i\theta }|\psi \rangle =(|0\rangle +e^{2\pi i\theta }|1\rangle )\otimes |\psi \rangle }
, the state of the first register can be described as
1
2
n
2
(
|
0
⟩
+
e
2
π
i
2
n
−
1
θ
|
1
⟩
)
⏟
1
s
t
q
u
b
i
t
⊗
⋯
⊗
(
|
0
⟩
+
e
2
π
i
2
1
θ
|
1
⟩
)
⏟
n
−
1
t
h
q
u
b
i
t
⊗
(
|
0
⟩
+
e
2
π
i
2
0
θ
|
1
⟩
)
⏟
n
t
h
q
u
b
i
t
=
1
2
n
2
∑
k
=
0
2
n
−
1
e
2
π
i
θ
k
|
k
⟩
,
{\displaystyle {\frac {1}{2^{\frac {n}{2}}}}\underbrace {\left(|0\rangle +e^{2\pi i2^{n-1}\theta }|1\rangle \right)} _{1^{st}\ qubit}\otimes \cdots \otimes \underbrace {\left(|0\rangle +e^{2\pi i2^{1}\theta }|1\rangle \right)} _{n-1^{th}\ qubit}\otimes \underbrace {\left(|0\rangle +e^{2\pi i2^{0}\theta }|1\rangle \right)} _{n^{th}\ qubit}={\frac {1}{2^{\frac {n}{2}}}}\sum _{k=0}^{2^{n}-1}e^{2\pi i\theta k}|k\rangle ,}
where
|
k
⟩
{\displaystyle |k\rangle }
denotes the binary representation of
k
{\displaystyle k}
.
Applying inverse Quantum Fourier transform on
1
2
n
2
∑
k
=
0
2
n
−
1
e
2
π
i
θ
k
|
k
⟩
{\displaystyle {\frac {1}{2^{\frac {n}{2}}}}\sum _{k=0}^{2^{n}-1}e^{2\pi i\theta k}|k\rangle }
yields
1
2
n
∑
x
=
0
2
n
−
1
∑
k
=
0
2
n
−
1
e
2
π
i
θ
k
e
−
2
π
i
k
x
2
n
|
x
⟩
=
1
2
n
∑
x
=
0
2
n
−
1
∑
k
=
0
2
n
−
1
e
−
2
π
i
k
2
n
(
x
−
2
n
θ
)
|
x
⟩
.
{\displaystyle {\frac {1}{2^{n}}}\sum _{x=0}^{2^{n}-1}\sum _{k=0}^{2^{n}-1}e^{2\pi i\theta k}e^{\frac {-2\pi ikx}{2^{n}}}|x\rangle ={\frac {1}{2^{n}}}\sum _{x=0}^{2^{n}-1}\sum _{k=0}^{2^{n}-1}e^{-{\frac {2\pi ik}{2^{n}}}\left(x-2^{n}\theta \right)}|x\rangle .}
The state of both registers together is
1
2
n
∑
x
=
0
2
n
−
1
∑
k
=
0
2
n
−
1
e
−
2
π
i
k
2
n
(
x
−
2
n
θ
)
|
x
⟩
⊗
|
ψ
⟩
.
{\displaystyle {\frac {1}{2^{n}}}\sum _{x=0}^{2^{n}-1}\sum _{k=0}^{2^{n}-1}e^{-{\frac {2\pi ik}{2^{n}}}\left(x-2^{n}\theta \right)}|x\rangle \otimes |\psi \rangle .}
Phase approximation representation [ edit ]
We can approximate the value of
θ
∈
[
0
,
1
]
{\displaystyle \theta \in [0,1]}
by rounding
2
n
θ
{\displaystyle 2^{n}\theta }
to the nearest integer. This means that
2
n
θ
=
a
+
2
n
δ
,
{\displaystyle 2^{n}\theta =a+2^{n}\delta ,}
where
a
{\displaystyle a}
is the nearest integer to
2
n
θ
,
{\displaystyle 2^{n}\theta ,}
and the difference
2
n
δ
{\displaystyle 2^{n}\delta }
satisfies
0
⩽
|
2
n
δ
|
⩽
1
2
{\displaystyle 0\leqslant |2^{n}\delta |\leqslant {\tfrac {1}{2}}}
.
We can now write the state of the first and second register in the following way:
1
2
n
∑
x
=
0
2
n
−
1
∑
k
=
0
2
n
−
1
e
−
2
π
i
k
2
n
(
x
−
a
)
e
2
π
i
δ
k
|
x
⟩
⊗
|
ψ
⟩
.
{\displaystyle {\frac {1}{2^{n}}}\sum _{x=0}^{2^{n}-1}\sum _{k=0}^{2^{n}-1}e^{-{\frac {2\pi ik}{2^{n}}}\left(x-a\right)}e^{2\pi i\delta k}|x\rangle \otimes |\psi \rangle .}
Measurement [ edit ]
Performing a measurement in the computational basis on the first register yields the result
|
a
⟩
{\displaystyle |a\rangle }
with probability
Pr
(
a
)
=
|
⟨
a
|
1
2
n
∑
x
=
0
2
n
−
1
∑
k
=
0
2
n
−
1
e
−
2
π
i
k
2
n
(
x
−
a
)
e
2
π
i
δ
k
|
⏟
State of the first register
x
⟩
|
2
=
1
2
2
n
|
∑
k
=
0
2
n
−
1
e
2
π
i
δ
k
|
2
=
{
1
δ
=
0
1
2
2
n
|
1
−
e
2
π
i
2
n
δ
1
−
e
2
π
i
δ
|
2
δ
≠
0
{\displaystyle \Pr(a)=\left|\left\langle a\underbrace {\left|{\frac {1}{2^{n}}}\sum _{x=0}^{2^{n}-1}\sum _{k=0}^{2^{n}-1}e^{{\frac {-2\pi ik}{2^{n}}}(x-a)}e^{2\pi i\delta k}\right|} _{\text{State of the first register}}x\right\rangle \right|^{2}={\frac {1}{2^{2n}}}\left|\sum _{k=0}^{2^{n}-1}e^{2\pi i\delta k}\right|^{2}={\begin{cases}1&\delta =0\\&\\{\frac {1}{2^{2n}}}\left|{\frac {1-{e^{2\pi i2^{n}\delta }}}{1-{e^{2\pi i\delta }}}}\right|^{2}&\delta \neq 0\end{cases}}}
For
δ
=
0
{\displaystyle \delta =0}
the approximation is precise, thus
a
=
2
n
θ
{\displaystyle a=2^{n}\theta }
and
Pr
(
a
)
=
1.
{\displaystyle \Pr(a)=1.}
In this case, we always measure the accurate value of the phase.[2] :157 [3] :347 The state of the system after the measurement is
|
2
n
θ
⟩
⊗
|
ψ
⟩
{\displaystyle |2^{n}\theta \rangle \otimes |\psi \rangle }
.[1] :223
For
δ
≠
0
{\displaystyle \delta \neq 0}
since
|
δ
|
⩽
1
2
n
+
1
{\displaystyle |\delta |\leqslant {\tfrac {1}{2^{n+1}}}}
the algorithm yields the correct result with probability
Pr
(
a
)
⩾
4
π
2
≈
0.405
{\displaystyle \Pr(a)\geqslant {\frac {4}{\pi ^{2}}}\approx 0.405}
. We prove this as follows: [2] :157 [3] :348
Pr
(
a
)
=
1
2
2
n
|
1
−
e
2
π
i
2
n
δ
1
−
e
2
π
i
δ
|
2
for
δ
≠
0
=
1
2
2
n
|
2
sin
(
π
2
n
δ
)
2
sin
(
π
δ
)
|
2
|
1
−
e
2
i
x
|
2
=
4
|
sin
(
x
)
|
2
=
1
2
2
n
|
sin
(
π
2
n
δ
)
|
2
|
sin
(
π
δ
)
|
2
⩾
1
2
2
n
|
sin
(
π
2
n
δ
)
|
2
|
π
δ
|
2
|
sin
(
π
δ
)
|
⩽
|
π
δ
|
for
|
δ
|
⩽
1
2
n
+
1
⩾
1
2
2
n
|
2
⋅
2
n
δ
|
2
|
π
δ
|
2
|
2
⋅
2
n
δ
|
⩽
|
sin
(
π
2
n
δ
)
|
for
|
δ
|
⩽
1
2
n
+
1
=
4
π
2
{\displaystyle {\begin{aligned}\Pr(a)&={\frac {1}{2^{2n}}}\left|{\frac {1-{e^{2\pi i2^{n}\delta }}}{1-{e^{2\pi i\delta }}}}\right|^{2}&&{\text{for }}\delta \neq 0\\[6pt]&={\frac {1}{2^{2n}}}\left|{\frac {2\sin \left(\pi 2^{n}\delta \right)}{2\sin(\pi \delta )}}\right|^{2}&&\left|1-e^{2ix}\right|^{2}=4\left|\sin(x)\right|^{2}\\[6pt]&={\frac {1}{2^{2n}}}{\frac {\left|\sin \left(\pi 2^{n}\delta \right)\right|^{2}}{|\sin(\pi \delta )|^{2}}}\\[6pt]&\geqslant {\frac {1}{2^{2n}}}{\frac {\left|\sin \left(\pi 2^{n}\delta \right)\right|^{2}}{|\pi \delta |^{2}}}&&|\sin(\pi \delta )|\leqslant |\pi \delta |{\text{ for }}|\delta |\leqslant {\frac {1}{2^{n+1}}}\\[6pt]&\geqslant {\frac {1}{2^{2n}}}{\frac {|2\cdot 2^{n}\delta |^{2}}{|\pi \delta |^{2}}}&&|2\cdot 2^{n}\delta |\leqslant |\sin(\pi 2^{n}\delta )|{\text{ for }}|\delta |\leqslant {\frac {1}{2^{n+1}}}\\[6pt]&={\frac {4}{\pi ^{2}}}\end{aligned}}}
This result shows that we will measure the best n-bit estimate of
θ
{\displaystyle \theta }
with high probability. By increasing the number of qubits by
O
(
log
(
1
/
ϵ
)
)
{\displaystyle O(\log(1/\epsilon ))}
and ignoring those last qubits we can increase the probability to
1
−
ϵ
{\displaystyle 1-\epsilon }
.[3]
See also [ edit ]
References [ edit ]
^ a b Chuang, Michael A. Nielsen & Isaac L. (2001). Quantum computation and quantum information (Repr. ed.). Cambridge [u.a.]: Cambridge Univ. Press. ISBN 978-0521635035 .
^ a b Benenti, Guiliano; Casati, Giulio; Strini, Giuliano (2004). Principles of quantum computation and information (Reprinted. ed.). New Jersey [u.a.]: World Scientific. ISBN 978-9812388582 .
^ a b c Cleve, R.; Ekert, A.; Macchiavello, C.; Mosca, M. (8 January 1998). "Quantum algorithms revisited". Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences . 454 (1969). arXiv :quant-ph/9708016 . Bibcode :1998RSPSA.454..339C . doi :10.1098/rspa.1998.0164 .
Kitaev, A. Yu. (1995). "Quantum measurements and the Abelian Stabilizer Problem". arXiv :quant-ph/9511026 .