Tutorial Preparation
On Thursday and Friday, Google will be presenting tutorials on their Quantum Computing tools, Cirq and OpenFermion. We are vey fortunate that Google is debuting these tutorials with us.
Note: The tutorial container is current as of 11am September 13. If you pulled the container to your laptop before this time, then you should update it. See "Updating the container" below. If you are using the container on the cloud, then you don't need to do anything.
Prerequisites
The Google tutorials will not be an introduction to Quantum Computing, so some basic knowledge is required. If you art starting out in Quantum Computing, you can find a large number of resources available on the internet. The introductory tutorial from the recent Argonne Quantum Computing Workshop is quite good. See https://www.alcf.anl.gov/workshops/quantum-computing-workshop and click on "Hands-on Info". You can use the container (see below) to run the notebooks.
There are very good lecture notes available as well, in particular Scott Aaronson's and John Preskill's. An excellent overview of the current state of Quantum Computing is given in John Preskill's paper Quantum Computing in the NISQ era and beyond .
Jupyter notebooks are an extremely popular format for presenting tutorials. If you haven't used Jupyter notebooks before, see http://jupyter.org for information and instructions. Note that the contianer (see below) has the necessary software to run Jupyter notebooks.
Nearly all of the toolkits use Python. If you don't know Python, well, you should learn it! See https://www.python.org .
Our container with Quantum Computing Toolkits
We have constructed a Docker Container with all of the most popular Quantum Computing Toolkits, including Cirq and OpenFermion. We will use this container for the Google tutorials and you can use it to learn more about Quantum Computing prior to the workshop. You have two options for running the container...
1) Run the container on your laptop
This option works will if you have a good laptop and are comfortable installing software.
Install Docker. Download it from Docker-desktop and read the documentation.
Pull the container from DockerHub. In a terminal window, do
docker pull docker.io/holzman/docker-quantum:jupyterhub-small
Updating the container: To update the container to a new version (see the top of this page if that is necessary) just repeat the "docker pull" statement above.
You can run the container with,
docker run -it -p 127.0.0.1:8888:8888 --rm holzman/docker-quantum:jupyterhub-small
If you want to run the classical Jupyter notebook, open a browser and go to http://localhost:8888
If you want to run JupyterLab (a data analysis IDE with the Jupyter notebook interface) , open a browser and go to http://localhost:8888/lab
In either case, you will be taken to a page that wants you to enter a token. The token should be in the terminal window where you started docker. You should see a message like,
http://(ac363d8d7ed4 or 127.0.0.1):8888/?token=a7ebe3a16ae252c917e676a6cbc85bcfd80a42e081c95de8
The token in the case of above is a7ebe3a... (your token will be different).
Paste the token into the box on the web page and continue.
2) Run in the Cloud with JupyterHub
This option allows you to use our container on the cloud without installing anything on your laptop. Here are the instructions,
- Send your github username to burt@fnal.gov. (If you don't have an account with github, create an account: https://github.com/join)
- Shortly after, you will receive an e-mail inviting you to join the fermilab-quantum organization on github. Follow the link in the e-mail and accept the invitation.
- Browse to https://quantum.drbaz.com and click "Sign in with Github". You may be redirected to GitHub and asked to log in.
Feel free to direct any questions to @burt on the workshop slack (fermi-quantum.slack.com).
Contents of the container
If you are using JupyterLab, you will see four Python launchers. You only need to use two of them:
- Python [conda env:conda]
- Python [conda env:qsharp-samples]
Toolkits:
- qutip (homepage) Use the env:conda Python environment
- projectq (homepage) Use the env:conda Python environment
- qiskit (homepage) [IBM] Use the env:conda Python environment
- pyquil (homepage) [Rigetti] Use the env:conda Python environment
- Cirq (homepage) [Google] Use the env:conda Python environment
- OpenFermion (homepage) [Google] Use the env:conda Python environment
- Q# (homepage) [Microsoft] Use the env:qsharp-samples Python environment
Directories in the container
Note that from the terminal, these directories are within /srv/git/
Quantum/Samples - contains Microsoft Q# samples. You will likely need a terminal window to use them.
There are various OpenFermion directories with an example directory inside for samples.
Only the work/ subdirectory is persistent on the Cloud container - save your work there!
Notes
If you run the Argonne tutorial notebook (QCWorkshopANL18.ipynb), run it within the conda Python environment.
You can download notebooks from websites to your local machine and then upload them into the container.