Chapter 9: Grover's Search Algorithm

In this chapter, we will take a look at a fairly well-known quantum algorithm: Grover's search algorithm. We will learn how to code it by building our own circuits for the following variations: a 2-qubit version, a 3-qubit version, and a 4- and more qubit version, to see how the complexity of the circuit grows with the number of qubits.

We will run our algorithm both on a local simulator and on an IBM Quantum® backend and will see how the algorithm works pretty well on the relatively short circuit that is required for a 2-qubit Grover, but not as well on the much larger circuits that are required for more qubits. The number of gates in your circuit gets successively larger, and the various errors that we ...

Get Quantum Computing in Practice with Qiskit® and IBM Quantum Experience® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.