1 of 19

Quantum Programming Bootcamp (goo.gl/A3pp1e)

Accompanying Jupyter Notebooks:

Parts I & II: Building and Executing Quantum Circuits with Terra, Aer, & IBM Q HTML (Download)1

Parts III & IV: Aqua, Optimization, Machine Learning, and Chemistry HTML (Download)1

For those without Jupyter installed: colab.research.google.com → ‘Github’ → <enter links above>

1To view the HTML slides, download them and open them in a browser with an internet connection.

Donny Greenberg, IBM

25-Oct-19

2 of 19

How to Follow This Training on Your Own

  • Read through the rest of this deck
  • When you reach the end, open the notebooks for Parts I & II and Parts III & IV and follow them in a runnable environment:
    • Download the notebooks from github (either by cloning the repo or clicking “raw” within each notebook file and then saving the files as .ipynb files)
    • Open them in Jupyter (we recommend downloading the Anaconda distribution, which includes Jupyter)
      • For slideshow viewing, follow the instructions at the top of the first notebook (I use RISE when I present them)
      • If you don’t have jupyter, you can open them via their github links in colab.research.google.com
    • Qiskit installation - Either:
      • pip install Qiskit
      • Clone the Qiskit repos now from github and work from the master branches

3 of 19

Opening Colab with Github

4 of 19

~4 Hours of Fun

  • Part 0: Intro to Qiskit and IBM Q Hardware
  • Part I & II, 120 mins: Qiskit Terra, Aer, and IBM Q
    • Overview and basics
    • Circuit construction and transpilation
    • Circuit execution continuum
  • Part III, 60 mins: Qiskit Aqua, Optimization, ML
    • Overview and basics
    • Maxcut examples
    • SVM examples
  • Part IV, 40 mins: Qiskit Chemistry
    • Overview and basics
    • NaH, LiH examples

(5 minute breaks roughly on the hour, ample breaks for questions)

Please interject with questions, comments, or corrections.

5 of 19

Approach

  • Focusing on:
    • The practical process and approach to modern quantum programming
    • How to get things done in Qiskit and the IBM Quantum Hardware
  • Not discussed:
    • Ignis
    • OpenPulse
    • Hardware details
    • Algorithm Theory

3 Notes on the Notebooks:

  • The deck-notebooks serves as visual aids during the presentation and for you to play around with our examples after the presentation. It is much better to stay with the presentation and experiment in detail later than to fall off track. Please avoid going down rabbitholes in the notebook during the presentation, because it will likely be difficult to get back on track.
  • Any link with the 📒 icon has supporting material in the qiskit-tutorials repo.
  • The notebooks look terrible in github. I highly recommend downloading them to follow along rather than following along in github.

6 of 19

Part 0: Qiskit and IBM Q Hardware

7 of 19

Qiskit is C, Quantum Devices are Mainframes

Qiskit:

IBM’s open source software suite for composing, compiling, and running quantum programs.

IBM Q devices:

Cloud-accessible quantum hardware, some public, some private

8 of 19

Qiskit software stack

Qiskit

Brings quantum computing out out of the laboratory and into the laptops of developers

  • Open Source (Apache 2.0)
  • Written in Python
  • Modular and extensible

qiskit.org

9 of 19

Qiskit software stack

Qiskit Terra

  • Import or build quantum circuits
  • Optimize and compile circuits for backends
  • Execute on hardware and simulators
  • OpenPulse

pip install qiskit

qiskit.org

10 of 19

Qiskit software stack

Qiskit

pip install qiskit-aqua

qiskit.org

Qiskit Aqua

  • Algorithms & applications
    • Machine Learning
    • Quantum Chemistry
    • Optimization
    • Finance
  • Interface with industry standard domain-specific software

11 of 19

Qiskit software stack

Qiskit

qiskit.org

Qiskit Aer

  • High performance simulator backend for Qiskit
  • Highly configurable noise model to emulate real device performance
  • Multiple simulators with varying execution systems

12 of 19

Qiskit software stack

Qiskit

Qiskit Ignis

  • Benchmarking and characterization of hardware
  • Quantum error correction and error mitigation

qiskit.org

13 of 19

IBM Quantum Hardware (1)

Two classes of devices:

  • Quantum Experience (QX) devices, public
  • Q Network Devices - Private

Execution behind “IBM Q Provider” API

  • Experiments/runs are submitted to hardware via API endpoint URLs
  • Users must generate an API key with IQX to submit jobs
  • Account management and submission handled by the IBM Q Provider repo

14 of 19

IBM Quantum Hardware (2)

IBM Q Experience (QX) Devices

  • 5, 14 qubit devices
  • Free for the public to access based on a credit system
  • Queues can get long, but wait times should be <1hr in general

15 of 19

IBM Quantum Hardware (3)

IBM Q Network Devices

  • Accessible only to network members (Hubs, partners, etc.)
  • Several 20 qubit machines
  • 53 qubit “Rochester” Device

Note:

  • Queue information is disabled
  • Execution times generally < a few minutes, depending on the device and time of day
  • API keys handled by administrator
  • Smaller devices are less noisy!

16 of 19

IQX

  • A new UI with:
    • Account management
    • Device visualizer and queue status
    • Hosted Jupyter notebooks
    • Graphic circuit composer
    • Results viewer and visualizer
  • For algorithms developers, most useful for keeping track of results and devices

17 of 19

User Code

Experimentation & manipulation

3P HW Providers

3P Simulator Providers

Terra

Aqua

Ignis

Circuit/Pulse Construction & Compilation

Fully-formed QCVV objects

IBM Q Provider

Aer

Simulator Backend Objects

Quantum

Hardware Backend Objects

Fully-formed Quantum Algorithm & Application objects

BasicAer

The Whole Shebang

18 of 19

Parts I & II: Building and Executing Quantum Circuits with Terra, Aer, & IBM Q

See instructions for following along in the notebook here

19 of 19

Parts III & IV: Aqua, Optimization, Machine Learning, and Chemistry

See instructions for following along in the notebook here