Coder Social home page Coder Social logo

qiskit-tutorial's Introduction

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.

Using IBM DSx for your notebooks

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.

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, Ninad Sathaye, 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.

qiskit-tutorial's People

Contributors

antoniomezzacapo avatar attp avatar ebraminio avatar ewinston avatar ismaelfaro avatar jaygambetta avatar quantech0 avatar quantumjim avatar rraymondhp avatar sathayen avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.