Simulated Quantum Computer Algorithm for Database Searching

This is a simulation of Grover's algorithm for searching a database for a single target address (secretly selected to be the qubit at n=7—pretend you don't know this!). Successive applications of quantum-computer operations called inversion and diffusion increase the amplitude of the target qubit. Reading the quantum register causes collapse of its wavefunction. The probability of each possible answer is then equal to the square of its amplitude. For a database of dimension N, the probability of locating the target is maximized after approximately π/4 iterations. Compare this with the 50% probability for success in a classical search after N/2 steps. Paradoxically, the quantum algorithm becomes worse with additional iterations (actually, the probability oscillates).


L. Grover, "Quantum Mechanics Helps in Searching for a Needle in a Haystack," Physical Review Letters, 79(2), 1997 pp. 325–328.
S. M. Blinder, Introduction to Quantum Mechanics in Chemistry, Materials Science, and Biology, Burlington, MA: Elsevier Academic Press, 2004 pp. 283–284.
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+