2013-07-17 19:24:07 +02:00
2013-09-17 14:55:55 +02:00
Dynamical mean-field theory on a Bethe lattice
----------------------------------------------
2013-07-17 19:24:07 +02:00
2014-01-28 12:55:33 +01:00
.. note ::
Requires TRIQS and the :doc: `application cthyb_matrix <../../applications>`
2013-08-31 00:04:09 +02:00
2013-07-17 19:24:07 +02:00
In the case of Bethe lattice the dynamical mean-field theory (DMFT) self-consistency condition takes a particularly simple form
.. math ::
G^{-1}_{0,\sigma} (i \omega_n) = i \omega_n + \mu - t^2 G_{\sigma} (i \omega_n).
2013-09-12 15:06:00 +02:00
Hence, from a strictly technical point of view, in this case the DMFT cycle can be implemented by modifying
2013-07-17 19:24:07 +02:00
the previous single-impurity example to the case of a bath with semi-circular density of states and adding a python loop to update :math: `G_0` as function of :math: `G` .
2013-09-12 15:06:00 +02:00
Here is a complete program doing this plain-vanilla DMFT on a half-filled one-band Bethe lattice:
2013-07-17 19:24:07 +02:00
2014-10-17 17:07:58 +02:00
.. runblock :: python
from pytriqs.gf.local import *
from pytriqs.operators import *
from pytriqs.archive import *
import pytriqs.utility.mpi as mpi
# Set up a few parameters
U = 2.5
half_bandwidth = 1.0
chemical_potential = U/2.0
beta = 100
n_loops = 5
# Construct the CTQMC solver
from pytriqs.applications.impurity_solvers.cthyb_matrix import Solver
S = Solver(beta = beta, gf_struct = [ ('up',[1]), ('down',[1]) ])
# Initalize the Green's function to a semi circular
S.G <<= SemiCircular(half_bandwidth)
# Now do the DMFT loop
for IterationNumber in range(n_loops):
# Compute S.G0 with the self-consistency condition while imposing paramagnetism
g = 0.5 * ( S.G['up'] + S.G['down'] )
for name, g0block in S.G0:
g0block <<= inverse( iOmega_n + chemical_potential - (half_bandwidth/2.0)**2 * g )
# Run the solver
S.solve(H_local = U * N('up',1) * N('down',1), # Local Hamiltonian
2014-10-17 18:15:19 +02:00
quantum_numbers = { 'Nup': N('up',1), 'Ndown': N('down',1) }, # Quantum Numbers (operators commuting with H_Local)
2014-10-17 17:07:58 +02:00
n_cycles = 5000, # Number of QMC cycles
length_cycle = 200, # Length of a cycle
n_warmup_cycles = 1000, # How many warmup cycles
n_legendre = 30, # Use 30 Legendre coefficients to represent G(tau)
random_name = "mt19937", # Use the Mersenne Twister 19937 random generator
use_segment_picture = True) # Here we can use the segment picture
# Some intermediate saves
if mpi.is_master_node():
R = HDFArchive("single_site_bethe.h5")
R["G-%s"%IterationNumber] = S.G
del R
# Here we would usually write some convergence test
2014-10-17 18:15:19 +02:00
# if Converged: break
2013-07-17 19:24:07 +02:00