Tricks and tips
A comprehensive guide about how to perform reliable analytic continuation.
As is well-known, analytic continuation is a tedious, tricky, and complicated job. This page contains all of the details (and experiences), that need to be known by the users, about how to get reliable and accurate spectra by using various solvers as implemented in the ACFlow toolkit.
The following tricks and tips are MY personal viewpoints or experiences. They are not general rules. They might be wrong or ineffective or useless for some cases. They are definitely not suitable for the other analytic continuation codes.
Contents
General rules
It would be better to perform analytic continuation in Matsubara frequency axis, instead of imaginary time axis. See
grid
andngrid
.Employ the BarRat or MaxEnt solver for a fast analytic continuation task. And then the stochastic methods (the StochPX solver is preferred) can be used to get a better spectrum. See
solver
.If the input data is broken or discontinuous, please setup the
grid
parameter correctly.Set
nmesh
to an odd number.The spectra generated by any analytic continuation solvers (
Aout.data
) can be used as the default model for theMaxEnt
andStochAC
solvers. Seemtype
.Employ the
pmode
andmtype
parameters to customize the default model if you know a priori information about the spectra.Employ the
pmesh
andmesh
parameters to customize the real-frequency mesh if you know the positions for the sharp features in the spectra.Employ the
exclude
parameters to limit the distributions of random fields for theStochAC
,StochSK
, andStochPX
solvers, if you have rough estimations about the band edges or band gaps in the spectra. Actually, we can use the constrained algorithm to determine the positions for these sharp features.
MaxEnt solver
The
chi2kink
andbryan
algorithms are recommended. Seemethod
.The Shannon-Jaynes entropy is recommented. But sometimes, if sharp features are essential, please choose the Bayesian Reconstruction entropy. See
stype
.Adjust the
nalph
,alpha
,ratio
parameters to make sure that the $\chi^2(\alpha)$ curve is reasonable. It means that thedefault model region
and thenoise-fitting region
should exhibit similar lengths.If there is a
NaN
error, please decrease thenalph
parameter at first. And then you can increase thealpha
parameter. Of cource, a different scheme for determining optimal $\alpha$ is also possible. Seemethod
.
BarRat solver
If you know the possible type of the spectrum (continuum or discrete), please setup the
atype
parameter. Seeatype
.The BarRat solver wants more input data than the other solvers. The
ngrid
parameter should be at least 100. Seengrid
.Sometimes the Prony approximation will lead to worse results. Use it carefully. See
denoise
.If you know the noise level of input data, please set
epsilon
to it and letdenoise
= "prony_s".If you do not know the noise level of input data, just let
denoise
= "prony_o" or "none". Seedenoise
.If the spectrum is discrete, the BarRat solver will output the positions of the poles. Please adjust the
pcut
parameter to control how many poles are kept. Seepcut
.
NevanAC solver
It is extremely sensitive to the noise. So please make sure that the input data is smooth and is free of noise.
Actually, I think it is not suitable for quantum Monte Carlo data.
StochAC solver
Increase
nfine
to 20000. Seenfine
.Perhaps more $\alpha$ could help. See
nalph
.Run it parallelly (use
Pacrun.jl
).
StochSK solver
The
chi2min
algorithm is recommended. Seemethod
.Increase
nfine
andnstep
. Seenfine
.Run it parallelly (use
Pacrun.jl
).
StochOM solver
It is more efficient for Matsubara frequency Green's functions.
Increase
ntry
,nstep
andnbox
. Seentry
.Run it parallelly (use
Pacrun.jl
).
StochPX solver
If the spectrum is expected to be broad, please set
method = 'mean'
. If the spectrum is expected to be $\delta$-like, please setmethod = 'best'
. Seemethod
.Run it parallelly (use
Pacrun.jl
).Increase
ntry
to get smooth spectrum. Seentry
.The
nstep
parameter is related with thenpole
parameter. Ifnpole
is large,nstep
could be small. Ifnpole
is small,nstep
should be large. Seenstep
andnpole
.For condensed matter cases,
npole
should be quite large. While for molecule cases,npole
should be small. Seenpole
.How to determine the
nstep
parameter? We just increasenstep
from its default value and observe the terminal output of theStochPX
solver. If $\chi^2$ becomes stable (it means that the value of $\chi^2$ can be oscillating, but increasingnstep
can not suppress $\chi^2$ further), the correspondingnstep
is optimal. Seenstep
.How to determine the
theta
parameter? Please look at the acceptance probabilities for various Monte Carlo proposals in thestat.data
file. They should not be too large or too small, or else we should adjusttheta
. Seetheta
.If you want to obtain a smoother spectrum, please increase
eta
, or else reduceeta
. Seeeta
.If the spectrum contains many sharp features, the
constrained sampling algorithm
andself-adaptive sampling algorithm
can help. Seeconstrained sampling algorithm
andself-adaptive sampling algorithm
for the basic principles.