Think 2019 / DOC ID / February 14, 2019 / © 2019 IBM Corporation
Jamming with a Quantum Computer
Because NISQ* begins with Noisy
James Weaver
Quantum Developer Advocate
@JavaFXpert
*Noisy Intermediate Scale Quantum computers
slides.com/javafxpert/jamming-with-ibm-quantum
These web-based slides:
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 2019 / DOC ID / February 14, 2019 / © 2019 IBM Corporation
About Presenter James Weaver
IBM Quantum Developer Advocate
Author of several Java/JavaFX/RaspPi books
Java Champion, JavaOne Rockstar, plays well with others, etc :-)
james.weaver@ibm.com
JavaFXpert.com
CulturedEar.com
Concepts we'll address today
- Quantum computing overview
- Relationship between music and quantum computing
- Species counterpoint musical style
- Composing music probabilistically
- Creating melodies and harmonies with quantum notes
- Programming a quantum computer with open source Qiskit
- Musical composition and jamming demos along the way
History repeating itself
Massive hardware, limited bits, software infancy
Quantum computers make direct use of quantum-mechanical phenomena, such as superposition 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
“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
Near-term quantum computing domains
Conspicuously absent:
Music composition & improvisation
Machine Learning
Optimization
Chemistry
Finance
“Once a musical style has become part of the habit responses of composers, performers, and practiced listeners it may be regarded as a complex system of probabilities.”
Music and quantum mechanics are probabilistic
Leonard B. Meyer
Music, the Arts, and Ideas
Bongo music isn't classical, dammit, and if you want to make a simulation of music, you'd better make it quantum mechanical.
To inaccurately paraphrase Dr. Feynman:
The Big Idea:
Ask a quantum computer to compose music
We'll demo a simplified version of the species counterpoint style of music, as it is well defined and may be expressed using probabilities
From OpenMusicTheory.com Composing a second-species counterpoint
What is counterpoint?
The relationship between voices that are interdependent harmonically yet independent in rhythm and contour
From OpenMusicTheory.com Composing a second-species counterpoint
Tip: For a gentle introduction to counterpoint, check out the Species Counterpoint article by Nicholas H. Tollervey
Giovanni Palestrina
Italian Renaissance composer of sacred music
- Created Palestrina-style counterpoint
- Best known 16th-century representative of the Roman School of musical composition
- Influenced music of composers such as Johann Sebastian Bach
Johann Joseph Fux
Born in Austria, Johann codified Palestrina's techniques in the 1700s, calling it species-counterpoint, mainly for teaching students.
- Published in Gradus ad Parnassum *
- Describe valid pitch and rhythmic relationships between notes
- Influenced music of Hayden, Mozart and Beethoven
* Steps to Mt. Parnassos (which was the home of the muses)
Transition matrix
edition
Quantum Music Composer app
Example characteristics of counterpoint melodies:
- mostly stepwise motion, but with some leaps (mostly small leaps)
- tendency for melodies to move by descending step more than ascending
Expressing melodic characteristics
in a transition matrix
Example characteristics of counterpoint harmonies:
- All harmonic consonances are allowed.
- Imperfect consonances are preferable to perfect consonances
- Unisons should only be used for first and last intervals.
Expressing harmonic characteristics
in a transition matrix
Volkmar Putz and Karl Svozil, “Quantum music,” (2015), arXiv:1503.09045 [quant-ph]
In Quantum Music Composer, note pitches are represented by quantum states
Melodic and harmonic transitions are realized by quantum logic gates
What's Quantum Got to Do with It?
Representing quantum states
using degree of freedom rotations
Modifying transition matrices
wp
wp
Sample melody:
...
...
Quantum computer composing a melody
Quantum computer composing a song
Quantum Musical Composition from Melbourne
00
C
11
F
01
D
10
E
00
C
11
F
01
D
10
E
Composing in the Bell states
Representing Qubits with the Bloch Sphere
Axioms of Quantum Mechanics
featuring grumpy cat (or is it grumpy ket)?
My microscopic cat is often grumpy
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
Representing quantum states
geometrically, ket notation, and vectors
Axiom 2: Unitary evolution
gates modeled as matrices
X
NOT gate (Pauli/X, bit-flip)
Hadamard gate
great for putting cats in equal superpositions
H
Hadamard gate
Axiom 3: Measurement
probability is amplitude squared
When observed there is a:
probability of being grumpy
probability of being happy
Multiple cats
Composite quantum states
Multiple cats
Composite quantum states
Multiple cats
Composite quantum states
Superpositions, evolution & measurement
putting the three axioms together
quantum gates
quantum gates
measure
with 1/2 probability
with 1/6 probability
with 1/3 probability
Quantum entanglement
spooky actions at a distance
H
Hadamard gate
CNOT gate
Mars - ESA
Alice Cat
Bob Cat
Venus - NASA
IBM Q Experience (IQX, in Beta)
IBM Q Experience measurement results
IBM Q Experience Qiskit notebooks
Qiskit open source quantum computing framework
Developing quantum apps
Qiskit Terra foundational stack
Developing quantum apps
Sample output:
{'00': 496, '11': 528}
Expresses circuit:
Minimal Qiskit example
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)
Qiskit Aqua quantum algorithms
Developing quantum apps
Near-term quantum computing domains
Machine Learning
Optimization
Chemistry
Finance
Example Aqua algorithm: Grover search for boolean satisfiability
Throwing a party while avoiding the drama
What are amiable combinations of people to invite?
- Alice and Bob are in a relationship
- Carol and David are as well
- Alice and David aren't speaking
((A and B) or (C and D)) and not (A and D)
Example Aqua algorithm: Variational Quantum Eigensolver (VQE)
Solves combinatorial optimization problems such as Traveling Salesman (TSP)
Now it's your turn to play! Visit qiskit.org to continue learning to develop quantum computing applications. Also, try out the self-paced workshop including guided exercises at learnqiskit.org
Next steps on your quantum computing journey
We are hiring developers that are actively contributing to the Qiskit quantum computing community!
Please reach out to james.weaver@ibm.com
and Science
Close encounters of the minor third kind
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.
Think 2019 / DOC ID / February 14, 2019 / © 2019 IBM Corporation
Jamming with a Quantum Computer
Because NISQ* begins with Noisy
James Weaver
Quantum Developer Advocate
@JavaFXpert
*Noisy Intermediate Scale Quantum computers
Jamming with an IBM Quantum Computer
By javafxpert
Jamming with an IBM Quantum Computer
Because NISQ begins with Noisy
- 3,613