Analytic Continuation of G_iw
Closed this issue · 4 comments
Dear all:
I used the following script to get the Matsubara frequency Green's function. How to use MaxEnt to get it in the real frequency?
from triqs.gf import *
from triqs.operators import *
from h5 import *
import triqs.utility.mpi as mpi
from triqs_cthyb import Solver
# 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
S = Solver(beta = beta, gf_struct = [ ('up',1), ('down',1) ])
# Initalize the Green's function to a semi circular DOS
S.G_iw << SemiCircular(half_bandwidth)
# Now do the DMFT loop
for i_loop in range(n_loops):
# Compute new S.G0_iw with the self-consistency condition while imposing paramagnetism
g = 0.5 * (S.G_iw['up'] + S.G_iw['down'])
for name, g0 in S.G0_iw:
g0 << inverse(iOmega_n + chemical_potential - (half_bandwidth/2.0)**2 * g)
# Run the solver
S.solve(h_int = U * n('up',0) * n('down',0), # Local Hamiltonian
n_cycles = 5000, # Number of QMC cycles
length_cycle = 200, # Length of a cycle
n_warmup_cycles = 1000) # How many warmup cycles
oplot(S.`G_iw`)
I went through few example in the Documentation, but I failed to do it for this simple case.
Could anyone please tell me which example in the Documentation is suitable for this case?
Yes please try to follow this tutorial: https://triqs.github.io/maxent/latest/guide/tau_maxent.html to continue the S.G_tau
object of the solver in the above example you posted. Note, that your Green's function is a block Gf so you may want to first give to maxent S.G_tau['up']
later you can also continue the full block Gf: https://triqs.github.io/maxent/latest/guide/blockgf.html .
It works, thank you so much.
@abdelghany0 Please close this issue if resolved. Thank you!