Diagrammatic (continuous-time)
quantum Monte Carlo Methods
Part 1: classical and quantum spins
Matthias Troyer (ETH Zürich)
Collaborators on algorithm development
ETH Zürich
• P. Corboz
• E. Gull
• H. Katzgraber
Universität Stuttgart
• S. Wessel
Universität Graz
• H.G. Evertz
Université de Toulouse
• F. Alet
Microsoft and UC Santa Barbara
• S. Trebst
University of Tokyo
• N. Kawashima
• S. Todo
Kyoto University
• K. Harada
Princeton University
• D. Huse
Columbia University
• A. Millis
• P. Werner
University of Massachusetts
• E. Burovski
• N. Prokof’ev
• B. Svistunov
Lecture overview
•
First lecture (today)
•
•
•
•
•
Introduction to the Monte Carlo methods
Diagrammatic QMC for bosons and spins
The loop and worm algorithms
The ALPS project and applications
Second lecture (tomorrow)
•
•
•
Diagrammatic QMC for fermions
QMC solvers for the quantum impurity problem
Applications
Accurate numerical simulations
•
“You let the computer solve the problem for you”
•
It’s not that easy even for simple toy models:
•
Exponentially diverging number of states
• 1 site: q states
•
✔
N sites: qN states
•
Critical slowing down of the dynamics at phase transitions
•
negative sign problem for fermions (NP-hard)
✔
?
Ulam: the Monte Carlo Method
•
What is the probability to win in Solitaire?
•
Ulam’s answer: play it 100 times, count the number of wins and
you have a pretty good estimate
The Monte Carlo Method
•
Overcome exponential growth of the Hilbert space by
stochastic sampling
observable lim
1
!A" =
Z
•
N
!
L→∞
M
!
1
Ai pi
N
!A"!
≈A=
Aci
1
M i=1
i=1
!A" = lim
Ai pi
L→∞
Z i=1 "
statistical
weight
!A2 " − !A"2
∆A =
N from
∝ exp(cL)
M sample
Evaluate phase space average
a representative
with correct weights
•
pci M % N
P [ci ] =
Z
The statistical error is independent of the system size
∆A =
!
VarA
M
I
n putting together this issue of Computing in
Science
&E
Engineering,
things:
GU
S T E D I we
T Oknew
R S three
’
I N be
TR
O D UtoClist
T Ijust
ON
it would
difficult
10 algorithms;
it would be funt to
heassemble
Top the authors and
read their papers; and, whatever we came up
with in the end, it would be controversial. We
tried to assemble the 10 algorithms with the greatest
influence on the development and practice of science
and engineering in the 20th century. Following is our
list (here, the list is in chronological order; however,
the articles appear in no particular order):
•
•
•
•
•
•
•
•
•
•
hand in developing the algorithm
the author is a leading authority.
In t his issue
Monte Carlo methods are powe
ating the properties of complex, m
as well as nondeterministic process
Francis Sullivan describe the Me
We are often confronted with pro
enormous number of dimensions
volves a path with many possible
Metropolis Algorithm for Monte Carlo
of which is governed by some fund
Simplex Method
for Linear Programming
of occurence. The solutions are no
n putting together this issue of Computing in hand in developing the algorithm, and in other cases,
Krylov Subspace
Iteration
way, because
authority. we randomly sample
Science & Engineering,
we Methods
knew three things: the author is a leading
it would be difficult to list just 10 algorithms;
The Decompositional
Approach to Matrix ever, it is possible to achieve nearly
it would be fun to assemble the authors and
read their papers; and, whatever we came up In t his issuerelatively small number of sampl
Computations
with in the end, it would be controversial. We
Monte Carlo methods are powerful tools for evaluThe Fortran
Optimizing
Compiler
problem’s
dimensions.
Indeed, Mo
tried to assemble the 10 algorithms with the greatest ating the properties
of complex,
many-body systems,
influence on thefor
development
and practice
of science as well as nondeterministic
processes.
Isabel Beichl
and
QR Algorithm
Computing
Eigenvalues
are the only
practical
choice
for eva
and engineering in the 20th century. Following is our Francis Sullivan describe the Metropolis Algorithm.
Quicksort
for Sorting
high dimensions.
list (here,Algorithm
the list is in chronological
order; however, We are often confronted
with problems that have an
the articles appear
in no particular order):
enormous number John
of dimensions
or adescribes
process that inFast Fourier
Transform
Nash
the Simpl
volves a path with many possible branch points, each
Integer• Relation
Detection
ing bylinear
programming
Metropolis Algorithm
for Monte Carlo
of which is governed
some fundamental
probability problem
• Simplex Method
for Linear Programming
of occurence. The
solutions
are not exact in a rigorous
Fast Multipole
Method
word
programming
here really ref
• Krylov Subspace Iteration Methods
way, because we randomly sample the problem. Howplanning—and
the
• The Decompositional Approach to Matrix ever, it is possible
to achieve nearly exactnot
resultsin
using
a way tha
I
The Metropolis Algorithm (1953)
Markov chains and Metropolis algorithm
•
Instead of drawing independent samples ci we build a Markov
chain
c1 → c 2 → ... → c i → c i+1 → ...
•
Transition probabilities Wx,y for transition x → y need to fulfill
•
Ergodicity: any configuration reachable from any other
∀x, y ∃n : (W n ) x,y ≠ 0
•
Detailed balance: sufficient condition to obtain correct distribution
W x,y py
=
W y,x px
•
Simplest solution is Metropolis algorithm: W x,y = min[1, py px ]
The Metropolis Algorithm (1953)
•
creates a representative sample for any system
start with a configuration i
propose a small change to a configuration j
calculate the ratio of weights
pj
p
pji
!
"
pi
pwith
accept the new configuration
probability
j
P = min ! 1, "
ppji
P = min 1,
pi
Autocorrelation effects
•
The Metropolis algorithm creates a Markov chain
c1 → c 2 → ... → c i → c i+1 → ...
•
successive configurations are correlated, leading to an
increased statistical error
ΔA =
(A − A
)
2
=
Var A
(1+ 2τ A )
M
•
Critical slowing down at second order phase transition
•
Exponential tunneling problem at first order phase transition
τ ∝ L2
τ ∝ exp(Ld −1 )
From local to cluster updates
•
Energy of configurations in Ising model
•
•
•
– J if parallel:
+ J if anti-parallel:
Probability for flip
•
Anti-parallel: flipping lowers energy, always accepted
ΔE = −2J ⇒ P = min(1,e−2ΔE /T ) = 1
•
Parallel:
ΔE = +2J ⇒ P = min(1,e−2ΔE /T ) = exp(−2βJ)
no change with probability
1−
exp(−2βJ) !!!
Alternative: flip both!
P = exp(−2J /T)
P = 1− exp(−2J /T)
Swendsen-Wang Cluster-Updates
•
Ask for each spin: “do we want to flip it against its neighbor?”
•
•
antiparallel: yes
parallel: costs energy
•
•
•
P = exp(−2βJ)
Accept with Otherwise: also flip neighbor!
Repeat for all flipped spins => cluster updates
√?
√√
√√
√√
√√
√√
√√
?
√
√?
√√
√√?
Shall we flip neighbor?
?
√
?√
?
?
√√
?
?
?
?
•
P = 1− exp(−2βJ)
√
√?
Done building cluster
Flip all spins in cluster
No critical slowing down (Swendsen and Wang, 1987) !!!
First order phase transitions
•
Tunneling problem at a first order phase transition is solved
by changing the ensemble to create a flat energy landscape
•
•
•
•
Multicanonical sampling (Berg and Neuhaus, Phys. Rev. Lett. 1992)
Wang-Landau sampling (Wang and Landau, Phys. Rev. Lett. 2001)
Quantum version (MT, Wessel and Alet, Phys. Rev. Lett. 2003)
Optimized ensembles (Trebst, Huse and MT, Phys. Rev. E 2004)
? ?
liquid
solid
Quantum Monte Carlo
•
Not as easy as classical Monte Carlo
Z = ∑ e−E c / kB T
c
•
Calculating the eigenvalues Ec is equivalent to solving the problem
•
Need to find a mapping of the quantum partition function
to a classical problem
Z = Tr e− βH ≡ ∑ pc
c
•
“Negative sign” problem if some pc < 0
The Suzuki-Trotter Decomposition
•
Generic mapping of a quantum spin system to Ising model
•
•
•
basis of most discrete time QMC algorithms
not limited to special models
Split Hamiltonian into two easily diagonalized pieces
H
H = H1 + H 2
e
=e
−ε ( H1 + H 2 )
=e
−εH1 −εH 2
e
=
+
+ O(ε )
2
H2
Obtain the checkerboard decomposition
Z = Tr [exp(−βH)] = Tr [e− β ( H1 + H 2 ) ]
= Tr [e
]
−( β / M )H1 −( β / M )H 2 M
e
+ O(β 3 / M 2 )
imaginary time
•
−εH
H1
space direction
Diagrammatic QMC
•
A Russian contribution to QMC (N.V. Prokof ’ev, 1996)
•
Suzuki-Trotter decomposition is just an unnecessarily
complicated way of doing a diagrammatic expansion
•
We know how to do diagrammatic expansions
•
No discrete time is needed
•
Let’s just sample the diagrammatic expansions directly
Diagrammatic QMC
•
•
Split the Hamiltonian into diagonal term H0 and perturbation V
Then perform time-dependent perturbation theory
H = H0 + V, H0 =
∑ Jij Si S j − ∑ hSi , V = ∑ Jij (Si Sj + Si Sj )
z
z
z
z
<i , j >
xy
x
x
y
< i, j >
i
β
Z = Tr(e
− βH
) = Tr(e − βH0 Te ∫0
− dτV (τ )
)
β
β
β
0
0
τ1
Z = Tr(e − βH0 (1 − ∫ dτV (τ ) + ∫ dτ 1 ∫ dτ 2 V (τ 1 )V (τ 2 ) + ...))
•
Each term is represented by a diagram (world line configuration)
τ
τ2
τ1
y
Convergence Issues
•
•
“But perturbation series do not converge!”
Wrong: we have no convergence problems because
•
•
•
•
The lattice regularizes the UV divergences!
We sample all diagrams and not only connected ones:
The 1/n! term ensures absolute convergence!
We sample finite volumes and temperatures
only finite number of orders contribute
Advantages of continuous time:
•
•
•
no systematic errors from discrete time step in a single simulation
no need to extrapolate in discrete time step, about 10 times faster
more general: any (positive) diagrammatic expansion can be used
Calculating configuration weights
!
−
Z = Tr e−βH0 T e
•
"β
0
dτ V(τ )
#
Examples: particles with nearest neighbor repulsion
H0 = V
!
V = −t
ni nj
!i,j"
!
!i,j"
β
τ2
τ1
0
β
τ2
τ1
0
1
t2 dτ1 dτ2
(a†i aj + a†j ai )
e−βV
e−τ1 V e−(β−τ2 )V t2 dτ1 dτ2
Updates in continuous time
•
Shift a kink to any new position:
•
Insert a pair of kinks:
Λ
τ2
τ1
0
P =1
vanishing
acceptance rate
P = (Δτt ) → 0
2
P→ = min[1,(Δτt) 2 ] → 0
solution:
integrate over a! possible
insertions in an interval
P=
Λ Λ
∫
0
2 2
Λ
t
2
∫ t dτ 2dτ1 = 2 ≠ 0
τ1
P→ = min[1,Λ2 t 2 /2] ≠ 0
Stochastic Series Expansion (SSE)
•
•
is a simpler diagrammatic expansion based on high temperature
expansion, developed by A. Sandvik
perturbs in all terms of the Hamiltonian: just a Taylor series
n
β
Z = Tr(e− β H ) = ∑ Tr ⎡⎣(− H ) n ⎤⎦
n=0 n!
∞
βn
=∑
α1 − H α 2 α 2 − H α 3 ⋅ ⋅ ⋅ α n − H α1
∑
n=0 n! α1 ,...,α n
∞
•
Again has a graphical, diagrammatic representation
Hb
1
Hb
2
Hb
1
•
Very simple since only operator order is important, no time needed
Problems with local updates
•
In addition to critical slowing down, local updates cannot
change global topological properties
• number of world lines (particles, magnetization) conserved
• winding conserved
• braiding conserved
• cannot sample grand-canonical ensemble
•
We need non-local update algorithms
•
Loop algorithm (Evertz et al, 1993)
is a generalization of cluster updates to world lines
•
Worm algorithm (Prokof ’ev et al, 1998)
The loop algorithm (Evertz et al)
•
•
Swendsen-Wang cluster algorithm for the Ising model
•
two choices on each bond: connected (flip both spins) or disconnected
•
all connected spins are flipped together
Loop algorithm is a generalization to quantum systems
•
•
world lines may not be broken
•
four different connection types
always 2 or 4 spins must be flipped together
Loop-cluster updates
1. Connect spins according to loop-custer building rules
2. Build and flip loop-cluster
The worm algorithm
•
Break a world line by inserting a pair of creation/annihilation operators
H ← H + η∑ (c †i + c i )
i
•
•
H ← H + η∑ ( Si+ + Si− )
i
move these operators (“Ira” and “Masha”) using local moves
until Ira and Masha meet
insert worm
move worm
shift
remove jump
insert jump
continue until head and tail meet
When to use which algorithm?
•
•
•
Stochastic Series Expansion (SSE) is simpler to implement
Continuous-time path integrals needs lower orders
Use SSE for local actions with not too large diagonal terms
SSE
Path Integrals
Loop algorithm
Spin models
Spin models
with dissipation
Worm algorithm
Spin models
in magnetic field
Bose-Hubbard models
State-of-the-art algorithms
•
•
Which system sizes can be studied?
temperature
Metropolis
modern algorithms
1
16’000 spins
16’000’000 spins
0.1
200 spins
1’000’000 spins
0.1
32 bosons
10’000 bosons
0.005
–––
50’000 spins
Open source codes available at http://alps.comp-phys.org/
The ALPS project
Algorithms and Libraries for Physics Simulations
•
open source data formats,
libraries and simulation codes
for quantum lattice models
•
download codes from website
http://alps.comp-phys.org
The ALPS collaboration
ETH Zürich, Switzerland
• Philippe Corboz
• Emanuel Gull
• Munehisa Matsumoto
• Lode Pollet
• Matthias Troyer
IRRMA Lausanne, Switzerland
• Andreas Läuchli
RWTH Aachen, Germany
• Ulrich Schollwöck
• Ian McCulloch
Universität Marburg, Germany
• Reinhard Noack
• Salvatore Manmana
Universität Göttingen, Germany
• Sebastian Fuchs
• Andreas Honecker
• Thomas Pruschke
Universität Stuttgart, Germany
• Stefan Wessel
Université de Toulouse, France
• Fabien Alet
TU Graz, Austria
• Franz Michel
Microsoft, Santa Barbara, USA
• Adrian Feiguin
• Simon Trebst
Columbia University, USA
• Philipp Werner
Honk Kong University, China
• Siegfried Gürtler
University of Tokyo, Japan
• Ryo Igarashi
• Synge Todo
Simulation codes of
quantum lattice models
•
The status quo
•
•
•
•
individual codes
model-specific implementations
growing complexity of methods
ALPS
•
•
•
•
community codes
generic implementations
simplified code development
common file formats
Key Technologies
Generic Programming in C++
• flexibility
• high-performance
Standard C++ Libraries
• fast development
XML / XSLT for Input/Output
• portability
• self-explanatory
MPI/OpenMP for Parallelization
Simulations with ALPS
Lattice
Model
Parameters
<LATTICEGRAPH name = "square lattice">
<FINITELATTICE>
<LATTICE dimension="2"/>
<EXTENT dimension="1" size="L"/>
<EXTENT dimension="2" size="L"/>
<BOUNDARY type="periodic"/>
</FINITELATTICE>
<UNITCELL>
...
</UNITCELL>
</LATTICEGRAPH>
<BASIS>
<SITEBASIS name="spin">
<PARAMETER name="S" default="1/2"/>
<QUANTUMNUMBER name="Sz" min="-S" max="S"/>
</SITEBASIS>
</BASIS>
LATTICE = “square lattice”
L = 100
<HAMILTONIAN name="spin">
<BASIS ref="spin"/>
<SITETERM> -h*Sz </SITETERM>
<BONDTERM source="i" target="j”>
Jxy/2*(Splus(i)*Sminus(j)+Sminus(i)*Splus(j))
+ Jz*Sz(i)*Sz(j)
</BONDTERM>
</HAMILTONIAN>
MODEL
Jxy =
Jz =
h
=
= “spin”
1
1
0
{
{
{
{
0.1
0.2
0.5
1.0
T
T
T
T
=
=
=
=
}
}
}
}
quantum system
Quantum Monte Carlo
Exact diagonalization
Results
DMRG
Current applications
•
Classical Monte Carlo
•
•
Quantum Monte Carlo
•
•
•
•
•
stochastic series expansions (SSE), F. Alet, L. Pollet, M. Troyer
loop code for spin systems, S. Todo
continuous time worm code, S. Trebst, M. Troyer
extended ensemble simulations, S. Wessel, N. Stoop
Exact diagonalization
•
•
local and cluster updates for classical spin systems, M. Troyer
full and sparse, A. Honecker, A. Läuchli, M. Troyer
DMRG
•
•
single particle, S. Manmana, R. Noack, I. McCulloch
interacting particles, A. Feiguin
Spin-1 material La2NiO4
Experiment
Endoh et al.
Hasenfratz et al.
QMC simulation
Harada, Troyer und Kawashima
correlation length
quantum field theory
X
10
experiment
field theory
simulation
semi classical
Korrelationslänge
semiclassical theory
Cuccoli et al.
quantum effects are minimal
1
2.5
3
3.5
4
4.5
5
5.5
inverse temperature J/T
6
Spin-1/2 material Sr2CuO2Cl2
Experiment
Quantum field theory
Hasenfratz et al.
QMC simulation
1 million spins
(Kim, Troyer, Landau, 1997)
!""
X
correlation length
Greven et al.
!"
experiment
field theory
simulation
semi-classical
Korrelationslänge
Semiclassical theory
Cuccoli et al.
#
quantum effects are important
#$%
&
&$%
'
'$%
inverse temperature J / T
%
Quantum spin liquid in ladders
Quantum effects are even stronger in ladder geometries
•
•
destroy the magnetic order
simulations enables to determine the coupling constants
12
Uniform magnetic susceptibility
•
10
J/kB = 1904 K
8
J'/k B = 929 K
6
Experiment
4
Simulation with
impurities
2
0
Simulation
0
200
400
T [K]
600
Ab-initio simulations of
quantum magnets
•
Simulate realistic magnetic models instead of toy models
•
•
•
simulate quantum spin models using these exchange constants
Was done by hand in the past
•
•
•
obtain microscopic exchange constants from LDA+U
CaV2O3, MgV2O3, CaV3O7, CaV4O9, SrCu2O3, ...
Korotin, Elfimov, Anisimov, Troyer and Khomskii, PRL ’99
Can we automate this?
ALPS interface to
band structure codes
•
ORNL has developed standard XML formats and helper
libraries for band structure codes
•
Implementation in Stuttgart TB-LMTO-ASA band
structure code by Anton Kozhevnikov (Ekaterinburg)
•
Simple tool creates ALPS input files (lattice, model) from
XML output of LDA+U code
•
Automated workflow from crystal structure to magnetic
properties
Band-structure
codes:
TB-LMTO-ASA
ESPRESSO
Projected Hamiltonian H(k)
Hopping parameters tij
Coulomb repulsion parameter U
Heisenberg exchange parameters Jij
Model codes:
DMFT (QMC) code
ALPS
WIEN2K
Exchange parameters for SrCu2O3
Results of ab-initio calculation:
SrCu O
2
0.0001
3
Experiment
LDA+U+ALPS
χ [emu / mol]
8 10-5
X
6 10-5
4 10-5
2 10-5
0
Y
0
100
200
300
T [K]
400
500
600
Summary part 1
•
Diagrammatic QMC methods plus nonlocal updates
•
•
•
•
•
solve critical slowing down
•
O(N) methods for second order phase transitions
•
O(N2) methods for first order phase transitions
continuous time for lattice systems
discrete time or momentum cutoff needed for continuum systems
codes available in the ALPS project
Successful applications
•
•
•
(nonfrustrated) quantum magnets
bosonic lattice models (cold atoms in optical lattices, supersolids)
bosons in the continuum (superfluid, solid and supersolid Helium)
© Copyright 2026 Paperzz