What Is Quantum Computing All About?
Michael I. Shamos, Ph.D., J.D. School of Computer Science Carnegie Mellon University
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS 22 FEB 2019 THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Background
• A.B., Princeton University (physics, 1968) • M.A., Vassar College (physics, 1970) • Ph.D., Yale University (computer science, 1978) • J.D., Duquesne University (law, 1981) • Carnegie Mellon Computer Science faculty (1975 -) – Institute for Software Research – Language Technologies Institute • Director, eBusiness Technology Master’s Program (2002-2018) (roughly equivalent to ECOM-ICOM) • Director, MS in Artificial Intelligence and Innovation • Visiting Professor, University of Hong Kong (2001-)
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Limits on Computing
• By 2040, there will not be enough power generated on Earth to run all the computers (of present type) we will need. • What can we do about that? – Generate more power? – Compute less? – Compute BETTER!
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Computer Size and Speed
• Ultimately, computing is performed by physical systems • We always want smaller, faster and more capable computers • We are packaging more and more physical objects into less and less space • How far can this go?
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Classical vs. Quantum Physics
• Classical physics deals with objects on a macroscopic scale • Compute with large objects, like gears or transistors: classical physics works • Quantum mechanics deals with objects on an atomic/subatomic scale • Compute with tiny objects, like individual photons or electrons, quantum mechanics is needed to explain their behavior.
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Problem
“Nobody understands quantum mechanics”
Richard Feynman (1918-1988) Nobel Prize 1965
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Abacus • Has physical beads
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Adding Machine • Has gears
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS First Transistor (1947)
Bardeen, Brattain, Shockley Nobel Prize 1956
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Mainframe Computer • Has transistors, circuits, boards, cables
IBM Z14
8 TB RAM
850 MILLION ENCRYPTED TRANSACTIONS PER DAY
14 nanometer technology (Gordon) Moore’s Law • Transistor density doubles every two years Personal Computer • Apple A12X (for 2018 iPad Pro) has 10 BILLION transistors End of Moore’s Law? • The features on the Apple A12X are only 7 nanometers wide, allowing 80 million transistors per square mm 7 nm
Problem: A silicon atom is 0.2 nm wide.
If transistors are made much smaller, quantum effects will dominate.
Here are 7 nm worth (35) of silicon atoms:
...... Possible Future of Moore’s Law
atom-sized transistors molecular-sized transistors
2025 2040
SOURCE: CHRIS MONROE Quantum Mechanics
• Quantum mechanics seems weird, but so are magnetism and gravity – it’s just less familiar • We experience magnetism and gravity in everyday life – we don’t experience quantum mechanics, so it seems very odd
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Classical Physics
• Why do masses attract each other? • Newton did not answer that question • His “Law of Gravitation” allowed computation of the attractive force (proportional to the product of the masses, inverse to the square of the distance) • It did not explain WHY masses attract
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Einstein’s Gravity • Masses (and energy) cause spacetime to curve • Gravity is a consequence of this curvature • General relativity does not explain WHY spacetime is curved • It’s not supposed to. It allows calculation of paths of motion that correspond to experiment
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS The Double Slit Experiment Thomas Young (1801)
EXPECTED PATTERN The Double Slit Experiment Thomas Young (1801)
ACTUAL PATTERN Photoelectric Effect • If you shine light on a metal, electrons are ejected • Light energy is given to the electrons, which escape from atoms in the metal
• Expectation: more intense light, more energy, more electrons • Reality: ejection depends on the frequency of the light, not its intensity Einstein’s Explanation (1905)
• Light comes in discrete quantized packets (photons) • Whether an electron is ejected depends on the energy of the photons (frequency of light), not the number of photons (intensity of light)
Yellow light, no electrons Purple light – electrons! • So light behaves like both a wave and a particle
SOURCE: GERMAIN SALVATO-VALLVERDU Explanation by Bohr & Heisenberg (1925)
• Particles are spread throughout space, like waves • A particle can be observed anywhere, with a non- zero probability The Mach-Zehnder Interferometer Invented in 1892! Before photons No were known! Photons!
Photons Photons!
Beamsplitter Photons 2 Photons Photons Photons
1 The Mach-Zehnder Interferometer
25%
25% Barrier Quantization
• Many physical quantities come in discrete packages and do not vary continuously • Example: light energy (intensity) exists as individual photons • Electrical charge comes in discrete units. No elementary particle has smaller charge than an electron • Problem: discrete packages, like photons and electrons, don’t always behave like particles confined to a given space
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Quantization Example: A Coin • A coin can be in one of two “states”
Observing • HEADS (1) (measuring) the state Is easy.
Just look. • TAILS (0) But what is looking?
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Coins As Bits • A sequence of coins can represent a bit string:
T H T T H H T H
= 0 1 0 0 1 1 0 1 = 7710
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS What is the “State” of this Coin?
In quantum mechanics, the coin is in a “superposition” of states 1 and 0. It’s BOTH heads and tails until it falls over and is observed in one state or the other.
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS A Qubit (Quantum Bit) Is A Quantum-Mechanical “Coin”
• An electron can have spin up or spin down
• Let spin up represent 1, spin down 0 • The electron is in a superposition of both states until measured Another Qubit
• A photon can have one of two polarizations
• Let vertical polarization represent 1, horizontal polarization 0 • The photon is in a superposition of both states until measured Yet Another Qubit • An atom can be in two different states, depending on electron energy levels
• Let the excited state represent 1, the ground state 0 • The atom is in a superposition of both states until measured Three Actual Qubits • Three beryllium atoms held in place by an “atom trap’ using electrical and magnetic fields
• Holds 23 = 8 different values simultaneously • Three classical bits would hold 1 of 8 values Measuring a Single Atom ground state ↓ excited state ↑
laser laser
atom emits 108 photons/sec atom remains dark
0.2 1
Probability 0 0 0 10 20 30 0 10 20 30 # photons collected in 200µs # photons collected in 200µs
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Bits vs. Qubits • n classical bits can represent ONE out of 2 n values – 8 bits (1 byte): one of 256 values (0 to 255) – 32 bits (4 bytes): one of 4,294,967,296 values – 8192 bits (1 KB): one of 2 8192 ≈ 10 2466 values • n qubits can represent ALL 2 n values SIMULTANEOUSLY • Operating on n qubits can (in principle) perform 2 n calculations at the same time • 300 qubits can represent more values than there are atoms in the universe
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS “Moore’s Law” of Qubits • The size (in qubits) of quantum computers doubles every year • Large numbers of qubits are needed because of errors in quantum computation
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Entanglement
• Sometimes it is impossible to describe the states of two particles separately • We can only describe the state of the combined set of particles – they act as a single quantum system • The particles are “entangled” with each other
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Entangled Coins • Create two coins simultaneously that are of opposite spin but in linked superposition:
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Entangled Coins
• Separate the coins
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Entangled Coins
• Measure (observe) one coin (heads)
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Entangled Coins
• The other coin immediately falls tails, no matter how far apart they are
• Measure (observe) one coin (heads)
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Entangled Qubits
• To represent all 2N values in a single register that can be operated on as a unit, the qubits must all be entangled • Without entanglement, a quantum computer would be a “very expensive classical computer” • Each qubit would be operated on separately, instead of all together
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS
Gates • Analogous to logic gates in classical computers, such as an AND gate: x xy∧ y • Classical gates operate on bits and are implemented as circuits: x y xy∧ Quantum “Gates”
• Quantum “gates” operate on qubits, i.e., they operate on all the states of entangled qubits at the same time • Quantum “gates” are NOT CIRCUITS. They are physical processes (protocols) for operating on qubits, e.g., by shining lasers on them • Example: a Hadamard gate is equivalent to spinning a coin – it creates a mixture of two states with equal probability
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS “Circuit” Model of Quantum Computing
• Prepare n qubits as input • Manipulate the qubits by a sequence of quantum gates (algorithm U ) • Measure each qubit (each resulting in one bit)
SOURCE: GIUSEPPE VALLONE Programming Quantum Computers
• Qubit state cannot be copied (the “No-Cloning Theorem) • Measurement destroys superposition • The simple programming statement x = y cannot be implemented in a quantum computer • New programming languages and constructs are needed
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Quantum Circuit “Compilation”
SOURCE: IBM
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Shor’s Algorithm • Given a d-digit integer N, find its prime factors, e.g., 271084062812865557 = 573259391 x 472882027 • Classically, the best algorithm known takes 3 2 d operations • Shor’s quantum algorithm requires only d 3 operations 3 d 3 2 2 d > d 3 when d ≥ 2 d 3 Grover’s Algorithm • Given a program to compute f(x), find an x between 1 and n so that f(x) = 1 • Equivalent to: given an unordered table of n elements, see if a value x is in the table • Classically, this requires n lookups • Grover’s quantum algorithm only takes n lookups n n Quantum Computing Issues
• Qubits can – lose state very quickly because of outside “noise” – lose superposition and entanglement quickly (they get “observed” by the surrounding environment – IBM’s qubits last only 100 microseconds • Qubits require a cold and radiation-free environment • Quantum computation is errorful (since it is only probabilistic). Requires large numbers of error-correcting qubits
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS Quantum Processor Environment • Cooled to 0.015 Kelvin, 175x colder than interstellar space • 0º Kelvin = -273.15º Celsius Liquid nitrogen = -196º C, 77K Liquid helium = -270º C • Shielded to 50,000×less than Earth’s magnetic field in a high vacuum • Pressure 10 billion times lower than atmospheric • Low vibration floor
SOURCE: D-WAVE SYSTEMS Future of Quantum Computing • Unknown • Tremendous unrealized potential – AI, cryptography, supercomputing • Venture capital investments are still small (USD 2-10 million per company) • Some companies (e.g. D-Wave) have raised over USD 100M • Some large companies (Intel, IBM) are heavily invested • Progress is being made every week
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS
NIST Entangled Photons
ENTANGLED PHOTONS Q&A
THE UNIVERSITY OF HONG KONG FEBRUARY 27, 2019 © 2019 MICHAEL I. SHAMOS