Technical requirements
The quantum programs that we will discuss in this chapter can be found here: https://github.com/PacktPublishing/Quantum-Computing-in-Practice-with-Qiskit-and-IBM-Quantum-Experience/tree/master/Chapter09.
Much like we did in Chapter 6, Understanding the Qiskit® Gate Library, we will create one main Python file to contain the more complex functions that we will use: ch9_grover_functions.py
.
Among other functions, this program includes a set of core functions that are used to build the Grover algorithm:
create_oracle()
: This function builds a 2-5-qubit Oracle for the correct solution.create_amplifier()
: This function builds the phase amplification part of your Grover circuit.create_grover()
: This function puts the pieces together and returns a functioning Grover circuit that you can run on a simulator or on a real quantum computer.
We will discuss these further in the Building the Grover search algorithm recipe. Suffice to say...