素粒子物理学のための量子計算入門～基礎＆スピン系編～

Masazumi Honda(本多正純)

10th June, 2021

第11回HPC-Phys勉強会※zoomにて録画予定

Quantum computer sounds growing well…

[Credit: Forest Stearns, Google AI Quantum
Artist in Residence (CC BY-ND 4.0)][Credit: Erik Lucero, Research Scientist and Lead Production Quantum Hardware, Google (CC BY-ND 4.0)]

Quantum computer sounds growing well…

[Credit: Forest Stearns, Google AI Quantum
Artist in Residence (CC BY-ND 4.0)][Credit: Erik Lucero, Research Scientist and Lead Production Quantum Hardware, Google (CC BY-ND 4.0)]

This lecture = How can we use it for particle physics?

This lecture is a preparation forApplication of Quantum Computation
toQuantum Field Theory (QFT)
・Generic motivation:

simply would like to use powerful computers?
・Specific motivation:

This lecture is a preparation forApplication of Quantum Computation
toQuantum Field Theory (QFT)
・Generic motivation:

simply would like to use powerful computers?
・Specific motivation:
Quantum computation is suitable for Hamiltonian formalism
Liberation from infamous sign problem in Monte Carlo?
(next slide)Sign problem in Monte Carlo simulation
Conventional approach to simulate QFT:
① Discretize Euclidean spacetime by lattice:& make path integral finite dimensional:②(this point is explained to give a motivation & isn’t
essential to understand main contents of the lectures)Sign problem in Monte Carlo simulation
Conventional approach to simulate QFT:

(this point is explained to give a motivation & isn’t
essential to understand main contents of the lectures)① Discretize Euclidean spacetime by lattice:& make path integral finite dimensional:② Numerically Evaluate it by (Markov Chain) Monte Carlo method

regarding the Boltzmann factor as a probability:Sign problem in Monte Carlo simulation (Cont’d)Markov Chain Monte Carlo:
probability

problematic when Boltzmann factor isn’t R≧0 & is highly oscillating
Examples w/ sign problem:
・topological termcomplex action

・chemical potential

indefinite sign of fermion determinant・real time

“ 𝑒 𝑖𝑆(𝜙) ” much worseSign problem in Monte Carlo simulation (Cont’d)Markov Chain Monte Carlo:
probability

problematic when Boltzmann factor isn’t R≧0 & is highly oscillating
Examples w/ sign problem:
・topological termcomplex action

・chemical potential

indefinite sign of fermion determinant・real time

“ 𝑒 𝑖𝑆(𝜙) ” much worse

In Hamiltonian formalism,
sign problem is absent from the beginning(∃various approaches within framework of path integral formalism but I’ll skip it )

Cost of Hamiltonian formalism
We have to play with huge vector spacesince QFT typically has ∞-dim. Hilbert space
regularization needed!

Technically, computers have tomemorize huge vector & multiply huge matrices

Cost of Hamiltonian formalism
We have to play with huge vector spacesince QFT typically has ∞-dim. Hilbert space
regularization needed!

Technically, computers have tomemorize huge vector & multiply huge matrices

Quantum computers do this job?

Should we care now as “users”?
Quantum computers don’t have sufficient powers yet.

Shouldn’t we start to care after quantum supremacy comes?

Should we care now as “users”?
Quantum computers don’t have sufficient powers yet.

Shouldn’t we start to care after quantum supremacy comes?
I personally think:∃Many things to do even now in various contexts(numerical/analytic/purely algorithmic/lat/th/ph)

For instance,
・we haven’t established

how to put QCD efficiently on quantum computers
how to efficiently pick up various real time physics(e.g. scattering/dynamical hadronization)・∃only 1 example so far to take a serious continuum limit[Chakraborty-MH-Kikuchi-Izubuchi-Tomiya ’20]

Some good news…
・If you have google or facebook account,
you can immediately use IBM’s quantum computer for free・Algorithms for simulating quantum system are much easierthan ones for generic purpose (e.g. Shor’s algorithm for prime factorization)
・Simple code can be made by drug & drop in IBM’s website
and serious code is made by python

・I am beginner of both python and quantum computation(started on June, 2019)

・It’s fun!!

Plan
0. Introduction

1. Qubits and gates
2. Some demonstrations in IBM Q Experience

3. Quantum simulation of Spin system
4. Summary

Qubit = Quantum Bit
Qubit = Quantum system w/ 2 dim. Hilbert space
Basis:“computational basis”

Generic state:
w/Ex.) Spin 1/2 system:(We don’t need to mind how it is realized as “users”)

Single qubit operations
・Acting unitary operator:
In quantum circuit notation,(multiplying 2x2 unitary matrix)

Single qubit operations
・Acting unitary operator:(multiplying 2x2 unitary matrix)

In quantum circuit notation,

・Measurement:(classical number)

Single qubit gates used here
(just Pauli matrices)

X is “NOT”:

Single qubit gates used here
(just Pauli matrices)

X is “NOT”:

Single qubit gates used here
(just Pauli matrices)

X is “NOT”:

Single qubit gates used here
(just Pauli matrices)

X is “NOT”:

Multiple qubits
2 qubits – 4 dim. Hilbert space:N qubits – 2N dim. Hilbert space:Two qubit gates used here
Controlled 𝑋 (NOT) gate:

or equivalently

Two qubit gates used here
Controlled 𝑋 (NOT) gate:

or equivalently

SWAP gate:
We’ll see this is useful tocompute Renyi entropy

Rule of the gameDo something interesting by a combination ofaction of Unitary operators:&measurements:(classical number)Universality
・Any unitary gate is a combination of single qubit gates & 𝐶𝑋(“Single qubit gates & 𝐶𝑋 are universal”)
Ex.) Toffoli(controlled-controlled-NOT)Universality
・Any unitary gate is a combination of single qubit gates & 𝐶𝑋(“Single qubit gates & 𝐶𝑋 are universal”)
Ex.) Toffoli(controlled-controlled-NOT)・Any single qubit gate is approximated by a combination of
𝐻 & 𝑇 in arbitrary precision

・𝐻, 𝑇 & 𝐶𝑋 are universal

Errors in Quantum computer
In real quantum computer,
Qubits in quantum circuit ≠ isolated system

Interactions w/ environment cause errors/noises
We need to include “quantum error corrections”
which seem to require a huge number of qubits(∼ major obstruction of the development)This lecture won’t discuss quantum error corrections
but it can be taken into account in an independent way
of details of algorithm

(Classical) simulator for Quantum computer
Quantum computation ⊂ Linear algebra
The same algorithm can be implemented in classical computer
but w/o speed-up (1 quantum step = many classical steps)

Simulator = Tool to simulate quantum computerby classical computer
・Doesn’t have errors → ideal answers(More precisely, classical computer also has errors but its error correction is established)

・The same code can be run in quantum computer w/ speed-up

Useful to test algorithm & estimate computational resources(∼# of qubits, gates)

Short summary
・Qubit = Quantum bit
・Important gates:

・Do something interesting by a combination ofacting unitary op. & measurement
・𝐻, 𝑇 & 𝐶𝑋 are universal

・Real quantum computer has errors
・Simulator = Tool to simulate quantum computerby classical computerSome demonstrationsin IBM Quantum Experience

A trivial problem: measure |0⟩A trivial problem: measure |0⟩ (Cont’d)Measure 1024 times in simulator

Trivial result

Of Course!

Measure 1024 times in quantum computer

Result of quantum computer?

This is the error!

Another trivial problem: measure |1⟩

Another trivial problem: measure |1⟩ (Cont’d)Result of simulator (1024 shots)

Result of quantum computer (1024shots)

Error again

The simplest nontrivial problem: Hadamard gate

Result of simulator (1024 shots)

Not exactly 50:50 because of statistical errors

Result of simulator (8192 shots)

Improved!

Result of quantum computer (1024 shots)∃Both errors & statistical errors

Result of quantum computer (8192 shots)

Statistical errors are improvedA trivial problem for 2 qubits

Result of simulator (1024 shots)

Note that notation is different from the ket notation

2 qubit operation by simulator

2 qubit operation by quantum computer (1024 shots)

Quantum simulation of Spin system

Warm up: 2-site transverse Ising model1x

2x

We are going to・construct time evolution operator
・obtain vacuum state・compute vacuum expectation values
・compute Renyi entropy

Time evolution operator
Time evolution of any state is studied by acting the operator
whereHow do we express this in terms of elementary gates?
(such as 𝑋, 𝑌, 𝑍, 𝑅𝑋,𝑌,𝑍 , 𝐶𝑋 etc…)

Time evolution operator
Time evolution of any state is studied by acting the operator
whereHow do we express this in terms of elementary gates?
(such as 𝑋, 𝑌, 𝑍, 𝑅𝑋,𝑌,𝑍 , 𝐶𝑋 etc…)

Step 1: Suzuki-Trotter decomposition:(∃higher order improvements)(𝑀: large positive integer)

Time evolution operator (Cont’d)
The 1st one is trivial:

acting on qubit 2

acting on qubit 1

Time evolution operator (Cont’d)
The 1st one is trivial:

The 2nd one is nontrivial:

One can show (see next slide)acting on qubit 2

acting on qubit 1

Time evolution operator (Cont’d)
Proof:

Thus,

Quantum circuit for time evolution op.

=

Survival probability of free vacuum
For J=0, ground state is

We can compute survival probability of the free vacuum:
Toy version ofSchwinger effectMeasure the probability having |00⟩ inside the stateDemonstration for the survival probability=
Let’s compute it forDemonstration for the survival probability (Cont’d)Result by simulator w/ 1024 shots:

Result of simulator (1024 shots):

Result of quantum computer (1024 shots):More serious computation
2 sites

4 sites

6 sites
8 sites

Adiabatic state preparation of vacuum
Step 1: Choose an initial Hamiltonian 𝐻0 of a simple system
whose ground state |vac0 ⟩ is known and unique
Step 2:

Step 3:

Adiabatic state preparation of vacuum
Step 1: Choose an initial Hamiltonian 𝐻0 of a simple system
whose ground state |vac0 ⟩ is known and unique
Step 2: Introduce adiabatic Hamiltonian 𝐻𝐴 𝑡 s.t.
・ 𝐻𝐴 0 = 𝐻0 , 𝐻𝐴 𝑇 = 𝐻target
・Step 3:𝑑𝐻𝐴𝑑𝑡≪ 1 for 𝑇 ≫ 1

Adiabatic state preparation of vacuum
Step 1: Choose an initial Hamiltonian 𝐻0 of a simple system
whose ground state |vac0 ⟩ is known and unique
Step 2: Introduce adiabatic Hamiltonian 𝐻𝐴 𝑡 s.t.
・ 𝐻𝐴 0 = 𝐻0 , 𝐻𝐴 𝑇 = 𝐻target
・𝑑𝐻𝐴𝑑𝑡≪ 1 for 𝑇 ≫ 1

Step 3: Use the adiabatic theorem
If 𝐻𝐴 (𝑡) has a unique ground state w/ a finite gap for ∀𝑡,then the ground state of 𝐻target is obtained by𝑇

vac = lim 𝒯 exp −𝑖 න 𝑑𝑡 𝐻𝐴 𝑡
𝑇→∞

0|vac0 ⟩For transverse Ising model
ChooseDiscretize the integral:

whereMagnetization
Once we get the vacuum, we can compute VEV of operators:
It is easiest to compute magnetization:

Transverse one is a bit more tricky:

Result by simulator (10000 shots)
exact diagonalization

adiabatic

2 sites

4 sites

6 sites

8 sitesRenyi entropy
Dividing total Hilbert space as

reduced density matrix is defined as

Entanglement entropy:

n-th Renyi entropy:Quantum algorithm for 2nd Renyi entropy
Consider (𝑁𝐴 + 𝑁𝐵 )-qubit system and the density matrix

Let’s divide the system into two systems:& consider the 2nd Renyi entropy

Quantum algorithm for 2nd Renyi entropy
Consider (𝑁𝐴 + 𝑁𝐵 )-qubit system and the density matrix

Let’s divide the system into two systems:& consider the 2nd Renyi entropy
One can show (next slide)For[Hastings-Gonzalez-Kallin-Melko’10]

Quantum algorithm for 2nd Renyi entropy (Cont’d)
Proof:

Demonstration: 2nd Renyi entropy of Bell stateBell state:
Reduced density matrix:

2nd Renyi entropy:

Let’s reproduce it in IBM Q ExperienceDemonstration: 2nd Renyi entropy of Bell state (Cont’d)
We know

The Bell state is written as= |𝐵⟩
Therefore,Demonstration: 2nd Renyi entropy of Bell state (Cont’d)Result of simulator (1024 shots):

Result of simulator (1024 shots):

Result of quantum computer (1024 shots):More direct way?
We’ve directly computed

rather than itself:

Can we directly compute it?
Yes, there is a way to compute expectation valueof unitary op. under any state: (next slide)𝜓 U |𝜓⟩“Hadamard test”: standard way to compute 𝜓 U |𝜓⟩① Extend Hilbert space & consider the state0 ⊗ |𝜓⟩“ancillary qubit”② We can compute𝜓 𝑈 |𝜓⟩ by using the 2 circuits:(next slide)⋮⋮Re( 𝜓 𝑈 𝜓 )⋮⋮Im( 𝜓 𝑈 𝜓 )“Hadamard test”: standard way to compute 𝜓 U 𝜓 (Cont’d)Computation of Re( 𝜓 𝑈 𝜓 ):Do nothing if |0⟩ & act 𝑈 if |1⟩

④

⋮

⋮
①

②③

“Hadamard test”: standard way to compute 𝜓 U 𝜓 (Cont’d)Computation of Re( 𝜓 𝑈 𝜓 ):Do nothing if |0⟩ & act 𝑈 if |1⟩

④

⋮

⋮
①
① 𝐻0 ⊗ 𝜓 =

102

⊗ 𝜓 +

②

③

1|1⟩ ⊗2

𝜓“Hadamard test”: standard way to compute 𝜓 U 𝜓 (Cont’d)Computation of Re( 𝜓 𝑈 𝜓 ):Do nothing if |0⟩ & act 𝑈 if |1⟩④

⋮⋮
①110
⊗
𝜓+|1⟩ ⊗
22
1+ 2 |1⟩ ⊗ 𝑈 𝜓① 𝐻0 ⊗ 𝜓 =②102⊗ 𝜓②③
𝜓“Hadamard test”: standard way to compute 𝜓 U 𝜓 (Cont’d)Computation of Re( 𝜓 𝑈 𝜓 ):Do nothing if |0⟩ & act 𝑈 if |1⟩

④

⋮

⋮
①②③

1
10
⊗
𝜓+|1⟩ ⊗ 𝜓
22
1
1② 2 0 ⊗ 𝜓 + 2 |1⟩ ⊗ 𝑈 𝜓
11③ 2 0 + 1 ) ⊗ 𝜓 + 2 (|0⟩ − |1⟩) ⊗ 𝑈 𝜓1
1= 2 |0⟩ ⊗ (1 + 𝑈) 𝜓 + 2 |1⟩ ⊗ (1 − 𝑈) 𝜓① 𝐻0 ⊗ 𝜓 =“Hadamard test”: standard way to compute 𝜓 U 𝜓 (Cont’d)Computation of Re( 𝜓 𝑈 𝜓 ):Do nothing if |0⟩ & act 𝑈 if |1⟩④⋮

⋮
①②③

1
10⊗
𝜓+|1⟩ ⊗ 𝜓
221
1② 2 0 ⊗ 𝜓 + 2 |1⟩ ⊗ 𝑈 𝜓
11③ 2 0 + 1 ) ⊗ 𝜓 + 2 (|0⟩ − |1⟩) ⊗ 𝑈 𝜓1
1= 2 |0⟩ ⊗ (1 + 𝑈) 𝜓 + 2 |1⟩ ⊗ (1 − 𝑈) 𝜓

① 𝐻0 ⊗ 𝜓 =111

1④ 𝑃0 = 4 (1 + 𝑈) 𝜓⟩|2 = 2 ( 1 + Re 𝜓 𝑈 𝜓 )𝑃1 = 4 (1 − 𝑈) 𝜓⟩|2 = 2 ( 1 − Re 𝜓 𝑈 𝜓 )“Hadamard test”: standard way to compute 𝜓 U 𝜓 (Cont’d)Computation of Re( 𝜓 𝑈 𝜓 ):Do nothing if |0⟩ & act 𝑈 if |1⟩④⋮

⋮
①②③

110
⊗
𝜓
+|1⟩ ⊗ 𝜓
221
1② 2 0 ⊗ 𝜓 + 2 |1⟩ ⊗ 𝑈 𝜓1
1③ 2 0 + 1 ) ⊗ 𝜓 + 2 (|0⟩ − |1⟩) ⊗ 𝑈 𝜓1
1= 2 |0⟩ ⊗ (1 + 𝑈) 𝜓 + 2 |1⟩ ⊗ (1 − 𝑈) 𝜓

① 𝐻0 ⊗ 𝜓 =1

1④ 𝑃0 = 4 (1 + 𝑈) 𝜓⟩|2 = 2 ( 1 + Re 𝜓 𝑈 𝜓 )1
1𝑃1 = 4 (1 − 𝑈) 𝜓⟩|2 = 2 ( 1 − Re 𝜓 𝑈 𝜓)

Re 𝜓 𝑈 𝜓 = 𝑃0 − 𝑃1

“Hadamard test”: standard way to compute 𝜓 U 𝜓 (Cont’d)Computation of Im( 𝜓 𝑈 𝜓 ):④⋮⋮①① R Z (𝜋/2)𝐻 0 ⊗ 𝜓 =②➂ⅇ𝜋𝑖−42ⅇ𝜋𝑖−420 ⊗ 𝜓 +ⅇ𝜋𝑖+42ⅇ𝜋𝑖−420 ⊗ 𝜓 +ⅇ𝜋𝑖+42|1⟩ ⊗ 𝜓|1⟩ ⊗ 𝑈 𝜓|0⟩ ⊗ (1 + 𝑖𝑈) 𝜓 +1③②ⅇ𝜋𝑖−42|1⟩ ⊗ (1 − 𝑖𝑈) 𝜓

1④ 𝑃0 = 4 (1 + 𝑖𝑈) 𝜓⟩|2 = 2 ( 1 − Im 𝜓 𝑈 𝜓 )11𝑃1 = 4 (1 − 𝑖𝑈) 𝜓⟩|2 = 2 ( 1 + Im 𝜓 𝑈 𝜓)

Im 𝜓 𝑈 𝜓 = 𝑃1 − 𝑃0

Coming back to the Renyi entropy of Bell state
Taking 𝜓 = 𝐵 ⊗ |𝐵⟩ & 𝑈 = SWAP (1,3) , we can directly compute

Real part:
ancillary qubit

constructing 𝐵 ⊗ |𝐵⟩

Imaginary part:Result of simulator (real part, 1024 shots)

2=Expectation: 𝑃0 − 𝑃1 = Re tr𝜌red

12

Result of simulator (imaginary part, 1024 shots)

Expectation:

2
𝑃1 − 𝑃0 = Im tr𝜌red=0

Result of quantum computer (real part, 1024 shots)

2=Expectation: 𝑃0 − 𝑃1 = Re tr𝜌red12

Result of quantum computer (imaginary part, 1024 shots)

Expectation:

2
𝑃1 − 𝑃0 = Im tr𝜌red=0

SummarySummaryfun & ∃many things to do even now
・Quantum computation is suitable for Hamiltonian formalism
which is free from sign problem
・Instead we have to deal with huge vector space.
Quantum computers in future may do this job.
・”Rule” of quantum computation= Do something interesting by a combination ofacting unitary op. & measurement
・Real quantum computer has errors

・Quantum error correction is important

“Quantum” Moore’s law?
#(qubits)[from Keisuke Fujii’s slide @Deep learning and Physics 2020
https://cometscome.github.io/DLAP2020/slides/DeepLPhys_Fujii.pdf]

“Quantum” Moore’s law?
#(qubits)[from Keisuke Fujii’s slide @Deep learning and Physics 2020
https://cometscome.github.io/DLAP2020/slides/DeepLPhys_Fujii.pdf]

Thanks!

Appendix

Universality
・Any unitary gate is a combination of single qubit gates & 𝐶𝑋(“Single qubit gates & 𝐶𝑋 are universal”)
Ex.) Toffoli(controlled-controlled-NOT)・Any single qubit gate is approximated by a combination of𝐻 & 𝑇 in arbitrary precision

・𝐻, 𝑇 & 𝐶𝑋 are universal

Approximation of single qubit gate by 𝐻 & 𝑇① Get a rotation with angle 2𝜋 × irrational :𝑖𝜋𝑇𝐻𝑇𝐻 = 𝑒 4 𝑅𝑛 (𝜃)𝑖with 𝑅𝑛 𝜃 ≡ 𝑒−2𝑛⋅𝜎where𝑛=1
1 + cos2 (𝜋/8)𝑐𝑜𝑠(𝜋/8)sin(𝜋/8)𝑐𝑜𝑠(𝜋/8)&cos(𝜃/2) ≡ cos 2 (𝜋/8)2𝜋 × irrational !

② Use Weyl’s uniform distribution theorem:

𝜃𝒁 is uniformly distributed mod 1

approximate 𝑅𝑛 𝛼 for ∀𝛼③ Construct rotation around another axis:
𝐻𝑅𝑛 𝛼 𝐻 = 𝑅𝑚 𝛼with 𝑚 =1

1 + cos2 (𝜋/8)④ Approximate ∀single qubit gate: 𝑅𝑛 𝛼 𝑅𝑚 𝛽 𝑅𝑛 𝛾𝑐𝑜𝑠(𝜋/8)−sin(𝜋/8)𝑐𝑜𝑠(𝜋/8)

What if we replace 𝑇 by something else?
𝑖𝜋
𝑇 = 𝑒 8 𝑅𝑍 (𝜋/4)𝑇 ′ ≡ 𝑅𝑍 (𝜙) ??

We have the identity:

𝑇′𝐻𝑇′𝐻 = 𝑅𝑛 (𝜃)where𝑛=1
1 + cos2 (𝜙/2)𝑐𝑜𝑠(𝜙/2)sin(𝜙/2)𝑐𝑜𝑠(𝜙/2)&cos(𝜃/2) ≡ cos 2 (𝜙/2)

We can approximate any single qubit gateby combining 𝐻 & 𝑇′ if 𝜃/2𝜋 is irrational

Moore’s law[by Max Roser, Hannah Ritchie, https://ourworldindata.org/uploads/2020/11/Transistor-Count-over-time.png ]