Amplitude amplification

From HandWiki
Short description: Quantum computing technique

Amplitude amplification is a technique in quantum computing which generalizes the idea behind 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 by Brassard et al. in 2000.[3] Assume we have an [math]\displaystyle{ N }[/math]-dimensional Hilbert space [math]\displaystyle{ \mathcal{H} }[/math] representing the state space of a quantum system, spanned by the orthonormal computational basis states [math]\displaystyle{ B := \{| k \rangle \}_{k=0}^{N-1} }[/math]. Furthermore assume we have a Hermitian projection operator [math]\displaystyle{ P\colon \mathcal{H} \to \mathcal{H} }[/math]. Alternatively, [math]\displaystyle{ P }[/math] may be given in terms of a Boolean oracle function [math]\displaystyle{ \chi\colon\mathbb{Z} \to \{0,1\} }[/math] and an orthonormal operational basis [math]\displaystyle{ B_{\text{op}} := \{|\omega_k\rangle \}_{k=0}^{N-1} }[/math], in which case

[math]\displaystyle{ P := \sum_{\chi(k)=1} |\omega_k \rangle \langle \omega_k| }[/math].

[math]\displaystyle{ P }[/math] can be used to partition [math]\displaystyle{ \mathcal{H} }[/math] into a direct sum of two mutually orthogonal subspaces, the good subspace [math]\displaystyle{ \mathcal{H}_1 }[/math] and the bad subspace [math]\displaystyle{ \mathcal{H}_0 }[/math]:[math]\displaystyle{ \begin{align} \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{align} }[/math]In other words, we are defining a "good subspace" [math]\displaystyle{ \mathcal H_1 }[/math] via the projector [math]\displaystyle{ P }[/math]. The goal of the algorithm is then to evolve some initial state [math]\displaystyle{ |\psi\rangle \in \mathcal{H} }[/math] into a state belonging to [math]\displaystyle{ \mathcal H_1 }[/math].

Given a normalized state vector [math]\displaystyle{ |\psi\rangle \in \mathcal{H} }[/math] with nonzero overlap with both subspaces, we can uniquely decompose it as

[math]\displaystyle{ |\psi\rangle = \sin(\theta) |\psi_1\rangle +\cos(\theta) |\psi_0\rangle }[/math],

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

Define a unitary operator [math]\displaystyle{ Q(\psi, P) := -S_\psi S_P \,\! }[/math], where

[math]\displaystyle{ \begin{align} S_\psi &= I -2|\psi\rangle \langle\psi|\quad \text{and}\\ S_P &= I -2 P. \end{align} }[/math]

[math]\displaystyle{ S_P }[/math] flips the phase of the states in the good subspace, whereas [math]\displaystyle{ S_\psi }[/math] flips the phase of the initial state [math]\displaystyle{ |\psi\rangle }[/math].

The action of this operator on [math]\displaystyle{ \mathcal{H}_\psi }[/math] is given by

[math]\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 }[/math] and
[math]\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 }[/math].

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

[math]\displaystyle{ Q = \begin{pmatrix} \cos(2\theta) & -\sin(2\theta)\\ \sin(2\theta) & \cos(2\theta) \end{pmatrix} }[/math].

Applying [math]\displaystyle{ Q }[/math] [math]\displaystyle{ n }[/math] times on the state [math]\displaystyle{ |\psi\rangle }[/math] gives

[math]\displaystyle{ Q^n |\psi\rangle = \cos((2n+1) \theta) |\psi_0\rangle +\sin((2n+1)\theta) |\psi_1\rangle }[/math],

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

[math]\displaystyle{ n = \left\lfloor\frac{\pi}{4\theta}\right\rfloor }[/math].

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 [math]\displaystyle{ \chi }[/math] which can recognize the good entries we are searching for, and [math]\displaystyle{ B_{\text{op}} = B }[/math] for simplicity.

If there are [math]\displaystyle{ G }[/math] good entries in the database in total, then we can find them by initializing a quantum register [math]\displaystyle{ |\psi\rangle }[/math] with [math]\displaystyle{ n }[/math] qubits where [math]\displaystyle{ 2^n=N }[/math] into a uniform superposition of all the database elements [math]\displaystyle{ N }[/math] such that

[math]\displaystyle{ |\psi\rangle = \frac{1}{\sqrt{N}} \sum_{k=0}^{N-1} |k\rangle }[/math]

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, [math]\displaystyle{ \sin(\theta) = |P |\psi\rangle|= \sqrt{G/N} }[/math]. If [math]\displaystyle{ \sin(\theta) \ll 1 }[/math], we can approximate the number of required iterations as

[math]\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}). }[/math]

Measuring the state will now give one of the good entries with high probability. Since each application of [math]\displaystyle{ S_P }[/math] requires a single oracle query (assuming that the oracle is implemented as a quantum gate), we can find a good entry with just [math]\displaystyle{ O(\sqrt{N}) }[/math] oracle queries, thus obtaining a quadratic speedup over the best possible classical algorithm. (The classical method for searching the database would be to perform the query for every [math]\displaystyle{ e \in \{0,1,\dots,N-1\} }[/math] until a solution is found, thus costing [math]\displaystyle{ O(N) }[/math] queries.) Moreover, we can find all [math]\displaystyle{ G }[/math] solutions using [math]\displaystyle{ O(\sqrt{GN}) }[/math] queries.

If we set the size of the set [math]\displaystyle{ G }[/math] to one, the above scenario essentially reduces to the original Grover search.

Quantum counting

Suppose that the number of good entries is unknown. We aim to estimate [math]\displaystyle{ \tilde{G} }[/math] such that [math]\displaystyle{ (1-\delta)G \leq \tilde{G} \leq (1+\delta)G }[/math] for small [math]\displaystyle{ \delta\gt 0 }[/math]. We can solve for [math]\displaystyle{ \tilde{G} }[/math] by applying the quantum phase estimation algorithm on unitary operator [math]\displaystyle{ Q }[/math].

Since [math]\displaystyle{ e^{2i\theta} }[/math] and [math]\displaystyle{ e^{-2i\theta} }[/math] are the only two eigenvalues of [math]\displaystyle{ Q }[/math], we can let their corresponding eigenvectors be [math]\displaystyle{ |\psi_1\rangle }[/math] and [math]\displaystyle{ | \psi_2\rangle }[/math]. We can find the eigenvalue [math]\displaystyle{ e^{2 i \theta} }[/math] of [math]\displaystyle{ |\psi\rangle }[/math], which in this case is equivalent to estimating the phase [math]\displaystyle{ \theta }[/math]. This can be done by applying Fourier transforms and controlled unitary operations, as described in the quantum phase estimation algorithm. With the estimate [math]\displaystyle{ \tilde{\theta} }[/math], we can estimate [math]\displaystyle{ \sin{\theta} }[/math], which in turn estimates [math]\displaystyle{ G }[/math].

Suppose we want to estimate [math]\displaystyle{ \theta }[/math] with arbitrary starting state [math]\displaystyle{ |s\rangle }[/math], instead of the eigenvectors [math]\displaystyle{ |\psi_1\rangle }[/math] and [math]\displaystyle{ |\psi_2\rangle }[/math]. We can do this by decomposing [math]\displaystyle{ |s\rangle }[/math] into a linear combination of [math]\displaystyle{ |\psi_1\rangle }[/math] and [math]\displaystyle{ |\psi_2\rangle }[/math], and then applying the phase estimation algorithm.

References

  1. Gilles Brassard; Peter Høyer (June 1997). "An exact quantum polynomial-time algorithm for Simon's problem". Proceedings of the Fifth Israeli Symposium on Theory of Computing and Systems. IEEE Computer Society Press. pp. 12–23. doi:10.1109/ISTCS.1997.595153. ISBN 0-8186-8037-7. Bibcode1997quant.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. doi:10.1103/PhysRevLett.80.4329. Bibcode1998PhRvL..80.4329G. 
  3. Gilles Brassard; Peter Høyer; Michele Mosca; Alain Tapp (2000-05-15). "Quantum amplitude amplification and estimation". Quantum Computation and Information. Contemporary Mathematics. 305. pp. 53–74. doi:10.1090/conm/305/05215. ISBN 9780821821404.