This repository contains Jupyter notebooks demonstrating quantum computing using QISKit, the open source quantum information software developer's toolkit. They provide an excellent way to learn, contribute, and collaborate on topics in quantum computing.
The notebooks are organized into several categories
- Introduction to the tools
- Exploring quantum information concepts
- Verification tools for quantum information science
- Applications of short-depth quantum circuits on quantum computers
- Quantum games
For further information checkout out the Jupyter notebook index.ipynb at the top of this repo.
1. Install the QISKit SDK
If the SDK has not already been installed, follow the installation instructions in the README file in the QISKit SDK repository.
Briefly, the steps are:
install conda
create conda environment for QISKit:
conda create -y -n QISKitenv python=3 pip scipy
activate the environment
- MacOS, Linux:
source activate QISKitenv
- Windows:
activate QISKitenv
- MacOS, Linux:
install qiskit:
pip install qiskit
setup API token
Create an IBM Quantum Experience Experience account if you haven't already done so
Get an API token from the Quantum Experience website under "My Account" > "Personal Access Token"
You will insert your API token in a file called Qconfig.py in the qiskit-tutorial directory. The contents of the file should look like,
APItoken = 'my token from the Quantum Experience' config = {'url': 'https://quantumexperience.ng.bluemix.net/api'} if 'APItoken' not in locals(): raise Exception('Please set up your access token. See Qconfig.py.')
2. Install Jupyter
After the previous step you should have a QISKitenv
conda environment and your API token
setup. In a terminal window make sure you are in the QISKitenv conda
environment,
- MacOS, Linux:
source activate QISKitenv
- Windows:
activate QISKitenv
Then install jupyter with,
conda install jupyter
Using git
to clone the SDK repository is the easiest way to
keep up with the latest changes or to contribute to the
tutorials.
git clone https://github.com/QISKit/qiskit-tutorial.git
Alternatively it is also possible to just download the source files in
a ZIP archive. For the ZIP file download, select the desired branch
from the Branch
drop-down button on the GitHub page. Usually this
would be the highest revision branch available or master
if you
want the latest development version. Select the green Clone or
download
button then Download ZIP
to get the source file
archive.
In a terminal window copy or link your Qconfig.py file from step (1) into this directory.
- Linux, macOS:
cp /path/to/Qconfig.py qiskit-tutorial
- Windows:
copy \path\to\Qconfig.py qiskit-tutorial
Go to the qiskit-tutorial
directory.
cd qiskit-tutorial
Start Jupyter with the index notebook.
jupyter notebook index.ipynb
If you would like to contribute to the tutorials there are a number of ways to get involved.
Issues can be reported with GitHub issue reporting for this
repo. Select New issue
and fill in a descriptive title and provide
as much detail as is needed for the issue to be reproduced.
Please check the wiki for frequently asked questions and notes about common issues.
If you would like to contribute a notebook please create a fork of the repository
and create a pull request for your
change. To help with the review of your change it would be good to
include a detailed description of the contribution and a unit test
(e.g. using python's unittest
framework). Notebooks being submitted to
the contrib
directory will allow for the notebook to be part of
the repo while they are being vetted by the community.
Please note that this repository contains two branches:
- the
stable
branch contains tutorials that are meant to be compatible with the latest stable release of QISKit. - the
master
branch contains tutorials that are meant to be compatible with the latest development version of QISKIT. Please note that this branch includes features that might still not be ready for production, and requires that you install the SDK using git and keep up to date with the daily updates.
If you experience problems, please revise that the versions of the packages installed on your system match the ones specified at the bottom of each tutorial.
IBM Data Science Experience (DSx) is a platform where you can interactively run your quantum programs, collaborate and share your work with others.
Among other things, it provides a ready-to-use environment to run Jupyter Python notebooks. For someone just getting started with QISkit, this is an excellent option. You can skip all the installation and environment creation steps on your computer, and instead use this web-hosted Jupyter notebook environment for running the Quantum programs. It also provides a platform where you can invite fellow researchers to collaborate on the notebooks you have developed or simply share your work within the community.
We have customized the example notebooks for you, so that you can directly run those using DSx. To get started, refer to this example: 1_introduction/running_on_IBM_DSX.ipynb
See this link that gives step-by-step instructions on setting up an example notebook on DSx.
- ibmqx backend information Information about the different IBM Q experience backends.
- ibmqx user guide The users guides for the IBM Q experience.
- OpenQasm Examples and tools for the OpenQASM intermediate representation.
- Python API API Client to use IBM Q experience in Python.
- Python SDK Software development kit for working with quantum programs in Python.
Jerry Chow, Antonio Córcoles, Abigail Cross, Andrew Cross, Ismael Faro, Andreas Fuhrer, Jay M. Gambetta, Takashi Imamichi, Antonio Mezzacapo, Ramis Movassagh, Anna Phan, Rudy Raymond, Ninad Sathaye, Kristan Temme, Chris Wood, James Wootton.
In future updates anyone who contributes to the tutorials can include their name here.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.