Quantum Computing Workshop

with Qiskit

These slides at qisk.it/blocks

Please note

IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice and at IBM’s sole discretion.


Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision.


The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract.


The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.


Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.

 

Think 2020 / DOC ID / © 2020 IBM Corporation

About presenter James Weaver

IBM Quantum Developer Advocate

Java Champion

Developer / Author / Speaker

james.weaver@ibm.com

Concepts we'll address today

  1. Introduction to quantum computing
  2. Quantum mechanics lab using polarized light filters
  3. Axioms of quantum mechanics (with cats)
  4. Some quantum party tricks with QiskitBlocks
  5. Using an IBM quantum computer

 

발표 요약

  •   왜 양자 컴퓨팅인가?
  •   Grumpy Cat과 함께하는 양자 역학
  •   QiskitBlocks와 함께 즐기기
  •   IBM 양자 컴퓨터 사용
  •   질문있으세요?

History repeating itself

Massive hardware, limited bits, software infancy

Quantum computers make direct use of quantum-mechanical phenomena, such as superposition, interference and entanglement, to perform operations on data.

IBM Announces Q System One at CES 2019

Feasible on classical computers

Feasible on quantum computers

Solutions to problems

Why use a quantum computer?

Some problems may be solved exponentially faster

“Nature isn't classical, dammit, and if you want to make a simulation of nature, you'd better make it quantum mechanical, and by golly it's a wonderful problem, because it doesn't look so easy.”

Simulating nature

complex chemical reactions, for example

Dr. Richard Feynman, 1981

53

53

“If you start factoring 10-digit numbers then it’s going to start getting scary”

Breaking RSA crypto

someday maybe, using Shor's algorithm, formulated in 1994

Dr. Peter Shor, 2013

“Programming a quantum computer is particularly interesting since there are multiple things happening in the same hardware simultaneously.  One needs to think like both a theoretical physicist and a computer scientist.”

Quickly searching unsorted data

using Grover's algorithm

Dr. Lov Grover, 2002

Some domains in which quantum computing seems to be a great fit

Machine Learning

Optimization

Chemistry

Finance

Qiskit optimization example: MaxCut

Separate nodes in a graph, maximizing weights between them

Qiskit finance example: Portfolio optimization

Suggest assets to buy based upon co-variances and appetite for risk

Concepts we'll address today

  1. Introduction to quantum computing
  2. Quantum mechanics lab using polarized light filters
  3. Axioms of quantum mechanics (with cats)
  4. Some quantum party tricks with QiskitBlocks
  5. Using an IBM quantum computer

 

Quantum mechanics experiment introduction (from 0:00 - 1:16)

Observing quantum mechanical phenomena with polarized light filters

100% of photons pass

0% of photons pass

25% of photons pass

Explanation of experiment results (from 14:25 - 16:55 )

Workshop handout on Quantum Polarization by Brian Ingmanson @Bingmanson

Probabilities of a photon passing through a filter

Concepts we'll address today

  1. Introduction to quantum computing
  2. Quantum mechanics lab using polarized light filters
  3. Axioms of quantum mechanics (with cats)
  4. Some quantum party tricks with QiskitBlocks
  5. Using an IBM quantum computer

 

발표 요약

  •   왜 양자 컴퓨팅인가?
  •   Grumpy Cat과 함께하는 양자 역학
  •   QiskitBlocks와 함께 즐기기
  •   IBM 양자 컴퓨터 사용
  •   질문있으세요?

Axioms of Quantum Mechanics

\vert\space\space\space\rangle

featuring grumpy cat (or is it grumpy ket)? 

My microscopic cat is often grumpy

\vert\space\space\space\rangle
\vert\space\space\space\rangle

sometimes he is actually happy

but I've never observed him in-between those states

Axiom 1: Superposition principle

my cat can be in any combination of grumpy and happy

\vert\space\space\space\rangle
= \begin{bmatrix} 1 \\ 0 \end{bmatrix}
\vert\space\space\space\rangle
= \begin{bmatrix} 0 \\ 1 \end{bmatrix}
= \begin{bmatrix} \sqrt{\frac{1}{3}} \\ \sqrt{\frac{2}{3}} \end{bmatrix}
\sqrt{\frac{1}{3}}
\vert\space\space\space\rangle
+
\sqrt{\frac{2}{3}}
\vert\space\space\space\rangle
\vert\space\space\space\rangle
\vert\space\space\space\rangle

Representing quantum states

geometrically, ket notation, and vectors

\vert\space\space\space\space\rangle
\vert\space\space\space\space\rangle
\vert\space\space\space\space\rangle
\vert\space\space\space\space\rangle
\vert\space\space\space\space\rangle
\vert\space\space\space\space\rangle
\vert\space\space\space\rangle
\vert\space\space\space\rangle

Axiom 2: Unitary evolution

gates modeled as matrices

X

\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}

NOT gate (Pauli/X, bit-flip)

\vert\space\space\space\rangle

Hadamard gate

great for putting cats in equal superpositions

H

\begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix}

Hadamard gate

\sqrt{\frac{1}{2}}
\vert\space\space\space\rangle
+
\sqrt{\frac{1}{2}}
\vert\space\space\space\rangle
\sqrt{\frac{1}{3}}
\vert\space\space\space\rangle
+
\sqrt{\frac{2}{3}}
\vert\space\space\space\rangle

Axiom 3: Measurement

probability is amplitude squared

When observed there is a:

\frac{1}{3}
\frac{2}{3}

probability of being grumpy

probability of being happy

Multiple cats

\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\rangle
\vert\space\space\space\rangle
=
\vert\space\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\space\rangle
= \begin{bmatrix} 1 \\ 0 \end{bmatrix}
\otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix}

Composite quantum states

= \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}

Multiple cats

\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\rangle
\vert\space\space\space\rangle
=
= \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}
= \begin{bmatrix} 1 \\ 0 \end{bmatrix}
\otimes \begin{bmatrix} 0 \\ 1 \end{bmatrix}

Composite quantum states

\vert\space\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\space\rangle
\sqrt{\frac{1}{2}}
+

Superpositions, evolution & measurement

putting the three axioms together

\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\rangle
\sqrt{\frac{1}{2}}
\sqrt{\frac{1}{2}}
+
\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\rangle
\sqrt{\frac{1}{6}}
+
\vert\space\space\space\space\space\space\space\rangle
\sqrt{\frac{1}{3}}
\vert\space\space\space\space\space\space\space\rangle

quantum gates

quantum gates

measure

\downarrow
\downarrow
\downarrow
\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\rangle

with 1/2 probability

with 1/6 probability

with 1/3 probability

\vert\space\space\space\rangle

Quantum entanglement

spooky actions at a distance

H

Hadamard gate

\vert\space\space\space\rangle

CNOT gate

\sqrt{\frac{1}{2}}
+
\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\rangle
\sqrt{\frac{1}{2}}
\sqrt{\frac{1}{2}}
+
\vert\space\space\space\space\space\space\space\rangle
\vert\space\space\space\space\space\space\space\rangle
\sqrt{\frac{1}{2}}

Mars - ESA

Alice Cat

Bob Cat

Venus - NASA

\vert\space\space\rangle
=
\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \end{bmatrix}
\begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \end{bmatrix}

Concepts we'll address today

  1. Introduction to quantum computing
  2. Quantum mechanics lab using polarized light filters
  3. Axioms of quantum mechanics (with cats)
  4. Some quantum party tricks with QiskitBlocks
  5. Using an IBM quantum computer

 

발표 요약

  •   왜 양자 컴퓨팅인가?
  •   Grumpy Cat과 함께하는 양자 역학
  •   QiskitBlocks와 함께 즐기기
  •   IBM 양자 컴퓨터 사용
  •   질문있으세요?

Qiskit workshops for middle and high school students

Installing and running the QiskitBlocks game

Instructions at qisk.it/blocks

Getting around a QiskitBlocks world

Right-click sign labeled [?] for first instructions

Control Action
Esc Pause & show menu
WASD Forward/left/back/right
Spacebar Jump/fly
Shift Descend/sneak
J Enable Fast mode
K Enable Fly mode
Mouse Turn/look
Left-click Dig/punch/remove
Right-click Place/use/open
Mouse wheel Select item in hotbar

Game controls (signs more specific)

Solve circuit puzzles in the escape rooms

To escape: Read texts from Prof Q, get blocks from chest, place them correctly on circuits

Gain an intuitive understanding of the Bloch sphere and gate rotations with this web-based application known as Grok the Bloch Sphere

Bloch sphere playground

Quantum party trick:

Make "loaded" eight-sided dice

Quantum party trick:

Search for needles in a haystack

Quantum logic: AND gate using Toffoli

Implementing digital logic

Logic in superposition

Quantum phase logic: AND gate with controlled-Z

Implementing digital logic, shifting phase

In superposition, marking those satisfied

Converting phase to magnitude for measurement

Amplitude amplification (from Grover's search algorithm)

Concepts we'll address today

  1. Introduction to quantum computing
  2. Quantum mechanics lab using polarized light filters
  3. Axioms of quantum mechanics (with cats)
  4. Some quantum party tricks with QiskitBlocks
  5. Using an IBM quantum computer

 

발표 요약

  •   왜 양자 컴퓨팅인가?
  •   Grumpy Cat과 함께하는 양자 역학
  •   QiskitBlocks와 함께 즐기기
  •   IBM 양자 컴퓨터 사용
  •   질문있으세요?

Qiskit open source quantum computing framework

Developing quantum apps

Using IBM Quantum in the cloud

Signing in to IBM Quantum

Run circuits in the IBM Quantum Composer

Quantum parallelism

what is it, really?

IBM Quantum Lab notebooks

Sample output:

{'00': 496, '11': 528}

Expresses circuit:

Minimal Qiskit example

Example algorithm: Grover search for boolean satisfiability

Throwing a party while avoiding the drama

What are amicable combinations of people to invite?

  • Alice ❤️ Bob are in a relationship
  • Carol ❤️ David are as well
  • Alice 😡 David aren't speaking
((A and B) or (C and D)) and 
not (A and D)

A

B

C

D

Qiskit Circuit Library demo

Qiskit open-source quantum computing textbook

발표 요약

  •   왜 양자 컴퓨팅인가?
  •   Grumpy Cat과 함께하는 양자 역학
  •   QiskitBlocks와 함께 즐기기
  •   IBM 양자 컴퓨터 사용
  •   질문있으세요?

Quantum Computing Workshop

with Qiskit

These slides at qisk.it/blocks

Boolean satisfiability problem (a OR b) AND c

Mixing amplitude and phase logic, amplifying results with ideas from Dr. Grover

Double-slit experiment

constructive and destructive interference

Text

Choreographing interference

to increase the chance of getting the right answer

Text

Amplitude amplification visualized

Quantum party trick:

Teleport a quantum state

Put your paddle into a quantum state that collapses when the ball is near

Developed at a Qiskit Camp Hackathon by Junye Huang, Anastasia Jeffery, Jarrod Reilly, and James Weaver

Example app: Quantum Pong (uses Qiskit and Pygame libraries)

Measuring quantum state

Hitchhiker's Guide to the Galaxy analogy

Deep Thought after 7.5 million years of calculation

Quantum Volume and Quantum Advantage

The Quantum Volume is the largest computational space a quantum computing device can explore.  This discrete quantity scales exponentially with the number of qubits.  A system that successfully searches a four-qubit space has Quantum Volume 2^4= 16.

Example Aqua algorithm: Variational Quantum Eigensolver (VQE)

Solves combinatorial optimization problems such as Traveling Salesman (TSP)

Now it's your turn to play! Try out the self-paced workshop including guided exercises and Qiskit tutorial notebooks at learnqiskit.org

Hands-on Qiskit workshop

Testing Bell's theorem:

No physical theory of local hidden variables can ever reproduce all of the predictions of quantum mechanics

Making Grumpy Cat happy with an X gate

After measurement

Before measurement

Making Grumpy Cat happy about half the time

After measurement

Before measurement

Entangling Alice Cat and Bob Cat

After measurement

Before measurement

Notices and disclaimers

© 2018 International Business Machines Corporation. No part of this document may be reproduced or transmitted in any form without written permission from IBM.

U.S. Government Users Restricted Rights — use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.

Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. This document is distributed “as is” without any warranty, either express or implied. In no event, shall IBM be liable for any damage arising from the use of this information, including but not limited to, loss of data, business interruption, loss of profit or loss of opportunity. IBM products and services are warranted per the terms and conditions of the agreements under which they are provided.

IBM products are manufactured from new parts or new and used parts. In some cases, a product may not be new and may have been previously installed. Regardless, our warranty terms apply.”

Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.

 

Think 2019 / DOC ID / February 14, 2019 / © 2019 IBM Corporation

Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.

References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business.

Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.

It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer follows any law.

 

Notices and disclaimers continued

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products about this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM expressly disclaims all warranties, expressed or implied, including but not limited to, the implied warranties of merchantability and fitness for a purpose.

The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right.

 

Think 2019 / DOC ID / February 14, 2019 / © 2019 IBM Corporation

IBM, the IBM logo, ibm.com and [names of other referenced IBM products and services used in the presentation] are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at: www.ibm.com/legal/copytrade.shtml.

Quantum Computing Workshop with Qiskit

By javafxpert

Quantum Computing Workshop with Qiskit

Learn some Quantum Party Tricks!

  • 8,109