Quantum computing related technologies and frameworks move fast … really fast. The last thing you want is ending in a situation where you cannot do what you need to do, not because there is a problem with the technology itself, but because there are some incompatibilities in the software frameworks you need to use. This is what I call plumbing issues and plumbing issues are usually quite painful and frustrating.
So let’s solve our first plumbing issue: download and use the jupyter notebooks part of the latest qiskit aqua tutorial.
The code on github: https://github.com/Qiskit
The usual suspects are :
If you have qiskit, aqua and aqua-chemistry installed using pip you should see something like:
Then opening any SVM related jupyter notebook in the aqua tutorials you just got from github will give you the following error:
Not really good … it comes from the fact the latest version of the tutorials needs … the latest versions of terra, aqua and aqua-chemistry. Makes sense but the next question is : how do I get the latest version of everything when according pip, I already have the latest ?
The example below needs to be adapted (slightly) if you are not using a Mac but the overall flow remains the same. I do have anaconda, brew, and the development command line tools (gives me git, svn etc …) installed.
Step 1: clone the git repositories
We do that for qiskit-terra, aqua, aqua-chemistry.
Let’s start with terra: when you are on the git page and click the “clone or download” icone, you will be presented with the URL you need and clicking on the copy icon (circled in red on my screenshot) will copy it to your clipboard.
The git command that you need to run in a terminal is quite basic (note I am doing this in a brand new directory):
Same process with the other git repositories
Step 2 : rebuild qiskit-terra and use pip to update the installed version with the one we just rebuilt locally
The first thing to do is to rename the file setup.py.in to setup.py , and replace the following line:
version=”${QISKIT_VERSION}”,
with :
version=”0.6.0″,
For the fans of the diff command:
Then it is time to install the latest version of the gnu compilers:
brew install gcc
Build the quantum simulator that will be used locally:
make sim
And finally upgrade your version of qiskit with the one you just got from github:
pip install -e . –upgrade
Did it work ? Let’s check it out:
Better … let’s go to step 3 !
Step 3: update qiskit-aqua and qiskit-aqua-chemistry
The process is easier for the remaining components, just run the following command in the appropriate directory:
pip install -e . –upgrade
Finally:
Step 4: check everything (you care about) works as expected
The aqua chemistry GUI:
The aqua tutorials: