Back to Browse

Installing IBM and D-Wave environments for Quantum Computing (29th March 2020)

1.5K views
Mar 30, 2020
1:05:20

Installation on Ubuntu 18.04 of both IBM QX and D-Wave environments for quantum computing (29th March 2020). See at the end of this description for how to use the virtual machine in practice. This video, the produced Virtual Box VM and updated code for adopted book can be found in: https://www.dropbox.com/sh/9l6xv7lka9uaf3b/AADZdbkzBU5xfdXdb8tbgvXla?dl=0 Main installation steps depicted in the video: (00:00) Installing IBM and D-Wave environments for Quantum Computing (29th March 2020) (02:55) download the initial virtual machine from (sorry, in Italian, user: test, password: test): https://www.dropbox.com/sh/rc85jrcutxfd845/AADJJXmwsX3y-0pNfXKC9MYya?dl=0 or install a fresh Ubuntu 18.04 LTS and upgrade packages if required (15:40) install with sudo set install these packages: git, python3-venv, jupyter-core, jupyter-notebook, ipython3, fim, vim, libsdl-dev (20:05) download and install anaconda %%%%%%%%%%%% FOR IBM: (00:18) the book “Mastering Quantum Computing with IBM QX” www.packt.com by Christine Corbett Moran is used (01:27) download repository for the book from: https://www.dropbox.com/sh/9l6xv7lka9uaf3b/AADZdbkzBU5xfdXdb8tbgvXla?dl=0 (the code from the GitHub of the book has to be adapted with the new Qiskit versions) (21:50) following instructions at p.14 and 15 create the directory with the repository and do: python3 -m venv MQC source MQC/bin/activate python -m pip install --upgrade pip setuptools wheel (not present in the book) pip install -r requirements.txt (qiskit installation is here) python Chapter01/test_installation.py pip install ipykernel ipython kernel install --user --name=bookkernel jupyter notebook %%%%%%%%%%%% FOR D-WAVE: (39:30) use git to download the preferred example (pipelines.py in this case) git clone …. (41:40) python3 -m venv DW source DW/bin/activate pip install wheel pip install -r requirements.txt (dwave-ocean-sdk installation is here) dwave setup, you also need your API token from your D-Wave account dwave solvers dwave ping (52:05) python pipelines.py (with three different solvers) How to use the VM: ++++++ IBM ++++++ (1:02:20) - launch a terminal and go in /home/test/Desktop/IBM_QX/Mastering-Quantum-Computing-with-IBM-QX - source MQC/bin/activate - python Chapter01/test_installation.py (just as a test) - jupyter notebook - select Chapter 01, then Hello Quantum World.ipynb - copy your token from your IBM QX account (you can also regenerate it); this will be the result: IBMQ.save_account(“this is your code”, overwrite=True) please add overwrite=True if you have network problems - run line by line with shift+enter or run the whole notebook - at the end, close browser and server (ctrl-c twice) and do deactivate for the Python virtual env ++++++ D-Wave ++++++ (1:03:35) - launch a terminal and go in /home/test/Desktop/DWave/pipelines - source ../DW/bin/activate - login to your D-Wave account (if required by using the Account security code sent from D-Wave by e-mail) and copy in the clipboard your API Token (you can also regenerate it) - launch dwave setup as follows: $ dwave setup Optionally install non-open-source packages and configure your environment. Do you want to select non-open-source packages to install (y/n)? [y]: n Creating the D-Wave configuration file. Found existing configuration file: /home/test/.config/dwave/dwave.conf Configuration file path [/home/test/.config/dwave/dwave.conf]: Profile (create new or choose from: prod): prod API endpoint URL [https://cloud.dwavesys.com/sapi/]: Authentication token [DEV-2dba4fa1e4ca0f38de35eaff6f06b5a7f97cdf9b]: DEV-57821f3550f81a2d1a4922172e8e2da078b88125 Default client class [qpu]: Default solver [DW_2000Q_5]: Configuration saved. - python pipelines.py (of course you can modify the solver as in the video (52:05), in order to choose among the three different proposed solvers, true hardware QC, QBSolv() and the ExactSolver(), which has not num_reads variable set); please note that in the distributed VM the solver is not the original, since it has been changed at the end of the video - at the end run deactivate

Download

0 formats

No download links available.

Installing IBM and D-Wave environments for Quantum Computing (29th March 2020) | NatokHD