Technical requirements
The quantum programs that we discuss in this chapter can be found here: https://github.com/PacktPublishing/Quantum-Computing-in-Practice-with-Qiskit-and-IBM-Quantum-Experience/tree/master/Chapter04.
You can run the recipes in this chapter in your local Qiskit® environment that you set up as part of Chapter 1, Preparing Your Environment, or you can run them in the notebook environment of the IBM Quantum Experience®.
If you run them in your local environment, I'd recommend using the built-in Spyder iPython editor from your Anaconda installation. That is the editor used to build and run the samples in this book.
In the code examples in this book, you will sometimes see the following line of code:
from IPython.core.display import display
Depending on your environment, iPython might not display graphical output directly in the output. If this is the case, you can use the display()
method to force the output, like this:
display(qc...