towards a quantum linpack benchmarklinlin/presentations/202007...1 towards a quantum linpack...

22
1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory Joint work with Yulong Dong (Berkeley) Google Summer Symposium 2020, arXiv: 2006.04010 https://github.com/qsppack/racbem

Upload: others

Post on 09-Aug-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

1

Towards a quantum LINPACK benchmark

Lin Lin

Department of Mathematics, UC BerkeleyLawrence Berkeley National Laboratory

Joint work with Yulong Dong (Berkeley)

Google Summer Symposium 2020,

arXiv: 2006.04010https://github.com/qsppack/racbem

Page 2: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

2

How many quantum computers will we need?Finally we have a few quantum computers

I think there is a world market for maybe five computers.–Thomas Watson, president of IBM, 1943

In 2019, there are around 2 billion computers in the world(estimate).

Prediction is very difficult, especially if it’s about the future.–Niels Bohr (also attributed to others)

Page 3: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

3

Let us make some prediction: there will be say, 10000quantum computers

Page 4: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

4

How to select the TOP500 quantum computers?

First, how to do the job for classical supercomputers?

What is LINPACK? Why LINPACK?

1https://www.top500.org/, 55th edition of the TOP500, June 2020

Page 5: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

5

LINPACK benchmark• Interested in using supercomputers for scientific computing

(instead of e.g. recognizing cats, but maybe now it is difficult todistinguish the two..)

• Solving linear systems: building block for numerous scientificcomputing applications

• LINPACK: Solve Ax = b with dense, random matrices. Noobvious applications. Supremacy?

• Controversial over its effectiveness since early days. Alternativebenchmarks have been proposed1. Still solving linear systemswith some random sparsity patterns.

• Has been used to define TOP500 since its debut in 1993.

• Quantum LINPACK benchmark?1Why Linpack no longer works as well as it once did. (link)

Page 6: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

6

Climbing the Quantum Mount Everest

Page 7: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

7

Quantum linear system problem (QLSP)

• Use quantum computers to solve

|x〉 ∝ A−1 |b〉 .

• How to get the information in A, |b〉 into a quantum computer?read-in problem.

• κ: condition number of A = ‖A‖∥∥A−1

∥∥; ε: target accuracy.

• Proper assumptions on A (e.g. d-sparse) so that oracles costpoly(n), while A ∈ C2n×2n

. (Potentially) exponential speedup.

Page 8: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

8

Compare the complexities of QLSP solversSignificant progress in the past few years: Near-optimal complexitymatching lower bounds.

Algorithm Query complexity RemarkHHL,(Harrow-Hassidim-Lloyd,2009)

O(κ2/ε) w. VTAA, complexity becomesO(κ/ε3) (Ambainis 2010)

Linear combination of unitaries(LCU),(Childs-Kothari-Somma,2017)

O(κ2polylog(1/ε)) w. VTAA, complexity becomesO(κ poly log(1/ε))

Quantum singular value transfor-mation (QSVT) (Gilyén-Su-Low-Wiebe, 2019)

O(κ2 log(1/ε)) Queries the RHS only O(κ) times

Randomization method (RM)(Subasi-Somma-Orsucci, 2019)

O(κ/ε) Prepares a mixed state; w. re-peated phase estimation, complex-ity becomes O(κ poly log(1/ε))

Time-optimal adiabatic quantumcomputing (AQC(exp)) (An-L.,2019, 1909.05500)

O(κ poly log(1/ε)) No need for any amplitude amplifi-cation. Use time-dependent Hamil-tonian simulation.

Eigenstate filtering (L.-Tong, 2019,1910.14596)

O(κ log(1/ε)) No need for any amplitude amplifi-cation. Does not rely on any com-plex subroutines.

Page 9: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

9

Quantum benchmark problem

• All these algorithms require full fault-tolerant computers to getanywhere.

• Getting the matrix into quantum computer alone (using e.g. LCU)can be prohibitively expensive on near-term devices.

• Will likely remain so for some time for real applications.

• Quantum LINPACK benchmark is different: do we really need /want to generate random numbers classically and get them intoquantum computers say via QRAM?

Page 10: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

10

Idea: from the success of Google’s supremacy circuit

• A big random, unitary matrix, almost drawn from Haar measure.

• Linear algebra usually works with non-unitary matrices.

• How about taking the upper-left diagonal block n-qubit matrix ofthe (n + 1)-qubit unitary matrix (can be random)?

UA =

(A ·· ·

)• FACT: It can represent in principle any n-qubit matrix (up to

scaling)!

• Block-encoding (Gilyén-Su-Low-Wiebe, 2019)

• RAndom Circuit Block-Encoded Matrix (RACBEM)

Page 11: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

11

RACBEM

• A very flexible way to construct a non-unitary matrix with respectto any coupling map of the quantum architecture.

• Take upper-left diagonal block: measure one-qubit.A = (〈0| ⊗ In)UA (|0〉 ⊗ In)

Page 12: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

12

Error of RACBEM on IBM Q

1 2 3 4 5 6 7 8n_sys_qubit

0.0

0.1

0.2

0.3

0.4

0.5

0.6

|pm

eas

p exa

ct|/p

exac

t

Relative error in success probability of obtaining A |0n〉 for differentnumber of system qubits, on the 5-qubit backend ibmq_burlington,and 15-qubit backend ibmq_16_melbourne.

Page 13: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

13

Representing matrix functions, say f (A) = A−1

• General quantum singular value transformation circuit (QSVT)(Gilyén-Su-Low-Wiebe, 2019). Always even order polynomial,and 1 extra ancilla qubit.

• Follow the natural layout of the quantum circuit. Can run withouteven calling a transpiler.

• Applications: Linear systems, time series, spectral measure,thermal energy ... with Hermitian-RACBEM.

• How to obtain the phase factors: optimization based approach toget > 10000 phase factors 1

1(Dong-Meng-Whaley-L., 2002.11649). https://github.com/qsppack/qsppack

Page 14: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

14

Solving linear system on IBM Q and QVM

Compute∥∥H−1 |0n〉

∥∥22. (sigma: noise level on QVM)

Well conditioned linear system

ibmq_london ibmq_burlington ibmq_essex ibmq_ourense ibmq_vigoIBM Q backend (5-qubit)

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

|pm

eas

p exa

ct|/p

exac

t

length of QSVTphase factors

311

0.0 0.2 0.4 0.6 0.8 1.0sigma

0.025

0.050

0.075

0.100

0.125

0.150

0.175

0.200

|pm

eas

p exa

ct|/p

exac

t

(a) = 2

0.0 0.2 0.4 0.6 0.8 1.0sigma

0.025

0.050

0.075

0.100

0.125

0.150

0.175

0.200

0.225

|pm

eas

p exa

ct|/p

exac

t

(b) = 5

0.0 0.2 0.4 0.6 0.8 1.0sigma

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

|pm

eas

p exa

ct|/p

exac

t

(c) = 10

0.0 0.2 0.4 0.6 0.8 1.0sigma

0.2

0.4

0.6

0.8

1.0

|pm

eas

p exa

ct|/p

exac

t

(d) = 20

n_sys_qubit 3 4 5 6 7 8 9 10

Page 15: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

15

Time series (no Trotter)

s(t) = 〈ψ|eiHt |ψ〉

QVM:

2 4 6 8 10

0.50

0.25

0.00

0.25

0.50

0.75

Re0n |e

iHt |0

n

(i) n_sys_qubit = 7

2 4 6 8 10

0.25

0.00

0.25

0.50

0.75Re

0n |eiH

t |0n

(ii) n_sys_qubit = 8

2 4 6 8 10t

0.2

0.0

0.2

0.4

0.6

Im0n |e

iHt |0

n

2 4 6 8 10t

0.2

0.0

0.2

0.4

0.6

Im0n |e

iHt |0

n

2 4 6 8 10

0.5

0.0

0.5

Re0n |e

iHt |0

n

(iii) n_sys_qubit = 9

2 4 6 8 10

0.50

0.25

0.00

0.25

0.50

0.75

Re0n |e

iHt |0

n

(iv) n_sys_qubit = 10

2 4 6 8 10t

0.50

0.25

0.00

0.25

0.50

Im0n |e

iHt |0

n

2 4 6 8 10t

0.4

0.2

0.0

0.2

0.4

0.6

Im0n |e

iHt |0

n

exact, realexact, imag

QSVT without error, realQSVT without error, imag

sigma = 0.00, realsigma = 0.00, imag

sigma = 0.25, realsigma = 0.25, imag

sigma = 0.50, realsigma = 0.50, imag

sigma = 0.75, realsigma = 0.75, imag

sigma = 1.00, realsigma = 1.00, imag

Page 16: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

16

Spectral measure

s(E) = 〈ψ|δ(H− E)|ψ〉 ≈ 1πIm 〈ψ|(H− E − iη)−1|ψ〉

QVM:

0.00 0.25 0.50 0.75 1.00E

0.4

0.6

0.8

1.0

1.2sp

ectra

l mea

sure

(a) n_sys_qubit = 7

0.00 0.25 0.50 0.75 1.00E

0.4

0.6

0.8

1.0

1.2

1.4

spec

tral m

easu

re

(b) n_sys_qubit = 8

0.00 0.25 0.50 0.75 1.00E

0.4

0.5

0.6

0.7

0.8

0.9

spec

tral m

easu

re

(c) n_sys_qubit = 9

0.00 0.25 0.50 0.75 1.00E

0.4

0.6

0.8

1.0sp

ectra

l mea

sure

(d) n_sys_qubit = 10

exactQSVT without noise

sigma = 0.00sigma = 0.25

sigma = 0.50sigma = 0.75

sigma = 1.00

Page 17: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

17

Thermal energy

E(β) =Tr[He−βH]Tr[e−βH]

IBM Q (left) and QVM (right)

2 4 6 8

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

E()

(i) n_sys_qubit = 1

2 4 6 8

0.1

0.2

0.3

0.4

0.5E(

)(ii) n_sys_qubit = 2

2 4 6 80.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

E()

(iii) n_sys_qubit = 3

2 4 6 8

0.1

0.2

0.3

0.4

E()

(iv) n_sys_qubit = 5

exact IBM Q

2 4 6 80.10

0.15

0.20

0.25

0.30

0.35

0.40

0.45

E()

(i) n_sys_qubit = 3backend = ibmq_essex (5-qubit)

2 4 6 8

0.1

0.2

0.3

0.4

E()

(ii) n_sys_qubit = 3backend = ibmq_16_melbourne (15-qubit)

2 4 6 80.05

0.10

0.15

0.20

0.25

0.30

0.35

E()

(iii) n_sys_qubit = 5backend = ibmq_16_melbourne (15-qubit)

2 4 6 8

0.10

0.15

0.20

0.25

0.30

0.35

0.40

E()

(iv) n_sys_qubit = 7backend = ibmq_16_melbourne (15-qubit)

exactsigma = 0.00

sigma = 0.25sigma = 0.50

sigma = 0.75sigma = 1.00

1Use the minimally entangled typical thermal state (METTS) algorithm (White,2009) (Motta et al, 2020)

Page 18: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

18

Conclusion

• Linear system with (Hermitian-)RACBEM: Quantum LINPACKbenchmark

• Uses a supremacy circuit as building block.

• Can be easily engineered w.r.t. almost any architecture.

• Maybe only steps away from the supremacy test.

• Hardness? Each UA is already hard..

• More quantitative ways to measure success and classicalhardness: cross-entropy test etc.

Page 19: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

19

References

https://github.com/qsppack/qsppackhttps://github.com/qsppack/racbem• Y. Dong and L. Lin, Random circuit block-encoded matrix and a

proposal of quantum LINPACK benchmark [arXiv:2006.04010]

• Y. Dong, X. Meng, K. B. Whaley, L. Lin, Efficient Phase FactorEvaluation in Quantum Signal Processing [arXiv:2002.11649]

• L. Lin and Y. Tong, Optimal quantum eigenstate filtering withapplication to solving quantum linear systems [arXiv:1910.14596]

• D. An and L. Lin, Quantum linear system solver based ontime-optimal adiabatic quantum computing and quantumapproximate optimization algorithm [arXiv:1909.05500]

Page 20: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

20

Acknowledgement

Thank you for your attention!

Lin Linhttps://math.berkeley.edu/~linlin/

Page 21: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

21

Two issues of RACBEM

• Not Hermitian.

• Matrix becomes increasingly singular as n increases.

Page 22: Towards a quantum LINPACK benchmarklinlin/presentations/202007...1 Towards a quantum LINPACK benchmark Lin Lin Department of Mathematics, UC Berkeley Lawrence Berkeley National Laboratory

22

Fixing both issues: Hermitian-RACBEM

• Simple quantum singular value transformation circuit (QSVT)(Gilyén-Su-Low-Wiebe, 2019) of degree 2.

• Explicit formulation of the Hermitian matrix by tracing out 2ancilla (the extra ancilla can be reused later).

H = [−2 sin(2ϕ0) sinϕ1]A†A + cos(2ϕ0 − ϕ1).

• Fully adjustable condition number.

• This is the really useful thing.