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.

Warning

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

  1. It would be better to perform analytic continuation in Matsubara frequency axis, instead of imaginary time axis. See grid and ngrid.

  2. 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.

  3. If the input data is broken or discontinuous, please setup the grid parameter correctly.

  4. Set nmesh to an odd number.

  5. The spectra generated by any analytic continuation solvers (Aout.data) can be used as the default model for the MaxEnt and StochAC solvers. See mtype.

  6. Employ the pmode and mtype parameters to customize the default model if you know a priori information about the spectra.

  7. Employ the pmesh and mesh parameters to customize the real-frequency mesh if you know the positions for the sharp features in the spectra.

  8. Employ the exclude parameters to limit the distributions of random fields for the StochAC, StochSK, and StochPX 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

  1. The chi2kink and bryan algorithms are recommended. See method.

  2. The Shannon-Jaynes entropy is recommented. But sometimes, if sharp features are essential, please choose the Bayesian Reconstruction entropy. See stype.

  3. Adjust the nalph, alpha, ratio parameters to make sure that the $\chi^2(\alpha)$ curve is reasonable. It means that the default model region and the noise-fitting region should exhibit similar lengths.

  4. If there is a NaN error, please decrease the nalph parameter at first. And then you can increase the alpha parameter. Of cource, a different scheme for determining optimal $\alpha$ is also possible. See method.

BarRat solver

  1. If you know the possible type of the spectrum (continuum or discrete), please setup the atype parameter. See atype.

  2. The BarRat solver wants more input data than the other solvers. The ngrid parameter should be at least 100. See ngrid.

  3. Sometimes the Prony approximation will lead to worse results. Use it carefully. See denoise.

  4. If you know the noise level of input data, please set epsilon to it and let denoise = "prony_s".

  5. If you do not know the noise level of input data, just let denoise = "prony_o" or "none". See denoise.

  6. 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. See pcut.

NevanAC solver

  1. It is extremely sensitive to the noise. So please make sure that the input data is smooth and is free of noise.

  2. Actually, I think it is not suitable for quantum Monte Carlo data.

StochAC solver

  1. Increase nfine to 20000. See nfine.

  2. Perhaps more $\alpha$ could help. See nalph.

  3. Run it parallelly (use Pacrun.jl).

StochSK solver

  1. The chi2min algorithm is recommended. See method.

  2. Increase nfine and nstep. See nfine.

  3. Run it parallelly (use Pacrun.jl).

StochOM solver

  1. It is more efficient for Matsubara frequency Green's functions.

  2. Increase ntry, nstep and nbox. See ntry.

  3. Run it parallelly (use Pacrun.jl).

StochPX solver

  1. If the spectrum is expected to be broad, please set method = 'mean'. If the spectrum is expected to be $\delta$-like, please set method = 'best'. See method.

  2. Run it parallelly (use Pacrun.jl).

  3. Increase ntry to get smooth spectrum. See ntry.

  4. The nstep parameter is related with the npole parameter. If npole is large, nstep could be small. If npole is small, nstep should be large. See nstep and npole.

  5. For condensed matter cases, npole should be quite large. While for molecule cases, npole should be small. See npole.

  6. How to determine the nstep parameter? We just increase nstep from its default value and observe the terminal output of the StochPX solver. If $\chi^2$ becomes stable (it means that the value of $\chi^2$ can be oscillating, but increasing nstep can not suppress $\chi^2$ further), the corresponding nstep is optimal. See nstep.

  7. How to determine the theta parameter? Please look at the acceptance probabilities for various Monte Carlo proposals in the stat.data file. They should not be too large or too small, or else we should adjust theta. See theta.

  8. If you want to obtain a smoother spectrum, please increase eta, or else reduce eta. See eta.

  9. If the spectrum contains many sharp features, the constrained sampling algorithm and self-adaptive sampling algorithm can help. See constrained sampling algorithm and self-adaptive sampling algorithm for the basic principles.