TRIQS / triqs_0.x

DEPRECATED -- This is the repository of the older versions of TRIQS
Other
11 stars 9 forks source link

Problem with analytical continuation of data using pade and How to get statistical errors for G and Sigma. #142

Closed dasari123 closed 10 years ago

dasari123 commented 11 years ago

Hi,

I have few doubts and problems while using triqs please give me some help?

1) I run the Hybridization solver with in DMFT for single band Hubbard Model(Bethe lattice). I used Pade approximation to get the spectral function. I am not getting a proper spectral function for the above model i.e Hubbard band positions and quasi-particle peak I can't see it. I didn't understand why it is? I attached the input file for DMFT as well as analytical continuation of the data.

from pytriqs.Base.GF_Local import from pytriqs.Base.Archive import import pytriqs.Base.Utility.MPI as MPI import numpy

Set up a few parameters

Half_Bandwidth = 1.0 U = 2.0 Chemical_Potential = U/2.0 Beta = 100 N_loops = 10

Construct a CTQMC solver

from pytriqs.Solvers.Operators import * # imports the class manipulating C, C_dagger and N = C_dagger C from pytriqs.Solvers.HybridizationExpansion import Solver # imports the solver class S = Solver(Beta = Beta, # inverse temperature GFstruct = [ ('up',[1]), ('down',[1]) ], # Structure of the Green function H_Local = U * N('up',1) * N('down',1), # Local Hamiltonian

     Quantum_Numbers = { 'Nup' : N('up',1), 'Ndown' : N('down',1) },    # Quantum Numbers (operators commuting with H_Local)
       N_Cycles = 100000,                                                   # Number of QMC cycles
       Length_Cycle = 1000,                                                # Length of a cycle
       N_Warmup_Cycles = 1000,                                            # How many warmup cycles
       N_Legendre_Coeffs = 30,                                            # Use 30 Legendre coefficients to represent G(tau)
       Random_Generator_Name = "mt19937",                                 # Use the Mersenne Twister 19937 random generator
       Use_Segment_Picture = True,
       Measured_Operators={'Ntot': N('up',1)+N('down',1)})                                        # Here we can use the segment picture

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): 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()

# Some intermediate saves
if MPI.IS_MASTER_NODE():
  R = HDF_Archive("SingleSiteBethe.h5")
  R["G-%s"%IterationNumber] = S.G
  del R

g1=GFBloc_ImFreq(Indices =[1], Beta = 100) g1<<=S.G['up'] L=200 eta=0.01 g2 = GFBloc_ReFreq(Indices =[1], Beta = 100, MeshArray = numpy.arange(-6,6,0.01), Name = "g_pade1")

g2.setFromPadeOf(g1, N_Matsubara_Frequencies = L, Freq_Offset = eta) R = HDF_Archive("Real.h5") R["Greal1"]=g2

del R

S.G['up'].save('GF')

2) I used G.save("GF"). I got the Gw in the dat file. In addition to that I also have GF.moments.dat file. Could you please explain about this file? where it could be useful?

3) How can I get the statistical errors of Greens function as well as self energy in triqs? If I use G.save("GF") I got Im G and real G. But to use MaxEnt I need data of statistical errors for Im G. How can I get errors in .dat file in addition to Im G.

4) I am new to QMC methods: If I want to reduce the noise in self-energy what is the parameter I need to increase. i.e is it N_cycle or N_cycle length.

5) If I express the self energy in Legendre polynomials will it reduce the noise?

With regards, Dasari.

aeantipov commented 11 years ago

Hi, Dasari. In my opinion, using Pade with a stochastic data is a bad idea anyway as Pade will just interpolate through your noisy points. It is still doable, provided that you have a very good quality data, but better first try using Pade on a regular data.

Second, Pade doesn't use any apriori information and as such is very susceptible to the parameters you use, such as the number of Matsubara points - please play around with them and see, if there is a change.

(4) Practically, both. (5) It might, provided that you don't "oversample" with Legendre (which is if you put N_Legendre_Coeffs not too large).

P.S. Please, use tags to separate text from the python code, especially "pre" might be useful.