# Amplitude amplification

Amplitude amplification is a technique in quantum computing which generalizes the idea behind the Grover's search algorithm, and gives rise to a family of quantum algorithms. It was discovered by Gilles Brassard and Peter Høyer in 1997, [1] and independently rediscovered by Lov Grover in 1998. [2]

In a quantum computer, amplitude amplification can be used to obtain a quadratic speedup over several classical algorithms.

## Algorithm

The derivation presented here roughly follows the one given in .[3] Assume we have an N-dimensional Hilbert space ${\displaystyle {\mathcal {H}}}$ representing the state space of our quantum system, spanned by the orthonormal computational basis states ${\displaystyle B:=\{|k\rangle \}_{k=0}^{N-1}}$. Furthermore assume we have a Hermitian projection operator ${\displaystyle P:{\mathcal {H}}\to {\mathcal {H}}}$. Alternatively, ${\displaystyle P}$ may be given in terms of a Boolean oracle function ${\displaystyle \chi :\mathbb {Z} \to \{0,1\}}$ and an orthonormal operational basis ${\displaystyle B_{\text{op}}:=\{|\omega _{k}\rangle \}_{k=0}^{N-1}}$, in which case

${\displaystyle P:=\sum _{\chi (k)=1}|\omega _{k}\rangle \langle \omega _{k}|}$.

${\displaystyle P}$ can be used to partition ${\displaystyle {\mathcal {H}}}$ into a direct sum of two mutually orthogonal subspaces, the good subspace ${\displaystyle {\mathcal {H}}_{1}}$ and the bad subspace ${\displaystyle {\mathcal {H}}_{0}}$:

{\displaystyle {\begin{aligned}{\mathcal {H}}_{1}&:={\text{Image}}\;P&=\operatorname {span} \{|\omega _{k}\rangle \in B_{\text{op}}\;|\;\chi (k)=1\},\\{\mathcal {H}}_{0}&:={\text{Ker}}\;P&=\operatorname {span} \{|\omega _{k}\rangle \in B_{\text{op}}\;|\;\chi (k)=0\}.\end{aligned}}}

Given a normalized state vector ${\displaystyle |\psi \rangle \in {\mathcal {H}}}$ which has nonzero overlap with both subspaces, we can uniquely decompose it as

${\displaystyle |\psi \rangle =\sin(\theta )|\psi _{1}\rangle +\cos(\theta )|\psi _{0}\rangle }$,

where ${\displaystyle \theta =\arcsin \left(\left|P|\psi \rangle \right|\right)\in [0,\pi /2]}$, and ${\displaystyle |\psi _{1}\rangle }$ and ${\displaystyle |\psi _{0}\rangle }$ are the normalized projections of ${\displaystyle |\psi \rangle }$ into the subspaces ${\displaystyle {\mathcal {H}}_{1}}$ and ${\displaystyle {\mathcal {H}}_{0}}$, respectively. This decomposition defines a two-dimensional subspace ${\displaystyle {\mathcal {H}}_{\psi }}$, spanned by the vectors ${\displaystyle |\psi _{0}\rangle }$ and ${\displaystyle |\psi _{1}\rangle }$. The probability of finding the system in a good state when measured is ${\displaystyle \sin ^{2}(\theta )}$.

Define a unitary operator ${\displaystyle Q(\psi ,P):=-S_{\psi }S_{P}\,\!}$, where

{\displaystyle {\begin{aligned}S_{\psi }&=I-2|\psi \rangle \langle \psi |\quad {\text{and}}\\S_{P}&=I-2P.\end{aligned}}}

${\displaystyle S_{P}}$ flips the phase of the states in the good subspace, whereas ${\displaystyle S_{\psi }}$ flips the phase of the initial state ${\displaystyle |\psi \rangle }$.

The action of this operator on ${\displaystyle {\mathcal {H}}_{\psi }}$ is given by

${\displaystyle Q|\psi _{0}\rangle =-S_{\psi }|\psi _{0}\rangle =(2\cos ^{2}(\theta )-1)|\psi _{0}\rangle +2\sin(\theta )\cos(\theta )|\psi _{1}\rangle }$ and
${\displaystyle Q|\psi _{1}\rangle =S_{\psi }|\psi _{1}\rangle =-2\sin(\theta )\cos(\theta )|\psi _{0}\rangle +(1-2\sin ^{2}(\theta ))|\psi _{1}\rangle }$.

Thus in the ${\displaystyle {\mathcal {H}}_{\psi }}$ subspace ${\displaystyle Q}$ corresponds to a rotation by the angle ${\displaystyle 2\theta \,\!}$:

${\displaystyle Q={\begin{pmatrix}\cos(2\theta )&\sin(2\theta )\\-\sin(2\theta )&\cos(2\theta )\end{pmatrix}}}$.

Applying ${\displaystyle Q}$ ${\displaystyle n}$ times on the state ${\displaystyle |\psi \rangle }$ gives

${\displaystyle Q^{n}|\psi \rangle =\cos((2n+1)\theta )|\psi _{0}\rangle +\sin((2n+1)\theta )|\psi _{1}\rangle }$,

rotating the state between the good and bad subspaces. After ${\displaystyle n}$ iterations the probability of finding the system in a good state is ${\displaystyle \sin ^{2}((2n+1)\theta )\,\!}$.
The probability is maximized if we choose

${\displaystyle n=\left\lfloor {\frac {\pi }{4\theta }}\right\rfloor }$.

Up until this point each iteration increases the amplitude of the good states, hence the name of the technique.

## Applications

Assume we have an unsorted database with N elements, and an oracle function ${\displaystyle \chi }$ which can recognize the good entries we are searching for, and ${\displaystyle B_{\text{op}}=B}$ for simplicity.

If there are ${\displaystyle G}$ such entries in the database in total, then we can find them by initializing the quantum computer into a uniform superposition

${\displaystyle |\psi \rangle ={\frac {1}{\sqrt {N}}}\sum _{k=0}^{N-1}|k\rangle }$

of all the database elements, and running the above algorithm. In this case the overlap of the initial state with the good subspace is equal to the square root of the frequency of the good entries in the database, ${\displaystyle \sin(\theta )=|P|\psi \rangle |={\sqrt {G/N}}}$. If ${\displaystyle \sin(\theta )\ll 1}$, we can approximate the number of required iterations as

${\displaystyle n=\left\lfloor {\frac {\pi }{4\theta }}\right\rfloor \approx \left\lfloor {\frac {\pi }{4\sin(\theta )}}\right\rfloor =\left\lfloor {\frac {\pi }{4}}{\sqrt {\frac {N}{G}}}\right\rfloor =O({\sqrt {N}}).}$

Measuring the state will now give one of the good entries with a high probability. Since each application of ${\displaystyle S_{P}}$ requires a single oracle query (assuming that the oracle is implemented as a quantum gate), we can find a good entry with just ${\displaystyle O({\sqrt {N}})}$ oracle queries, thus obtaining a quadratic speedup over the best possible classical algorithm.

If we set ${\displaystyle G}$ to one, the above scenario essentially reduces to the original Grover search.

## References

1. ^ Gilles Brassard; Peter Høyer (June 1997). "An exact quantum polynomial-time algorithm for Simon's problem". Proceedings of Fifth Israeli Symposium on Theory of Computing and Systems. IEEE Computer Society Press: 12–23. arXiv:quant-ph/9704027. Bibcode:1997quant.ph..4027B.
2. ^ Grover, Lov K. (May 1998). "Quantum Computers Can Search Rapidly by Using Almost Any Transformation". Phys. Rev. Lett. 80 (19): 4329–4332. arXiv:quant-ph/9712011. Bibcode:1998PhRvL..80.4329G. doi:10.1103/PhysRevLett.80.4329.
3. ^ Gilles Brassard; Peter Høyer; Michele Mosca; Alain Tapp (2000-05-15). "Quantum Amplitude Amplification and Estimation". arXiv:quant-ph/0005055 [quant-ph].