Skip to content

levbishop/qiskit-tutorial

 
 

Repository files navigation

image

QISKit - Jupyter Notebooks

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.

Organization

The notebooks are organized into several categories

  1. Introduction to the tools
  2. Exploring quantum information concepts
  3. Verification tools for quantum information science
  4. Applications of short-depth quantum circuits on quantum computers
  5. Quantum games

For further information checkout out the Jupyter notebook index.ipynb at the top of this repo.

Installation and setup

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:

  1. install conda
  2. create conda environment for QISKit:

    conda create -y -n QISKitenv python=3 pip scipy
  3. activate the environment
    • MacOS, Linux: source activate QISKitenv
    • Windows: activate QISKitenv
  4. install qiskit:

    pip install qiskit
  5. setup API token

    1. Create an IBM Quantum Experience account if you haven't already done so
    2. Get an API token from the Quantum Experience website under "My Account" > "Personal Access Token"
    3. 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

3. Get the tutorials

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.

4. Explore the tutorials

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

Contributing

If you would like to contribute to the tutorials there are a number of ways to get involved.

Issue Reporting

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.

Notebooks

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.

Other QISKit projects

  • 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.

Contributors (alphabetically)

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, Kristan Temme, Chris Wood, James Wootton.

In future updates anyone who contributes to the tutorials can include their name here.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

A collection of Jupyter notebooks using QISKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%