/qutip-asqsqis-2022

QuTiP instructions and notes for ASQQIS 2022 in Kigali

Primary LanguageJupyter NotebookBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

ASQSQIS: Simulating open quantum systems with QuTiP

Presenters:

  • Alex Pitchford
  • Simon Cross

Institutions:

Tutorials:

Hello!

If you're attending the African School on Quantum Simulation and Quantum Information Science (ASQSQIS) in Kigali in September, and are looking for instructions for setting up QuTiP, you have found them.

To get set up you'll need to do the following:

  1. Obtain a copy of the contents of this GitHub repository.

  2. Install the required Python packages by following the instruction in one of the options below.

  3. Check that everything is working by running the smoke-test.ipynb Jupyter notebook.

  4. If you need to view QuTiP circuits, follow the instructions for installing TeX and ImageMagick at the end.

There are instructions for what to do if you get stuck further down.

Don't panic, have fun and see you in Kigali!

Download the repository

If you're familiar with GitHub, just clone this repository.

Otherwise, you can download the latest contents of the repository here.

Installing locally with pip

  1. If you don't have Python 3.9 or later installed, install it however you usually do. If you are completely new to Python, follow the Getting Started guide.

  2. If you don't have pip and virtualenv installed, install them by following the instructions. Once you've made it passed these first two steps, the hardest part is done.

  3. Create a virtual environment by running python3 -m venv qutip-summer-school-env.

  4. Activate the environment you have just created by running source qutip-summer-school-env/bin/activate (on Linux or Mac OS) or .\qutip-summer-school-env\Scripts\activate (on Windows).

  5. Install QuTiP and the other required libraries by running pip install -r requirements.txt.

  6. Open the Jupyter notebook by running jupyter notebook.

Installing locally with conda

  1. Install miniconda by following the instructions. This is the hardest step.

  2. Create a conda environment named qutip-summer-school-env by running conda env create --file environment.yml.

  3. Activate the environment you have just created by running conda activate qutip-summer-school-env.

  4. Open the Jupyter notebook by running jupyter notebook.

Running remotely with Binder

We'd highly recommend installing and running Python locally for the summer school, but if that really isn't possible, you are welcome to try running Jupyter and the necessary dependencies online using either Binder, by clicking the button below:

Binder

Or by using Google Colab.

If you are using Google Colab, you'll need to first install QuTiP by running the command !pip install 'qutip[full]' in a cell by itself.

Installing LaTeX and ImageMagick to view quantum circuit diagrams

Ubuntu

On Ubuntu, you need to install TeX Live and ImageMagick using:

sudo apt-get install texlive-full imagemagick

You might also need to edit the ImageMagick policy file to give ImageMagick permission to convert PDF files:

sudo nano /etc/ImageMagick-6/policy.xml

And change the lines at the end that refer to domain="coder" to:

<!--
  <policy domain="coder" rights="none" pattern="PS" />
  <policy domain="coder" rights="none" pattern="PS2" />
  <policy domain="coder" rights="none" pattern="PS3" />
  <policy domain="coder" rights="none" pattern="EPS" />
  <policy domain="coder" rights="none" pattern="PDF" />
  <policy domain="coder" rights="none" pattern="XPS" />
  -->
  <policy domain="coder" rights="read|write" pattern="PDF,PS" />

Windows

On Windows, you need to install MikTeX, Perl, and ImageMagick by downloading and running the three Windows installers below:

Testing your installation

Once you have the dependencies installed and Jupyter notebook open, you should open the notebook named smoke-test.ipynb and run it.

The notebook tests the basic plotting and QuTiP features we will need for the summer school and contains instructions for how to tell if it ran correctly.

If the test notebook ran correctly, you're good to go!

What to do if you're stuck

If you're having trouble setting up, you're welcome to create an issue in this repository here and we'll do our best to help.

If you're looking for help with QuTiP, you can message the QuTiP Google Group, and we or someone else will reply there.

You're also welcome to contact us via the summer school organizers.