

Quantum Computing





Hacking into Nature's Computer
About Presenter James Weaver
Java Champion, JavaOne Rockstar, plays well with others, etc :-)


Author of several Java/JavaFX/RaspPi books

Developer Advocate & International Speaker for Pivotal
Mission: "Transform how the world builds software"







Mission: "Transform how the world builds software"


About Presenter Dr. Johan Vos
Developer / Physicist / Writer / Speaker - Gluon



About Gluon


Gluon CloudLink

Concepts we'll address today
Introduction to quantum computing
Axioms of quantum mechanics (with cats)
- Superposition principle
- Measurement
- Unitary evolution
Abstracting cats with qubits
Quantum computing gates and circuits
Java and quantum computing

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.

Some QC proofs of concept
Professor Winfried Hensinger spoke at Devoxx/UK
mini-universe in your garage
Don't try this at home, kids!



Why use a quantum computer?
Feasible on classical computers
Feasible on quantum computers
Solutions to problems
some problems may be solved exponentially faster

Transistors can't get much smaller
the quantum tunneling struggle is real


Breaking RSA crypto

someday maybe, using Shor's algorithm
“If you start factoring 10-digit numbers then it’s going to start getting scary”
Dr. Peter Shor, 2013
Related paper published 25 Jan 1997 by Dr. Shor:
Note: Shor's algorithm was formulated in 1994

Quickly searching unsorted data

using Grover's algorithm
"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."
Dr. Lov Grover, 2002
Related paper published 17 Jul 1997 by Dr. Grover:

Simulating nature

complex chemical reactions, for example
“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.”
Dr. Richard Feynman, 1981



Leveraging quantum computing for chemistry


Quantum communication and cryptography



Machine learning
estimating gradients using quantum computing

Concepts we'll address today
Introduction to quantum computing
Axioms of quantum mechanics (with cats)
- Superposition principle
- Measurement
- Unitary evolution
Abstracting cats with qubits
Quantum computing gates and circuits
Java and quantum computing

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








Concepts we'll address today
Introduction to quantum computing
Axioms of quantum mechanics (with cats)
- Superposition principle
- Measurement
- Unitary evolution
Abstracting cats with qubits
Quantum computing gates and circuits
Java and quantum computing

Hardware representation of qubits
Physical support | Type | ||
---|---|---|---|
Microscopic cats | Mood | Grumpy | Happy |
Photon | Polarization | Horizontal | Vertical |
Electrons | Spin | Up | Down |
Superconductor | Energy levels | Ground | Excited |

Classical bits vs. qubits
two discrete states vs. infinite superpositions


Qubit geometry


Representing qubits


ket notation, vectors, and geometrically

Superconducting qubits on a chip



Concepts we'll address today
Introduction to quantum computing
Axioms of quantum mechanics (with cats)
- Superposition principle
- Measurement
- Unitary evolution
Abstracting cats with qubits
Quantum computing gates and circuits
Java and quantum computing

Classic logic gates
a quick review for comparison to quantum gates


Some quantum gates

matrix operations model quantum mechanical behavior

Quantum gate hardware
sending pulses to superconducting qubits


Quantum software development
- Classic computing -> classic algorithms (classic gates)
-
Quantum computing -> quantum algorithms (quantum gates)
- Operations on a single qubit may affect other qubits
- Qubits can in different states at the same moment

Quantum software development
- In many cases, the best approach to a problem is a combination of classic algorithms and quantum algorithms
- Quantum algorithms leverage quantum gates, taking into account entanglement

Shor’s algorithm
- “IT WILL BREAK ALL ENCRYPTION”
-
It allows faster integer factorization (52 = 2 * 2 * 13)
- quantum: polynomial time
- classic: sub-exponential time
- The problem is decomposed in a number of steps, including finding the periodicity of a function f(x) = f(x + r)
- This problem can relatively fast be solved using a quantum algorithm

Shor's algorithm


Multiple cats




Composite quantum states









Exploring the quantum simulator
e.g. visualize states of multiple qubits: |00>



Exploring the quantum simulator
e.g. visualize states of multiple qubits: |01>



Simple quantum circuit
collapses to 8 random states with equal probability


Quantum entanglement

basic circuit

Quantum superpositions

and observability

Measuring qubits
collapses to a basis state, discarding superposition


Measuring quantum state
a Java analogy

from an IndicThreads slide deck

Concepts we'll address today
Introduction to quantum computing
Axioms of quantum mechanics (with cats)
- Superposition principle
- Measurement
- Unitary evolution
Abstracting cats with qubits
Quantum computing gates and circuits
Java and quantum computing

Quantum Computer simulators
-
With some matrix algebra, a quantum computer can be simulated by a classic computer
- This requires heaps of memory, increasing with increasing number of qubits
- Cloud-based quantum simulators can deal with more qubits
- Different languages:

Quantum Computing simulators in Java
- https://github.com/gluonhq/strange
- https://github.com/gluonhq/strangefx
- Circuit composer and renderer
- Local processing
- Cloud processing on Oracle Cloud, via Gluon CloudLink

StrangeFX
Java-based quantum simulator by Gluon / Johan Vos




Quantum Computing





Hacking into Nature's Computer
Quantum Computing Exposed: Hacking Nature's Computer
By javafxpert
Quantum Computing Exposed: Hacking Nature's Computer
Gentle introduction to quantum computing by James Weaver and Dr. Johan Vos
- 3,767