Welcome to the Quantum Information Software Kit (QISKit for short) tutorials!
In this repository, we've put together a collection of Jupyter notebooks aimed at teaching people who want to use the QISKit SDK for writing quantum computing programs and executing them on one of several backends (online quantum processors, online simulators, and local simulators). For the online quantum processors, QISKit uses the QISKit API to connect to the IBM Q Systems.
Please refer to this note for installation and how to submit new tutorials by using github functionalities.
You can also use a webhosted Jupyter notebook environment with IBM DSX as shown here.
We have organised the tutorials into three sections:
Since quantum computing is so new to most users, we want to find the best Hello Quantum World program and welcome submissions here.
2. Reference
We've collected a core reference set of notebooks in this section. These notebooks demonstrate how to use QISKit and explore quantum information science, acting as a reference guide for QISKit. We will be keeping them up to date with QISKit SDK updates. They are organized into the following topics:
In this first topic, we introduce you to the basic features of QISKit. More tutorials covering QISKit features can be found in here and developer documentation can be found here.
- Getting started - how to use QISKit.
- Working with different backends - running quantum program on different backends.
- Using different gates - list of gates in QISKit and their linear algebra.
- Visualisation of quantum states - illustrates the different tools we have for visualizing a quantum state.
The next set of notebooks shows how you can explore some simple concepts of quantum information science. More tutorials on other quantum information science concepts can be found here
- Superposition and entanglement - this tutorial shows you how to make simple quantum states on one and two qubits, and demonstrates concepts such as quantum superpositions and entanglement.
- Entanglement revisited - this tutorial delves deeper into quantum entanglement, looking at the CHSH inequality and Mermin's test.
- Quantum teleportation and superdense coding - this tutorial introduces two simple quantum communication protocols, based on the quantum entanglement.
- Relaxation and decoherence - a simple notebook showing how to measure coherence.
- Quantum state tomography - how to identify quantum states
- Quantum process tomography - how to perform quantum state reconstruction
- Random Benchmarking
- Variational Quantum Eigensolver - how to perform quantum chemistry
- Small error correcting codes
- Error mitigation
- Deutsch–Jozsa algorithm - a deterministic quantum algorithm that outperforms the corresponding classical algorithm.
- Bernstein-Vazirani algorithm - a quantum algorithm that outperforms classical probabilistic algorithms.
- Phase estimation - a quantum algorithm to extract eigenvalues of unknown unitary operator.
- Simon's algorithm
- Grover's algorithm - a python program of Grover search on 3 qubits.
- Shor's algorithm
- Battleships - a version of Battleships made to run on ibmqx3. The unique properties of single qubit operations are used to implement the game mechanics, with the destruction of a ship corresponding to rotation from 0 to 1.
- Which is the counterfeit coin? - can you solve the counterfeit coin riddle? You are given a quantum computer and quantum beam balance, and your task is to find a counterfeit coin hidden in a set of coins. Armed with the knowledge of the Bernstein-Vazirani algorithm, you can easily find the counterfeit coin using the beam balance only once.
3. Appendix
This is where the rest of the tutorials are. They are not guaranteed to work with the latest version of the QISKit SDK. They are organised into various topics:
- Advanced QISKit features
- More on quantum information science
- Further quantum algorithms and applications
- Everything else
If you would like to contribute to the tutorials, there are a number of ways to get involved:
- Issues: Issues can be reported with GitHub issue reporting for this repository. 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 from the
master
branch and create a pull request for your change. Note that new notebooks should be placed in the relevant part of the Appendix section. We will discuss in the Slack channel which of these should be in the Reference section.
Note that edits to this README
should be made to the Jupyter notebook file (README.ipynb)
and then the following command run to create the markdown file (README.md)
for GitHub:
jupyter nbconvert --to markdown README.ipynb
An alphabetical list of contributors can be found here. If you have contributed to these tutorials, please include your name there.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.