The gftools.pade
module contains functions to perform analytic
continuations using Pade. The implemented scheme focuses on averaging over
multiple approximants.
Pade analytic continuation for Green’s functions and self-energies.
The main aim of this module is to provide analytic continuation based on averaging over multiple Pade approximates (similar to [1]).
In most cases the following high level function should be used:
References
[1] | Schött et al. “Analytic Continuation by Averaging Pade Approximants”. Phys Rev B 93, no. 7 (2016): 075104. https://doi.org/10.1103/PhysRevB.93.075104. |
gftools.pade.
Averager
(z_in, coeff, *, valid_pades, kind: gftools.pade.KindSelector)[source]¶Create function for averaging Pade scheme.
Parameters: |
|
---|---|
Returns: | average – The continued function f(z) (z, ) -> Result. f(z).x contains the function values f(z).err the associated variance. |
Return type: | function |
Raises: |
|
gftools.pade.
FilterNegImag
(threshold=1e-08)[source]¶Return function to check if imaginary part is smaller than threshold.
This methods is designed to create valid_pades for Averager. The imaginary part of retarded Green’s functions and self-energies must be negative, this is checked by this filter. A threshold is given as Pade overshoots when the function goes sharply to 0. See for example the semi-circular spectral function of the Bethe lattice with infinite Coordination number as example.
gftools.pade.
KindGf
(n_min, n_max)[source]¶Filter approximants such that the high-frequency behavior is \(1/ω\).
We denote approximants with the corresponding high frequency behavior as valid. Considers all valid approximants including between n_min and n_max Matsubara frequencies.
gftools.pade.
KindSelector
(n_min, n_max)[source]¶Abstract filter class to determine high-frequency behavior of Pade.
We denote approximants with the corresponding high frequency behavior as valid. Considers all valid approximants including between n_min and n_max Matsubara frequencies.
islice
(iterable)[source]¶Return an iterator whose next() method returns valid values from iterable.
slice
¶Return slice selecting the valid approximants.
gftools.pade.
KindSelf
(n_min, n_max)[source]¶Filter approximants such that the high-frequency behavior is a constant.
We denote approximants with the corresponding high frequency behavior as valid. Considers all valid approximants including between n_min and n_max Matsubara frequencies.
gftools.pade.
averaged
(z_out, z_in, *, valid_z=None, fct_z=None, coeff=None, filter_valid=None, kind: gftools.pade.KindSelector)[source]¶Return the averaged Pade continuation with its variance.
The output is checked to have an imaginary part smaller than threshold, as retarded Green’s functions and self-energies have a negative imaginary part. This is a helper to conveniently get the continuation, it comes however with overhead.
Parameters: |
|
---|---|
Returns: |
|
gftools.pade.
avg_no_neg_imag
(z_out, z_in, *, valid_z=None, fct_z=None, coeff=None, threshold=1e-08, kind: gftools.pade.KindSelector)[source]¶Average Pade filtering approximants with non-negative imaginary part.
This function wraps averaged, see averaged for the parameters.
Other Parameters: | |
---|---|
threshold (float, optional) – The numerical threshold, how large of an positive imaginary part is tolerated (default: 1e-8). np.infty can be given to accept all. | |
Returns: |
|
gftools.pade.
calc_iterator
(z_out, z_in, coeff, *, kind: gftools.pade.KindSelector)[source]¶Calculate Pade continuation of function at points z_out.
The continuation is calculated for different numbers of coefficients taken into account, where the number is in [n_min, n_max]. The algorithm is take from [2].
Parameters: |
|
---|---|
Returns: | pade_calc – Function evaluated at points z_out for all corresponding (see kind) numbers of Matsubara frequencies between n_min and n_max. The shape of the elements is the same as coeff.shape with the last dimension corresponding to N_in replaced by the shape of z_out: (…, N_in, *z_out.shape). |
Return type: | iterator |
References
[2] | Vidberg, H. J., and J. W. Serene. “Solving the Eliashberg Equations by Means of N-Point Pade Approximants.” Journal of Low Temperature Physics 29, no. 3-4 (November 1, 1977): 179-92. https://doi.org/10.1007/BF00655090. |
gftools.pade.
coefficients
(z, fct_z) → numpy.ndarray[source]¶Calculate the coefficients for the Pade continuation.
Parameters: |
|
---|---|
Returns: | coefficients – Array of Pade coefficients, needed to perform Pade continuation. Has the same same shape as fct_z. |
Return type: | (.., N_z) complex ndarray |
Raises: |
|