Overview, Analysis and Simulation of Grover's Quantum Database Search Algorithm Nurop Congress Paper
Overview, Analysis and Simulation of Grover's Quantum Database Search Algorithm Nurop Congress Paper
Overview, Analysis and Simulation of Grover's Quantum Database Search Algorithm Nurop Congress Paper
ABSTRACT
1 INTRODUCTION
According to Moore’s law, the accelerated trend toward miniaturization in
microelectronics would soon reach a road block as we reach sizes of the order of atoms.
At this size, the quantum mechanical effects would become highly relevant in handling
information. On the other hand, Richard Feynman (Feynman, 1982) first observed in
1982 that quantum-mechanical systems could be utilized as information-processors with
capabilities much greater than that of corresponding classical systems. These
developments necessitated study into the theory of quantum computation.
Quantum Computers would rely on a superposition of classical bits, allowing them to
store an infinite amount of information. Further, it was shown that using quantum
parallelism, there was at least some problems that could be significantly sped up using
quantum computers. In 1996, Lov K. Grover (Grover, 1996) formulated his algorithm for
searching large unstructured databases. It was polynomially (quadratic speedup) faster
than any known classical algorithm and takes only O(√N) to complete the computation.
What is also significant about the development of Grover’s algorithm is that, Grover
devised a neat trick that could be used as a way to solve a complete host of hard problems
1
Student
2
Supervisor
1
NUROP – Overview, Analysis and Simulation of Grover's Quantum Database Search Algorithm
like quantum counting and graph coloring. Given a number of choices, Grover’s trick
increased the amplitude of the solution(s) at the expense of the non solutions. This trick is
called amplitude amplification and causes the solutions to be read apart.
4.1 SUPERPOSITION
While we talk about of the state when refereeing to a physical system in the
classical sense, such a notion of mutually exclusive states does not necessarily exist
in quantum mechanics. Briefly, a quantum state, (a qubit in this case) is actually a
superposition of classical states that lies in a complex Hilbert space and where a
qubit S, can be represented using the Dirac ‘bra’ and ‘ket’ notation by,
| S 〉 = α1 | 0〉 + α 2 |1〉 , where α1 and α 2 ∈ C (1)
To state S, we can apply either a measurement or a unitary operation (Wolf, 1999).
We must have sum of all probabilities, |αN|2 =1, to ensure that (Euclidean) norm is 1.
2
NUROP – Overview, Analysis and Simulation of Grover's Quantum Database Search Algorithm
map the state back to a Hilbert space. Because measuring |S1> should also give a
probability distribution, we still need to have the total probability = 1. This implies
that the operation U must preserve the norm of vectors, and hence must be a unitary
transformation.
Using these basic postulates of quantum mechanics, we can model qubits to store
information and to apply transformations on them to model quantum gates and circuits to
first evolve superpositions into a state where desirable results are more probable.
5 GROVER’S ALGORITHM
The basic idea behind the Grover’s algorithm is that you want to start off with a
superposition of all possible database elements. The encoding space for these elements
would only be (log2 N) qubits but more importantly a quantum register (or a group of
qubits) would be able to hold all possibilities at the same time. This would mean that any
operation on the memory would in fact act on all possible elements of the database, in
unit time. This consequence is indeed astonishing.
The core of the algorithm then revolves around changing the amplitudes vectors
(amplitudes dictate the probability of each state being observed upon measurement) of
the superposed states such that the amplitude vectors of the solutions get magnified at the
expense of the non solutions. Grover implemented this using a combination of two
transformations performed iteratively for an optimal number of iterations. These are the
selective phase inversion operation and the inversion about the mean operation.
3
NUROP – Overview, Analysis and Simulation of Grover's Quantum Database Search Algorithm
definition of the matrix D: Dij =2/N if i ≠ j and Dij = -1 +2/N is an inversion about
the average operator. (4) The matrix representations of all operators used are
unitary to preserve the normalization constraint. (5) The repeated applications of
step 2 of the algorithm increase the amplitude of the marked state, such that after O
(√N) iterations the probability of measuring the marked state is at least ½.
7 CONCLUSION
Our results showed that the there is an optimal number of iterations for the algorithm
π
i= ( N ) . After i iterations, the amplitude amplification process has magnified the
4
probability of observing the answer to a maximum. More iterations of the algorithm will
in fact decrease the amplitude again. The probabilities of the solutions show a periodic
behavior with a change in the number of iterations. On the other hand, introduction of
noise into the system was analyzed and it was found that smaller qubit systems are much
more tolerant to noise than higher order qubit systems. This seems logical as it would be
more difficult to maintain coherence in more qubits. Interestingly, we are also able to find
a relation between N, the no of elements in the database and λadmissible, the amount of
noise that would just prevent the Grover’s algorithm from failing. This was,
−2
Lambda, λadmissible = f (N) = 1.20595*N^(-1.98609), ≈ f ( N ) ∝ N (2)
8 REFERENCES
[1] Feynman, R. P. (1982). “Simulating Physics with Computers”. Int. J. Theor.
Phys. 21, pp. 467-488.
[2] Grover L. K.. (1996). “A fast quantum mechanical algorithm for database
search.” Proceedings for the 28th annual ACM symposium on the theory of
Computing. pg. 212-219.
[3] Hayward, Matthew (2002). “Quantum Computing and Grover’s Algorithm.”
January 23, 2002.
[4] Ronald de Wolf. (1999). “Quantum Computation and Shor’s Factoring
Algorithm.” Lectures at University of Amsterdam. Fall 1999.
[5] Singh, Kuldip (2003). Lectures on “Quantum Computing and Information.”
National University of Singapore. Spring 2003.