AA QuickQuick introductionintroduction toto QuantumQuantum MonteMonte CarloCarlo methodsmethods
Fabien Alet LPT, Univ. Paul Sabatier Toulouse
Contact : [email protected]
ALPS Tutorial – PSI 08/09/2006 1 QuantumQuantum MonteMonte CarloCarlo What is Quantum Monte Carlo (QMC) ? Most general definition: “A stochastic method to solve the Schrödinger equation” QMC comes in many different flavours Zero Temperature or T ≠ 0 ×2 Statistics of particles : Fermions, Bosons or “Boltzmannons” ×3 Continuum or discrete space ×2 Finite number of particles or Thermodynamic limit ×2
… At least 24 different QMC communities ! Today Spin models on lattice : finite T, Bosons (spins), Discrete space, Thermodynamic limit Performances 6 Large systems ( ≈ thermodynamic limit, ≈ T=0) : up to 10 spins ! Quantitative modeling of quantum magnets Accurate description of phase transitions, Asymptotic regime (critical exponents)
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 2 QMCQMC == aa largelarge familyfamily treetree « Variational Monte Carlo » family « Diffusion Monte Carlo » family Projector Monte Carlo, Green Function Monte Carlo, Diffusion Monte Carlo (+ Fixed Node, + Stochastic Reconfiguration) … (Partial) Ref. for lattice models : S. Sorella and L. Capriotti, Phys. Rev. B 61, 2599 (2000)
« Determinental Monte Carlo » family Auxiliary Field Monte Carlo, Determinental Monte Carlo, Hirsch-Fye … (Partial) Ref. for lattice models : F. F. Assaad, Lecture Notes, NIC series 10, 99 (2003)
« Path integral Monte Carlo » family Lattice systems (cluster algorithms) Basic Idea : Mapping Quantum system in dimension d → Classical system in dimension d+1 Then do classical Monte Carlo on the equivalent problem
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 3 AA QuickQuick introductionintroduction toto QuantumQuantum MonteMonte CarloCarlo methodsmethods forfor latticelattice quantumquantum spinspin modelsmodels
Derivation of configuration space : Path integral approach Monte Carlo moves : quantum cluster algorithms The sign problem Practical considerations
ALPS Tutorial – PSI 08/09/2006 4 Quantum Monte Carlo simulations
Not as « easy » as classicalβ Monte Carlo Z = Tr e− H = ∑e−βEc c
Calculating the energy eigenvalue Ec = solving the problem Need to find a mapping of the quantum partition function to a
classical problem −βH Z = Tr e ≡ ∑ pc c Different approaches Path integrals (time-dependent perturbation theory in imaginary time) Stochastic Series Expansion (high temperature expansion)
Sign problem if some pc < 0 (thus try to avoid this) Then need efficient updates for the equivalent classical problem
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 5 Hamiltonian of spin ½ models Example : XXZ model in a field
Anisotropic exchange interactions : JXY , JZ Magnetic field h x x y y z z z H XXZ = ∑ J XY (Si S j + Si S j ) + J z Si S j − h∑ Si i, j i
J XY + − − + z z z = ∑ (Si S j + Si S j ) + J z Si S j − h∑ Si i, j 2 i
Heisenberg model : JXY = JZ = J r r H = J S S − h S z ∑ i j ∑ i ⎛ J z ⎞ i, j i ⎜ + h 0 0 0 ⎟ ⎜ 4 ⎟ J J Hamiltonian matrix in 2-site basis ⎜ 0 − z xy 0 ⎟ ⎜ ⎟ H = 4 2 ij ⎜ J J ⎟ ⎜ 0 xy − z 0 ⎟ ⎜ 2 4 ⎟ { ↑↑ , ↑↓ , ↓↑ , ↓↓ } ⎜ J z ⎟ ⎜ 0 0 0 − h⎟ ⎝ 4 ⎠
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 6 Trotter decomposition Basis of most QMC algorithms Here : Generic mapping of a quantum spin system onto a classical Ising model Not limited to special cases Split Hamiltonian into two easily diagonalizable pieces H(1) H(2) H(3) H(4) ε H H = H1 + H 2 ε = H1 − H − H1 −εH 2 2 e = e β e + O(ε ) + H β 2 Obtain a decomposition of the partition function τ
− H − (H1 +H 2 ) −Δτ (H1 +H 2 ) M Z = Tr e τ = Tr e τ = Tr[(e ) ] (Δτ = β / M ) = Tr[(e−Δ H1 e−ΔτH 2 )M ]+ O(Δτ 2 ) τ Insert 2M sets of complete basis states
−Δ H1 −Δ H 2 −Δ H1 −ΔτH 2 = ∑ i1 e i2M i2M e i2M −1 ⋅⋅⋅ i3 e i2 i2 e i1 i1 ,...,i2 M
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 7 Example : Spin ½ Heisenberg model τ Quantum problem in d dimensions maps onto a classical problem in d+1 τ z Expand the states iα in the S eigenbasis Effective Ising-model in d+1 dimensions with 2- and τ4-sites interaction terms
−Δ H1 −Δ H 2 −Δ H1 −ΔτH 2 Z = ∑ i1 e i2M i2M e i2M −1 ⋅⋅⋅ i3 e i2 i2 e i1 i1 ,...,i2 M
Each of the matrix elements
−ΔτH1,2 i j+1 e i j
corresponds to a row of shaded plaquettes and Conservation of equals the product over magnetization : those plaquettes Continuous worldlines
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 8 Weights for the spin ½ Heisenberg model The partition function becomes a sum of products of plaquette weights
Z = ∑W (C) =∑ ∏ w(C p ) C C plaquettes p The only allowed plaquette-configurations are (here h=0)
e−ΔτJ / 4 eΔτJ /4ch(ΔτJ / 2) eΔτJ /4sh(−ΔτJ /2)
Ferromagnet (J<0) : All weights are positive Antiferromagnet on a bipartite lattice : perform a gauge transformation on one sublattice J S ± → (−1) i S ± J ()S + S − + S −S + ⎯⎯→i ⎯⎯⎯⎯⎯i − ()S + S − + S −S + 2 i j i j 2 i j i j Frustrated antiferromagnet : we have a sign problem
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 9 Worldline approach : Summary Each valid configuration = continuous worldlines on checkerboard
W (C) = ∏ w(C p ) plaquettes p
e−ΔτJ / 4 eΔτJ /4ch(ΔτJ / 2) eΔτJ /4sh(−ΔτJ /2)
Worldline QMC = Sampling over all (important) worldline configurations According to the above weight Try to generate a new configuration from a given one Already 2 problems arise …
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 10 Intermezzo 1 : Stochastic Series Expansion (SSE) Intermezzo 1 : Stochasticβ Series Expansion (SSE) Alternative approach : Expansion in inverse temperature (Sandvik, 1992) β β ∞ n Z = Tr(e− H ) = Tr(−H n ) ∑ H = H n=0 n! ∑ b α b=(i, j) ∞ n n = (−H ) α ∑ ∑∑ ∏ bi n=0 n! α ()b1 ,...,bn i=1
Using the bond Hamiltonians configuration i operator
J xy d o + − − + 5 H (1,2) H (i, j) = (Si S j + Si S j ) o 2 4 H (3,4) d 3 H (3,4) d z z h z z o H = J S S − ()S + S 2 H (3,4) (i, j) z i j i j d z 1 H (1,2) 1 2 3 4 Similar to path integral approach (Minor) difference in the treatment of diagonal terms
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 11 1st solved problem : the continuous time limit Systematic error due to finite value of Δτ (« Trotter error ») Need to perform an extrapolation to Δτ → 0 from simulations with different values of Δτ (or Trotter number M)
The limit Δτ → 0 can be taken directly in the construction of the algorithm ! (Prokof’ev et al., 1996)
Number of changes ΔτJ βJ N = M → c 2 2 stays finite as Δτ → 0
Different computational approach: Discrete time : store configuration at all time steps Continuous time : store times at which configuration changes (+ initial state)
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 12 2nd solved problem solved Shift a kink
Insert or remove two kinks (kink-antikink pair creation process)
Problems with local updates Restricted to canonical ensemble No change of magnetization, particle number, winding number Critical slowing down Solution for classical Monte Carlo was cluster algorithms Generalization to quantum case is possible ! Loop, Directed loops, Worm algorithms Worm algorithm : intuitive view Q : How to update non-locally this configuration ?
1 2 3 4 5 (SSE Representation)
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 14 Worm algorithm : intuitive view
1) Insert a worm (head and tail)
1 2 3 4 5
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 15 Worm algorithm : intuitive view
1) Insert a worm (head and tail)
2) Move the worm head – Modify locally the configuration on the fly
1 2 3 4 5
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 16 Worm algorithm : intuitive view
1) Insert a worm (head and tail)
2) Move the worm head – Modify locally the configuration on the fly 3) At every “vertex” : Choose an exit
1 2 3 4 5 “straight” “jump” “turn” “bounce”
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 17 Worm algorithm : intuitive view
1) Insert a worm (head and tail)
2) Move the worm head – Modify locally the configuration on the fly 3) At every “vertex” : Choose an exit “straight”, “jump”, “turn”, “bounce”
1 2 3 4 5
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 18 Worm algorithm : intuitive view
1) Insert a worm (head and tail)
2) Move the worm head – Modify locally the configuration on the fly 3) At every “vertex” : Choose an exit “straight”, “jump”, “turn”, “bounce”
1 2 3 4 5
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 19 Worm algorithm : intuitive view
1) Insert a worm (head and tail)
2) Move the worm head – Modify locally the configuration on the fly 3) At every “vertex” : Choose an exit “straight”, “jump”, “turn”, “bounce”
4) Annihilate worms
1 2 3 4 5
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 20 Worm algorithm : intuitive view
1) Insert a worm (head and tail)
2) Move the worm head – Modify locally the configuration on the fly 3) At every “vertex” : Choose an exit “straight”, “jump”, “turn”, “bounce”
4) Annihilate worms
NEW CONFIGURATION
1 2 3 4 5
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 21 Intermezzo 2 : How to choose the worm’s moves ? Given a “vertex” (plaquette) configuration and an entrance leg, where to exit ? Consider exit leg e, given entrance leg i at a vertex in configuration c –weight w(c) Assign this path a probability P(e | i,c) Sum over all paths must equal unity ∑ P(e | i,c) =1 e J h w(c) = − Z + 2 z
P(1|1,c) P(2 |1,c) P(3|1,c) P(4 |1,c) Choose exit leg e with probability P(e | i,c) leading to configuration c – weight w(c) Consider the reverted pathP(i | e,c) , leading back to c
Impose Local detailed balance P(e | i,c)w(c) = P(i | e,c)w(c)
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 22 Quantum cluster algorithms Tiny differences in how the worm exactly moves lead to different algorithms Worm algorithm : random Metropolis move Directed loop algorithm : locally improved « clever » move Loop algorithm : deterministic move Difference in Representation SSE : usually slighlty faster Path Integral (PI) : good when large diagonal terms Codes in ALPS : Which qlgorithm to choose ? looper = Loop algorithm in PI/SSE : For models with spin inversion symmetry e.g. : Heisenberg, XY, XXZ model wihout field dirloop-sse = Directed loops in SSE : Models without inversion symmetry (most genera e.g. : models with field, boson models etc worm = Worm algorithm in PI : Models with large diagonal elements e.g. : large Ising anisotropy All these algorithms give accurate results for large systems … Intermezzo 3 : The sign problem
In mapping of quantum to classical system
∑ Ai pi Tr[]Aexp(−β H ) i A = []= Tr exp(−βH ) ∑ pi i
« 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 :
∑ Ai pi ∑ Ai sgn pi pi ∑ pi A Sign A = i = i i ≡ p p sgn p p p Sign ∑ i ∑ i i ∑ i p i i i
Sampling Z| p| = ∑ pi i
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 24 Intermezzo 3 : The sign problem
The average sign becomes very small 1 Z Sign = sgn p p = = e−βVΔf p ∑ i i Z p i Z p Both in system size and inverse temperature This is the origin of the sign problem !
The error of the sign:
2 2 Sign − Sign 1 βVΔf ΔSign p p p e = ≈ = Sign N Sign N Sign N p p p Need of the order N = exp(2βVΔf ) measurements for sufficient accuracy Similar problem occurs for the observables Exponential growth ! Impossible to treat large systems or low temperatures
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 25 In practice, what can I do ?
Simulate large samples of lattice quantum spin models For non-frustrated models (Note : Diagonal (Ising) frustration is OK) This includes most Heisenberg-like models XY, Ising anisotropy, magnetic field, all values of S, single-ion anisotropy, … Frustrated models are possible : but quickly sign problem arises In all dimensions on all lattices (one can define its own specific lattice) For all values of T (including T→0) Which quantities are accessible ? A lot of observables : Energy, Specific heat, Susceptibilities, Structure factor, Spin stiffness, Green functions … In some cases : one can define its own observable How much time ? Typically simulation time scales as Number of spins x Inverse Temperature For more details : see hands-on session …
F. Alet (Toulouse) – Introduction to QMC – ALPS Tutorial PSI 26 ThanksThanks !!
ALPS Tutorial – PSI 08/09/2006 27