Quantum Computing in the NISQ era

Alba Cervera-Lierta University of Toronto UCL Quantum Technologies Winter School 2020 The MatterLab

https://www.matter.toronto.edu/

Alán Aspuru-Guzik Our Mission To accelerate the discovery of new chemicals and materials that are useful to society by means of new technologies such as , machine learning, and automation. The Quantum MatterLab

Postdocs

PhD students

+ visitors and undergrad https://www.matter.toronto.edu/ Outlook

Brief introduction to quantum computing

NISQ vs Fault-Tolerant QC

Variational Quantum Algorithms Slides will be available at A tool for NISQ: Tequila albacl.github.io/talk/ A NISQ example: Meta-VQE

Comments and Remarks Brief story of Quantum Computing

The “Quantum Bible”:

“Quantum Computation and Quantum Information”, Michael A. Nielsen & Isaac L. Chuang

Practical approach:

Qiskit and Pennylane quantum algorithm tutorials

More learning resources (books, blogs, courses, …): https://qosf.org/learn_quantum/ Brief history of quantum mechanics

Quantum 1.0 Quantum 2.0

1900-1930 1930-1950 1950-1980 1980-2000 2000-

Prenatal Infancy Childhood Adolescence Youth Quantum theory First applications: Transistor (1947), Q Turing Machine, First Quantum birth (1900) e.g. nuclear Solar Cells (1954), Quantum chips (2005), Postulates (1926) energy,… GPS (1955), Laser simulation (1980), Quantum (1960), MRI (1971), Shor algorithm teleportation with … (1994), CNOT satellites (2017), (1995), Bose- Quantum Einstein advantage (2019) condensate (1997)

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Quantum 2.0

Quantum Quantum Quantum Communication Computing Sensing Quantums Quantum Quantum Metrology Applications Cryptography Simulation

Quantum Information

Information Theory

framework Theoretical Theoretical Quantum Mechanics

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. What is a quantum computer

A device capable of processing data in a quantum mechanical form. A device that uses the properties of quantum mechanics to process data.

Instructions

SOFTWARE HARDWARE

Qubits Result

Classic Quantum

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Why do we need a quantum computer

Quantum Quantum Not Quantum

Powerful, but Not Quantum Quantum

MareNostrum supercomputer (BSC)

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Why do we need a quantum computer

I therefore believe it’s true that with a suitable class of quantum machines you could imitate any quantum system, including the physical world. –Richard P. Feynman, “Simulating physics with computers”, 1982.

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Why do we need a quantum computer

Less time… and less energy!

using a programmable superconducting “Quantum computational advantage using processor”, Nature 574, 505–510(2019) photons”, Science eabe8770 (2020)

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. How does it work

Bit

0 1 흍 |휓 = 훼|00 + 훽|01 + 훾|10 + 훿|11

|휓 = 훼|0 + 훽|1 entanglement

|휓 ≠ |휓 1⨂|휓 2

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. A new paradigm in computation

A single operation (logic gate) affects all posible qubit states.

|풙 |풙 CNOT |풚 |풙 ⊕ 풚

풙 풚 풙⨁풚 0 0 0 |휓0 = 훼|00 + 훽|01 + 훾|10 + 훿|11

0 1 1 퐶푁푂푇|휓0 = 훼|00 + 훽|01 + 훾|11 + 훿|10 1 0 1 1 1 0 4 “sums” with a single physical operation!

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. How does it work

Qubit: physical system that 1) is quantum and 2) have two well-defined states

Example: atomic orbitals Example: superconducting circuit (transmon qubit) Ground Excited state state

|0 |1

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Who is building a quantum computer

Software

… and many more! More information: https://quantumcomputingreport.com/ NISQ vs Fault-Tolerant

NISQ = Noisy Intermediate Scale Quantum Experimental challenges

• Scalability: how to design and construct milion-qubit chips

- Superconducting circuits Which - Ion traps technology? - Photons - NV- centers - …

are not perfect, they are “noisy”

“Fault-tolerant” quantum codes computation

Noise-resistant algoritms Noisy Intermediate Scale quantum (variational algorithms) computation (NISQ)

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. NISQ vs Fault-Tolerant

Who lives in the Fortress?

- Factorization algorithm Logical - Grover search algorithm Qubits - …

Who lives in the Plains?

- Variational Quantum Eigensolver - QAOA - … Noisy Qubits

~1000 noisy qubits/logical qubit Image: “Quantum computing: near- and far-term opportunities”, Ewan Munro, Medium @quantum_wa

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Noisy Intermediate Scale Quantum computation

Different qubits architectures

A few qubits (~100)

Noise Something useful: advantage

Classical Quantum McGyver carrying a optimizers quantum advantage experiment

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Variational Quantum Algorithms

A.K.A. Hybrid Quantum-Classical Algorithms Variational Quantum Eigensolver

Bond dissociation curve of the He–H+ molecule. Hamiltonian that can be written with Pauli strings

Outputs of the quantum computer

Quantum circuit that generates the ground state of that Hamiltonian

e.g. Hartree-Fock

Unitary operation, e.g. Cluster operator

A. Peruzzo, J. McClean, P. Shadbolt, M.-H.Yung, X.-Q. Zhou, P. J. Love, GOAL: find |흍 A. Aspuru-Guzik , J. L. O’Brien, Nature Comm. 5, 4213 (2014) that minimizes

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Variational Quantum Algorithm

Example: VQE, QAOA, … Obs. Operator 퐻

First approximation Quantum circuit Expected Output to the quantum that depend on value 푬ퟎ + 흐 휓 퐻 휓 state solution 휽 |휓 |휓0

New 휃 퐦퐢퐧 푬 휽 휽

Classical part Variational principle: E = 휓 퐻 휓 ≥ 퐸0

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Why Variational Quantum Algorithms?

Exponentially big Hamiltonians can be represented with a polynomial number of terms that can be obtained efficiently from a quantum computer.

퐻 = 2푛 × 2푛 matrix 퐻 = 푃표푙푦(푛) expectation values

To compute those expectation values, we need to first prepare the ground state |휓

1. Initial state that you know how to prepare and it’s as closer as posible to the solution (e.g. Hartree-Fock state) 2. Design a unitary operation (a.k.a. quantum circuit) that transforms that state into the ground state. a) Use a circuit ansatz that depend on some parameters b) Find the correct parameters by optimizing a Loss function, e.g. the expected value of the Hamiltonian (variational principle).

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. A tool for the NISQ era: Tequila

Instructions

SOFTWARE HARDWARE

Qubits Result

Classic Quantum The golden era of quantum languages…

Qibo

And many more…

https://github.com/aspuru-guzik-group/tequila The golden era of quantum languages… …and quantum software tools…

Mitiq

Qibo And many more…

And many more…

https://github.com/aspuru-guzik-group/tequila The golden era of quantum languages… …and quantum software tools… …plus classical tools for the NISQ era

Mitiq

Qibo And many more… And many more… And many more…

https://github.com/aspuru-guzik-group/tequila Which language should I use? What if I want to run the same code in Qibo different quantum computers? What if the language doesn’t contain the features that I need? Mitiq

https://github.com/aspuru-guzik-group/tequila Unification, standarization, acceleration

A quantum language to simplify and accelerate implementation of new ideas for quantum algorithms.

Code https://github.com/aspuru-guzik-group/tequila

https://github.com/aspuru-guzik-group/tequila Noisy Intermediate Scale Quantum computation

 What can we do with a few qubits

 How can we deal with the noise  What can we do with a few noisy qubits

 Hybrid quantum-classical algorithms  Variational algorithms

 Applications: chemistry, QML, etc require the knowledge of the classical techniques

to compare and test

Many quantum computers in development; need to benchmark, compare and test.

https://github.com/aspuru-guzik-group/tequila NISQ software players

Abstract Classical tools manipulation Wavefunctions Optimizers Quantum gate Gradient methods definition CompChem Noise models … …

Quantum backends

Real (experiments) Simulators

https://github.com/aspuru-guzik-group/tequila Tequila API Operator State Ansatz Quantum Circuit Molecule Hamiltonian H 푈 Θ Options - Wave-function Pauli - Draw circuit strings Expectation values - Define gates E Θ = 퐻 푈 Θ from Hermitian operators

Objective function Options f E Θ - Method - Method options - Noise Optimizer - Gradient - Sampling - Initial values - … Quantum backend (simulator or real)

https://github.com/aspuru-guzik-group/tequila NISQ algorithm example: the Meta-VQE Variational Quantum Eigensolver

GOAL: find |흍 Bond dissociation curve of the He–H+ molecule. that minimizes

Find the atomic separation that minimizes the energy

min 퐻(푅)

A. Peruzzo, J. McClean, P. Shadbolt, M.-H.Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik , J. L. O’Brien, Nature Comm. 5, 4213 (2014) Pros and cons VQA

To obtain this you need to scan from 0 to 300.

Each blue point is a VQE, that is, you have to prepare, run and optimize the quantum circuit.

Can we avoid to compute these uninteresting points?

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. The Meta-VQE

Parameterized Hamiltonian 퐻 휆

Training points: 휆 푖 for 푖 = 1, … , 푀

Loss function with all 퐻(휆 푖)

Output: 휱풐풑풕 and 휣풐풑풕

See also: K. Mitarai, T. Yan, K. Fujii, Phys. Rev. Applied 11, 044087 (2019)

ACL, J. S. Kottmann and A. Aspuru-Guzik, arXiv:2009.13545 [quant-ph] (2020) The Meta-VQE

Option 1: run the circuit with test 휆 and obtain the g.s. energy profile.

Option 2: use Φ표푝푡 and Θ표푝푡 as starting point of a standard VQE optimization (opt-meta-VQE)

ACL, J. S. Kottmann and A. Aspuru-Guzik, arXiv:2009.13545 [quant-ph] (2020) 1D XXZ spin chain 푛 푥 푥 푦 푦 푧 푧 푧 퐻 = 휎푖 휎푖+1 + 휎푖 휎푖+1 + ∆휎푖 휎푖+1 + 휆휎푖 Legend 14 qubits simulation, 휆 = 0.75 푖=1 Alternating Meta-VQE: 푅 (푤 휟 + 휙 )푅 (푤 휟 + 휙 )⨂ Linear encoding: 푧 1 1 푦 2 2 CNOT encoding & processing layers. Alternating Loss function with test points. Processing layer: 푅푧(휃1)푅푦(휃2)⨂ CNOT Hamiltonian GA-VQE: Results 2 encoding + 2 processing layers parameter standard VQE (only procesing layers) with test points loss function. Opt-meta-VQE: VQE optimization with opt. meta-VQE parameters as starting point. Single minimization per parameter.

Entangled g.s. Opt-GA-VQE: standard VQE optimization with opt. GA-VQE parameters Product state g.s. as starting point. Single (easy to find) minimization per parameter.

ACL, J. S. Kottmann and A. Aspuru-Guzik, arXiv:2009.13545 [quant-ph] (2020) 퐻4 molecule

퐻4 molecule in 8 spin-orbitals (STO-3G basis set) Legend

Ansatz: k-UpCCGSD (k=2 for these results) Meta-VQE: Hamiltonian Parameter (intermolecular distance) Linear encoding. Loss function with Linear encoding: 휃 = 훼 + 푑훽 test points. 훽(훾−푑) Non-linear encoding: 휃 = 훼푒 + 훿 (floating Gaussians) Opt-meta-VQE: VQE optimization with opt. meta- VQE parameters as starting point. Single minimization per parameter. nl-meta-VQE: non-linear encoding meta-VQE. Opt-nl-meta-VQE: VQE optimization with opt. nl-meta- VQE parameters as starting point. VQE0: standard VQE optimized model starting from the Hartree-Fock configuration

ACL, J. S. Kottmann and A. Aspuru-Guzik, arXiv:2009.13545 [quant-ph] (2020) Single transmon Kyaw, Menke, Sim, Sawaya, Oliver, Guerreschi, Aspuru-Guzik, arXiV:2006.03070 (2020) Single transmon simulation using QCAD mapping Legend Ansatz: 1 encoding + 1 processing layers + 1 final layer of 푅 푅 푥 푧 Meta-VQE: Layer: 푅푥푅푧+ all connected 푋푋 gates Linear encoding. Loss function with test points. Parameters of 푋푋 gates are the same in all layers (same entanglement gate) Opt-meta-VQE: Linear encoding: 푅 (푤 풇 + 휙 )푅 (푤 풇 + 휙 ) VQE optimization with opt. meta- 푥 1 1 푧 2 2 VQE parameters as starting point. Hamiltonian Parameter (flux) Single minimization per parameter. VQE: Standard VQE. 2 processing layers. Result of previous minimization as initial point of the next one. VQE enc: Same as VQE but including an encoding layer.

ACL, J. S. Kottmann and A. Aspuru-Guzik, arXiv:2009.13545 [quant-ph] (2020) The Meta-VQE

Some conclusions:

- Meta-VQE can be used to scan over Hamiltonian parameteres to find the energy interesting regions.

- We can use its parameter solution to run a more precise algorithm such as opt-meta-VQE or standard VQE.

- The encoding strategy in VQE-type algorithms might be useful to guide the optimization towards the solution.

- Careful with QPT: the ground state changes so the unitary circuit (the encoding and processing parameters used) will change in the different phase areas.

Code https://github.com/aspuru-guzik-group/Meta-VQE

ACL, J. S. Kottmann and A. Aspuru-Guzik, arXiv:2009.13545 [quant-ph] (2020) Comments and Remarks The end of classical computing?

1. We can’t simulate classically more tan ~50 qubits (not even with a supercomputer!)

2. Simulation of quantum phenomena is exponentially costly for a classical computer.

3. Many interesting physical systems (molecules, phases of matter,…) are quantum.

4. Quantum computers are controlled with classical computers.

5. Pre- and post-processing of quantum data is classical.

6. We don’t have a quantum algorithm for each open problem, but do we need them?

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. The needs in NISQ era

1. What can we do with ~100 noisy qubits?

2. Variational Quantum Algorithms are theoretically resistant to small amount of noise

3. Rethink and adapt algorithms to VQA

4. We need tools for running those algorithms: error mitigation techniques, programming languages,…

5. What are the limits in NISQ computers? (e.g. what’s the biggest molecule that we can simulate?)

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Quantum calling

New quantum algorithms: variational or fault-tolerant.

New applications: chemistry, materials, finance, optimization problems, biology, physics,…

Architectures: superconducting circuits, trapped ions, photons,…

Quantum control: reduce noise, error correction, gate fidelities,…

Quantum-classical interface: programming languages, …

Computational complexity: what kind of problems can we solve and how.

Quantum Computing in the NISQ era, Alba Cervera-Lierta, UCL Quantum Tech Winter School 2020. Thanks! Questions?

Alba Cervera-Lierta Slides: albacl.github.io/talk/ University of Toronto @albaclierta