introduction aux méthodes de monte carlo quantique en ... · de pablo et al. (2004), swendsen et...
TRANSCRIPT
![Page 1: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/1.jpg)
1Cours de Physique Théorique du SPhT/Saclay
Introduction aux méthodes de Monte CarloIntroduction aux méthodes de Monte CarloQuantique en matière condenséeQuantique en matière condensée
Fabien Alet
SPhT, CEA-Saclay
![Page 2: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/2.jpg)
2F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
LecturesLectures’’ roadmaproadmap
Quantum Monte Carlo : why and when ?
Lecture I : Introduction Classical Monte Carlo techniques in statistical physics : a brief review
Quantum Monte Carlo I : Path integral vs. series expansion approach,
sign problem, (local update, continuous time)
Lecture II : QMC : How-to’s Quantum Monte Carlo II : (local update, continuous time)
Algorithms : loop algorithm, Stochastic Series Expansion, worm
algorithm
Lecture III : Recent developments Multicanonical sampling, Quantum Wang-Landau algorithm
NP hardness of the sign problem ?
Implementation of algorithms : towards community codes
![Page 3: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/3.jpg)
3F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Quantum Monte Carlo simulationsQuantum Monte Carlo simulations Not as « easy » as classical Monte Carlo
Calculating the energy eigenvalue Ec = solving the problem
Find a mapping of the quantum partition function to a classical problem
Different approaches Path integrals (time-dependent perturbation theory in imaginary time)
Stochastic Series Expansion (high temperature expansion)
At second order phase transitions : critical slowing down Solved by
efficient non-local cluster updates [PREVIOUS WEEK]
First order phase transitions and long tunneling times [THIS WEEK]
Sign problem if some pc < 0 [THIS WEEK]
! ""==
c
EH ceeZ##
Tr
!"=#
c
c
HpeZ
$Tr
![Page 4: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/4.jpg)
4F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
TodayToday’’s plans plan
Multicanonical sampling of quantum systems Classical Monte Carlo and first order phase transitions
Classical Wang-Landau algorithm
Extension to quantum systems
Applications
The sign problem Origin
Complexity classes
NP hardness of the sign problem ?
(Meron cluster Approach)
Implementation of QMC algorithms Towards community codes : The ALPS project
Free energy
Configurations
0<cp
![Page 5: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/5.jpg)
Part I :Part I :MulticanonicalMulticanonical sampling of sampling of
quantum systemsquantum systems
![Page 6: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/6.jpg)
6F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Classical Monte Carlo simulationsClassical Monte Carlo simulations
We want to calculate a thermal average
Exponentially large number of configurations
→ draw a representative statistical sample by important sampling
Pick M configurations ci with probability
Calculate statistical average
Within a statistical error
Problem : we cannot calculate since we do not know Z
!! ""=
c
=Z with / ccE
c
E
ceZeAA
##
!
pci = e"#Eci /Z
!=
="M
i
ci
AM
AA
1
1
M
AA
Var!"
!
pci = e"#Eci /Z
![Page 7: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/7.jpg)
7F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Markov chains and Metropolis algorithmMarkov chains and Metropolis algorithm
Idea : build a Markov chain
It’s sufficient for transitions probabilities Wx,y for transition x→y to fulfill
Ergodicity : any configuration reachable from any other
Detailed balance :
Simplest algorithm due to Metropolis et al. (1953) :
Needs only relative probabilities (energy differences)
!
c1" c
2" ..." c
i" c
i+1" ...
!
"x,y #n : Wn( )
x,y$ 0
!
Wx,y
Wy,x
=py
px
!
Wx,y =min[1, py px ]
!
py px = e"# (Ey "Ex )
![Page 8: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/8.jpg)
8F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
First order phase transitionsFirst order phase transitions
Tunneling out of meta-stable states is suppressed exponentially
T
P
gas
liquidcriticalpoint
Critical slowing down
At critical point wassolved by cluster updates
liquid
gas liquid gas
How can we tunnelout of metastable state? ??
TcLd
e/1!
"#
![Page 9: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/9.jpg)
9F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
MulticanonicalMulticanonical sampling sampling Idea : Directly work with density of states g(E)
Acceptance rate proportionnal to inverse density of states
All energy levels visited equally well
Random walk in energy space Flat histogram in energy space no tunneling problem
With g(E), we have access to everything Free energy available
One simulation gives results for all T
Problem : we don’t know g(E) !!
)(
1
i
iEg
p = iE
i ep!"
#instead of
1)(
1)( )( i, =!="
EgEgpEP
i
EEi#
! ""=E
TkE
BBeEgTkF
/)(ln
![Page 10: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/10.jpg)
10F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Estimation of density of statesEstimation of density of states
Sketch of « traditional » multicanonical method 1. Start with some estimate of g(E)
2. Do a full MC simulation with the related weight, record Energy histogram H(E)
3. Calculate new estimate : g(E) H(E).g(E)
4. Reiterate 2 and 3 until “convergence”
Wang-Landau algorithm Step 2 too slow !! Modify g(E) on the fly at every single MC step
If , then energy histogram H(E) flat
Turn the argument around : For a given level of precision, we have a correct estimation
of g(E) if we force the histogram to be flat !!
Condition enforced by putting a penalty to energy level each time this level is visited
g(E) is consequently modified
When histogram flat, increase precision
Berg, Neuhaus, 1992
Wang, Landau (2001)
)(
1
i
iEg
p =
![Page 11: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/11.jpg)
11F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The Wang Landau algorithmThe Wang Landau algorithm Initially, g(E) is unknown
Start with g(E)=1 and adjust iteratively
Only a few modifications to usual sampling neededStart with modification factor f=e
do {
do { Metropolis updates with transition probability W[i→j]=min[1,g(Ei)/g(Ej)]
Adjust g(E) at each step : g(E)←g(E).f
Increase histogram H(E)++
} until histogram H(E) is “flat” (e.g. 20%)
decrease f (e.g. f ← f1/2)
reset H(E)
} until f-1≈ 10-8
Comments : Initially : multiplicative changes with large f allow rapid crude convergence
Finally : small f means fine structure of g(E) can be mapped out
![Page 12: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/12.jpg)
12F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Example of application of Wang-Landau algorithmExample of application of Wang-Landau algorithm
10 states Potts model in 2d First order phase transition
Tc=0.701
cBTkE
c eEgTEP/
)(),(!
=
![Page 13: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/13.jpg)
13F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Applications and extensionsApplications and extensions
First and second order phase transitions and disorder (spin systems) Wang and Landau (2001)
Systems with rough energy landscape Molecular systems (Calvo, 2002)
Polymer films (Jan et al., 2002)
Protein folding (Rathore et al., 2002)
Scaling analyses for spin glasses (Dayal et al., 2004) Continuum simulations
Yan et al. (2002)
Shell et al. (2002)
And many others …
Improved sampling and optimized ensembles Zhou and Bhatt (2003)
Schulz et al. (2002)
Yamaguchi and Kawashima (2002)
…
![Page 14: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/14.jpg)
14F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Limitations of Wang-Landau algorithmLimitations of Wang-Landau algorithm
Convergence issues at very small f de Pablo et al. (2004), Swendsen et al. (2004)
Not a perfect energy random walk … Dayal et al. (2004), Trebst et al. (2004)
Today’s consensus Convergence problems when asking for extremely precise density of states
However, perfect method to obtain a “very good” density of states, to be fed
to “traditional” multicanonical sampling
![Page 15: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/15.jpg)
15F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Quantum version of Wang-Landau algorithm (I)Quantum version of Wang-Landau algorithm (I) Density of states not accessible directly in quantum case
Classical
Quantum
Quantum version based on SSE
Idea : Make a flat histogram in the expansion order n
Acceptance rate proportional to 1/g(n)
! ! ""==
c E
TkETkE BBc eEgeZ//
)(
!
Z = Tre"#H
!
Z =" n
n!#
b1 ,...,b$( )
%#
% (&Hbi)
i=1
$
' #n
%
(($ & n)!" n
$!#
b1 ,...,b$( )
%#
% (&Hbi)
i=1
$
' #n= 0
$
%
= " ng(n)
n= 0
$
%
![Page 16: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/16.jpg)
16F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Quantum version of Wang-Landau algorithm (II)Quantum version of Wang-Landau algorithm (II) “Diagonal Update” : Walk through operator string
Propose to insert diagonal operators instead of Identity operators
Propose to remove diagonal operators
Changes the expansion order
Small change in acceptance rates for diagonal updates
Loop/Worm/Directed loop update does not change n and is thus unchanged !
Cutoff Λ limits temperatures to β < Λ / E0
!
P[1" H(i, j )
d] =min 1,
#Nbonds $ H(i, j )
d $
% & n
'
( )
*
+ ,
!
P[H(i, j )
d "1] =min 1,# $ n +1
%Nbonds & H(i, j )
d &
'
( ) )
*
+ , ,
Hd(1,2)
index
54321
configuration operator
Ho (3,4)1
Ho (3,4)
1 2 3 4Hd
(1,2)1
1
!!
"
#
$$
%
&
+'(=)
)1(
)(,1min]1[
),(
),(ng
ng
n
HNHP
d
jibondsd
ji
**
!!
"
#
$$
%
&
'
+'(=)
)1(
)(1,1min]1[
),(
),(ng
ng
HN
nHP
d
jibonds
d
ji**
![Page 17: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/17.jpg)
17F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
A first testA first test L=10 sites Heisenberg chain with Λ=250
Free energy and entropy available
One simulations for all temperatures
Clear limit of reliability T>0.05J due to cutoff
1
10
1
+
=
! "=i
i
iSSJHvv
![Page 18: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/18.jpg)
18F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Thermal phase transitionsThermal phase transitions
3D Heisenberg antiferromagnet Second order phase transition at Tc=0.947 J
Parallelization via splitting of the n-range among several CPUs
j
ji
i SSJHvv
,
!= "
![Page 19: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/19.jpg)
19F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Speedup at first order phase transitionsSpeedup at first order phase transitions
Greatly reduced tunneling times at free energy barriers 2D Hardcore bosons
!
H = "t ai†a j + h.c.( )
i, j
# +V2
nin j
i, j
#
3/V
88
2=
!
t
![Page 20: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/20.jpg)
20F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Perturbation expansion and Wang-Landau algorithmPerturbation expansion and Wang-Landau algorithm
Quantum Phase Transition
Expansion in the coupling constant
At fixed temperature
Same procedure as thermal Wang-Landau
VHH !+=0
!!"
=
"
=
=##=00
0 )()(!
$
$$$%
$n
n
n
nn
ngVHTrn
Z
!
P[1" H(i, j )
d ] =min 1,#Nbonds $ H(i, j )
d $
% & n
'
( )
*
+ , Wang&Landau- " - - - - min 1,
#Nbonds $ H(i, j )
d $
% & n
g(n.)
g(n. + /n.)
'
( )
*
+ ,
!
P[H(i, j )
d "1] =min 1,# $ n +1
%Nbonds & H(i, j )
d &
'
( ) )
*
+ , ,
Wang-Landau- " - - - - min 1,# $ n +1
%Nbonds & H(i, j )
d &
g(n.)
g(n. $ /n.)
'
( ) )
*
+ , ,
![Page 21: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/21.jpg)
21F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Quantum phase transitionQuantum phase transition
Bilayer Heisenberg antiferromagnet Single simulation gives results for all values of λ=J/J’
Quantum phase transition at λ=0.396
Parallelization as in thermal case!!! "+"=
= >< i
ii
p ji
pjpi SSJSSJH2,1,
2
1 ,
,, ' vvvv
![Page 22: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/22.jpg)
22F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Partial SummaryPartial Summary
Extension of multicanonical sampling / Wang-Landau algorithm to quantum
systems
Stochastically evaluate series expansion coefficients High temperatures series
Perturbation series
Features Flat histogram in the expansion order
Allows calculation of free energy
Like classical systems, allows tunneling through free energy barriers
Like classical systems, Wang-Landau algorithm has some limitations ...
!"
=
=0
)(n
nngZ #
)(0
!
!
!! ngZn
n"#
=
=
![Page 23: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/23.jpg)
23F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The sign problem and the Wang-Landau algorithmThe sign problem and the Wang-Landau algorithm
Idea : Perform simulations on unfrustrated systems, then insert factors of (-1)n
into the expansion series
Unfortunately … Does not work, even without sign problem !
Precision and cancellation issues …
Sign problem : related to cancellation of large positive and negative numbers …
n
n
ngZ !"= )(
n
n
nngZ !" #= )()1(
10 sites chain AF→F
![Page 24: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/24.jpg)
Part II :Part II :The sign problemThe sign problem
![Page 25: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/25.jpg)
25F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The The negative signnegative sign problem problem
In mapping of quantum to classical system
« Sign problem » if some of the pi<0 Cannot interpret pi as probabilities
Appears in simulation of fermions and frustrated magnets
“Way out” : Perform simulations using |pi| and measure the sign :
Sampling
[ ][ ] !
!=
"
"=
i
i
)exp(Tr
)exp(Tr
i
ii
p
pA
H
HAA
#
#
p
p
iii
iiii
i
ii
Sign
SignA
ppp
pppA
p
pA
A
sgn
sgn
ii
ii
i
i !==""
""
"
"
!=i
ip pZ ||
![Page 26: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/26.jpg)
26F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The negative sign The negative sign problemproblem
The average sign becomes very small
Both in system size and inverse temperature
This is the origin of the sign problem !
The error of the sign:
Need of the order measurements for sufficient accuracy
Similar problem occurs for the observables
Exponential growth ! Impossible to treat large systems or low temperatures
fV
p
i
i
i
p
pe
Z
Zpp
ZSign !"
=== # $sgn
1
N
e
SignNSignN
SignSign
Sign
Sign fV
p
p
p
pp
p
!
="
#
=! $1
22
)2exp( fVN != "
![Page 27: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/27.jpg)
27F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Is the sign problem exponentially hard ?Is the sign problem exponentially hard ?
The sign problem is basis-dependent Diagonalize the Hamiltonian matrix
All weights are positive : no sign problem in the eigenbasis
But this is an exponentially hard problem since dim(H)=cN ! Good news : the sign problem is basis-dependent ! (see also Nakamura, 1998)
But: the sign problem is still not solved Despite decades of attempts
Reminiscent of the NP-hard problems No proof that they are exponentially hard
No polynomial solution either
!
H i = "ii
!
A = Tr Aexp("#H)[ ] Tr exp("#H)[ ] = i Aii exp("#$
i)
i
% exp("#$i)
i
%
![Page 28: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/28.jpg)
28F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Complexity of decision problemsComplexity of decision problems
Some problems are harder that others
Complexity class P
• Can be solved in polynomial time on a Turing (deterministic) machine
• Eulerian circuit problem
• Minimum spanning tree (decision version)
Complexity class NP
• Polynomial complexity using non-deterministic algorithms
• Hamiltonian circle problem
• Traveling salesman problem (decision version)
See introduction by Mertens, 2002
![Page 29: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/29.jpg)
29F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The complexity class PThe complexity class P
The Eulerian circuit problem Seven bridges in Konigsberg crossed the river Pregel
Can we do a roundtrip by crossing each bridge exactly once ?
Is there a closed walk on the graph going through each edge exactly once ?
Looks like an extensive task by testing all possible paths
Euler : Desired path exits only if the coordination of each vertex is even
This is of order O(N2)
Concerning Konigsberg : NO !
![Page 30: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/30.jpg)
30F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The complexity class NPThe complexity class NP The Hamiltonian cycle problem
Hamilton’s Icosian game
Is there a closed walk on the graph going through each vertex exactly once ?
Looks like an extensive task by testing all possible paths
No polynomial algorithm is known
Nor a proof that it cannot be constructed
Concerning the Icosian game : YES !
![Page 31: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/31.jpg)
31F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Non-deterministic algorithmsNon-deterministic algorithms
Only a theoretical concept
Like ordinary algorithms, but can use additional instruction goto both label 1, label 2
Parallel branching of the computation
Performing an exponential number of
computations is in polynomial time
Definition of NP : A decision problem is in the class NP, iif
it can be solved in polynomial time by a
non-deterministic algorithm
Obviously Just don’t use the goto both instruction
NPP !
![Page 32: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/32.jpg)
32F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Complexity of decision problemsComplexity of decision problems
Some problems are harder that others
Complexity class P
• Can be solved in polynomial time on a Turing machine
• Eulerian circuit problem
• Minimum spanning tree (decision version)
Complexity class NP
• Polynomial complexity using non-deterministic algorithms
• Hamiltonian circle problem
• Traveling salesman problem (decision version)
Are there relations between these different problems ?
Often can use a solution for one problem to solve another
![Page 33: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/33.jpg)
33F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
NP-hardness and NP-completenessNP-hardness and NP-completeness
Polynomial reduction Two problems P and Q
: there is a polynomial algorithm for Q, provided there is one for P
Typical proof : Use the algorithm for P as a subroutine in an algorithm for Q
Many problems have been reduced to other problems
NP-hardness A problem P is NP-hard if
NP-completeness A problem P is NP-complete
If P is NP-hard and
Lots of problems in NP were shown to
be NP-complete
PQ !
PQNPQ !"# :
NPP!
![Page 34: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/34.jpg)
34F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The P versus NP problemThe P versus NP problem
Hundreds of importante NP-complete problems in computer science Despite decades of research no polynomial time algorithm has been found
Exponential complexity has not been proven either
The P versus NP problem Is P=NP or is P≠NP ?
1 million US$ for proving
either P=NP or P≠NP
(millenium challenges of the
Clay Math foundation)
The situation is similar to the sign problem Despite decades of research no general polynomial
time algorithm has been found
Exponential complexity has not been proven either
?
![Page 35: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/35.jpg)
35F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
The sign problem is NP-hardThe sign problem is NP-hard according to M. Troyer and U.-J. Wiese, cond-mat/0408370
Use the following theorem A problem P is NP-hard if
Q is the 3d classical spin glass problem
PQNPQQ !"#$ complete :
Getting the ground state of the 3d Ising spin glass is NP-hard
The NP-complete question is : « Is there a configuration with Energy ≤ E0 ? »
!
H = " Jij# j# j
i, j
$ with Jij = 0,±1Barahona, 1982
![Page 36: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/36.jpg)
36F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Frustration and Monte CarloFrustration and Monte Carlo
Frustration and Quantum Monte Carlo Negative probabilities for a worldline configuration
Due to exchange term
-Jdt
-Jdt-Jdt
Negative weight (-Jdt)3
Frustration and classical Monte Carlo Frustration leads to NP-hardness of Monte Carlo
In Monte Carlo : exponentially long tunneling and autocorrelation times
!
c1" c
2" ..." c
i" c
i+1" ...
!
"A = A # A( )2
=Var A
M(1+ 2$
A)
??
![Page 37: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/37.jpg)
37F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Solutions of the sign problemSolutions of the sign problem
Condition 2 : The sampling with respect to | pi | scales polynomially
i.e. The “bosonic” problem must be easy !
Condition 1 : Quantum system with a sign problem (some pi < 0)
[ ] [ ] !!=""=ii
)exp(Tr)exp(Tr iii ppAHHAA ##
mnN !" 2
TimeCPU#$
A solution to the sign problem is defined as an algorithm that can calculate
the average (of say, Energy) with respect to pi also in polynomial time
![Page 38: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/38.jpg)
38F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Solving a NP-hard problem by QMCSolving a NP-hard problem by QMC
View it as a quantum problem in basis where H is not diagonal
The randomness ends up in the sign of off diagonal matrix elements
Ignoring the sign gives the ferromagnet and we can use loop algorithm which scales
polynomially
A solution to the sign problem would answer the spin glass NP-complete question (just
calculate <E> at low enough temperatures)
The sign problem causes NP-hardness
Take 3D Ising spin glass
A solution to this sign problem (and thus a general solution of the sign
problem) would solve the NP-complete problems (and prove NP=P)
!
H = Jij" j" j
i, j
# with Jij = 0,±1
!
H(SG )
= Jij"xj" x
j
i, j
# with Jij = 0,±1
!
H(FM )
= " # xj# x
j
i, j
$
![Page 39: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/39.jpg)
39F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
How can we deal with the sign problem ?How can we deal with the sign problem ?
The sign problem is NP-hard (worst-case complexity) A general solution is almost certainly impossible
What can we do ? Simulate models without a sign problem
• Non-frustrated quantum magnets
• Bosonic models (atomic BEC condensates)
• (Some) fermionic models in 1d
Brute force approach• Live with the exponential scaling of the sign problem and stay on small lattices
Other exact algorithms• DMRG, exact diagonalization, series expansion … might be better
Special solutions for certain models• Meron-Cluster approach
• Special choice of basis
![Page 40: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/40.jpg)
The The meronmeron approach approach Works for specific models and parameter regimes
Uses the loop algorithm to eliminate the sign problem
Flipping a single loop can change the sign of a configuration Such loops are called “merons”
Need specific structure of the loops Must be able to flip them independently from each other
The magnitude of the weight is not affected by the meron flip All contributions to the partition function with merons then cancel
The subspace of zero merons is positive definite Can be sampled without a sign problem
Sign = -1, |W(C)| Sign = +1, |W(C’)|=|W(C)|
MeronChandrasekharan and
Wiese, 1999
![Page 41: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/41.jpg)
41F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
MeronMeron solution for frustrated magnets (I) solution for frustrated magnets (I)
Works only for the « semifrustrated » Heisenberg model
Square lattice with next nearest neighbour bonds
Frustrated because of exchange terms
Sign in SSE :
There exists a deterministic update (loop algorithm) : always “jump”
Zero-Meron sector is positive definite
Sign problem disappears in another representation (y-Basis)
Employ improved estimators Sum over all possible loop configurations
0 ,)(,
>!+=" ij
z
j
z
i
ji
ij
y
j
y
i
x
j
x
iij JSSJSSSSJH
p
p
Sign
ASignA = !
=
=
LN
L
l
lNCSign
2
1
)sgn(2
1
loffdiagonanCSign )1()( !=
![Page 42: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/42.jpg)
42F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
MeronMeron solution for frustrated magnets (II) solution for frustrated magnets (II)
Improved estimators
Sign :
Energy :
Uniform susceptibility :
Need to sample both the 0- and 2-meron sector 2-meron sector dominates, thus decreases <Sign>
Reweighting the 0-meron sector helps• Reduce acceptance of leaving the 0-meron sector
0,MnSign !=
0,
0,1
M
M
n
nn
E
!
!
"#=
0,
22,210,
22
1
M
MM
LN
n
nMMnl lmmm
!
!!
"
+
=
# =
0-meron sector
2-merons sector
![Page 43: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/43.jpg)
43F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
MeronMeron solution for frustrated magnets (III) solution for frustrated magnets (III)
The sign
Scaling reduced from
exponential to algebraic
By changing the quantization axis to the
y-direction, we can escape the sign
problem from the very beginning
0- and 2-meron sector
Unrestricted
The error of the susceptibility
Without reweighting
With optimal reweighting
Henelius and Sandvik, 2002
![Page 44: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/44.jpg)
Part III :Part III :Implementation ofImplementation ofQMC algorithmsQMC algorithms
![Page 45: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/45.jpg)
45F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Implementation of algorithmsImplementation of algorithms
Condensed matter simulations : The great status quo No “community codes” available
• Individual code for each project
• Model specific implementations
Growing complexity of methods
• Weeks to months of software development
Inputs/Outputs in non-portable format
Specialist’s work
The ALPS project (Algorithms and Libraries for Physics Simulations) International project for open source software for quantum lattice models
Generic implementation, “advanced” technologies (C++, MPI, XML…)
ALPS applications = collection of modern algorithms such as DMRG,
Exact Diagonalization, Quantum Monte Carlo (loop/worm/SSE algorithms)
Easy to use, “black box” codes
http://alps.comp-phys.org
![Page 46: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/46.jpg)
46F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Simulations with ALPS (I)Simulations with ALPS (I)
![Page 47: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/47.jpg)
47F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Simulations with ALPS (II)Simulations with ALPS (II)
Typical output output.xml
All QMC algorithms have already been implemented ! Loop algorithm
Worm Algorithm
Directed Loops
Quantum Wang Landau
Check by yourself ! http://alps.comp-phys.org
![Page 48: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/48.jpg)
48F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
ReferencesReferences Wang-Landau algorithm
F. Wang and D.P. Landau, Phys. Rev. Lett. 86, 2050 (2001); Phys. Rev. E 64,
056101 (2001)
Quantum version : M. Troyer, S. Wessel and F.A., Phys. Rev. Lett. 90, 120201 (2003)
Sign Problem Introduction to complexity classes : S. Mertens, CISE 4, 31 (2002) [also available as
cond-mat/0012185]
NP hardness of sign problem : M. Troyer and U.-J. Wiese, cond-mat/0408370
Meron-cluster approach : S. Chandrasekharan and U.-J. Wiese, Phys. Rev. Lett. 83,
3116 (1999); P. Henelius and A.W. Sandvik, Phys. Rev. B 62, 1102 (2000)
Implementation of QMC algorithms ALPS project : F.A. et al., cond-mat/0410407; http://alps.comp-phys.org
![Page 49: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/49.jpg)
49F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Summary of these lecturesSummary of these lectures
(Path integral) Quantum Monte Carlo first maps quantum systems to
classical ones Path integrals
Stochastic Series Expansion (SSE)
All classical algorithms can be used for quantum systems Local updates
Cluster updates
Multicanonical / Wang-Landau algorithms
Additional algorithms available Worm algorithm
Directed-Loop algorithm
Can simulate quantum systems as accurately as classical ones As long as there is no sign problem
![Page 50: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/50.jpg)
Merci !Merci !
![Page 51: Introduction aux méthodes de Monte Carlo Quantique en ... · de Pablo et al. (2004), Swendsen et al. (2004) Not a perfect energy random walk … Dayal et al. (2004), Trebst et al](https://reader036.vdocuments.pub/reader036/viewer/2022062608/60b2800f9294f0329d18b2c8/html5/thumbnails/51.jpg)
51F. Alet, (SPhT, CEA Saclay) – Introduction to QMC – Lecture 3 – 18/02/2005
Speedup at first order phase transitionsSpeedup at first order phase transitions
Greatly reduced tunneling times at free energy barriers 2D Hardcore bosons
!
H = "t ai†a j + h.c.( )
i, j
# +V2
nin j
i, j
#
Stripe order3/V
88
2=
!
t 3/V
88
2=
!
t
G. Schmidt