fcdmft.ac.pade module#

fcdmft.ac.pade.AC_pade_thiele_diag(sigma, omega, npts=18, step_ratio=0.6666666666666666)[source]#

Pade fitting for diagonal elements for a matrix.

Parameters:
sigmacomplex ndarray

matrix to fit, (norbs, nomega)

omegacomplex array

frequency of the matrix sigma (nomega)

nptsint, optional

number of selected points, by default 18

step_ratio_type_, optional

step ratio to select points, by default 2.0/3.0

Returns:
acobj.coeffcomplex ndarray

fitting coefficient

acobj.omega[acobj.idx]complex ndarray

selected frequency points for fitting

fcdmft.ac.pade.AC_pade_thiele_full(sigma, omega, npts=18, step_ratio=0.6666666666666666)[source]#

Pade fitting for full matrix.

Parameters:
sigmacomplex ndarray

matrix to fit, (norbs, nomega)

omegacomplex array

frequency of the matrix sigma (nomega)

nptsint, optional

number of selected points, by default 18

step_ratio_type_, optional

step ratio to select points, by default 2.0/3.0

Returns:
acobj.coeffcomplex ndarray

fitting coefficient

acobj.omega[acobj.idx]complex ndarray

selected frequency points for fitting

class fcdmft.ac.pade.PadeAC(*args, npts=18, step_ratio=0.6666666666666666, **options)[source]#

Bases: AC_Method

Analytic continuation to real axis using a Pade approximation from Thiele’s reciprocal difference method Reference: J. Low Temp. Phys. 29, 179 (1977)

Attributes:
omega_fit

Return the frequency grid used for fitting.

Methods

ac_eval(freqs[, axis])

Evaluate Pade AC at arbitrary complex frequencies.

ac_fit(data, omega[, axis])

Compute Pade-Thiele AC coefficients for the given data and omega.

diagonal([axis1, axis2])

Create a new instance of the AC method with only the diagonal elements

save(chkfilename[, dataname])

Save the AC object and coefficients to an HDF5 file.

ac_eval(freqs, axis=-1)[source]#

Evaluate Pade AC at arbitrary complex frequencies.

Parameters:
freqsnp.ndarray[np.complex128]

1D array of complex frequencies

axisint, optional

Indicates which axis of the output array should correspond to the frequency axis, by default -1. Example: if you want (nmo, nmo, nfreq), call ac_eval(freqs, axis=-1)

if you want (nfreq, nmo, nmo), call ac_eval(data, freqs, axis=0)

Returns:
np.ndarray

Pade-Thiele AC evaluated at freqs

ac_fit(data, omega, axis=-1)[source]#

Compute Pade-Thiele AC coefficients for the given data and omega.

Parameters:
datanp.ndarray

Data to be fit, e.g. self energy

omeganp.ndarray[np.double]

1D imaginary frequency grid

axisint, optional

Indicates which axis of the data array corresponds to the frequency axis, by default -1. Example: data.shape is (nmo, nmo, nw), call ac_fit(data, omega, axis=-1)

data.shape is (nw, nmo, nmo), call ac_fit(data, omega, axis=0)

diagonal(axis1=0, axis2=1)[source]#
Create a new instance of the AC method with only the diagonal elements

of the self.coeff tensor. Convenient for getting diagonal of self-energy after calculating the full self-energy matrix.

This behaves more or less the same as np.diagonal.

Parameters:
axis1int, optional

First axis, by default 0

axis2int, optional

Second axis, by default 1

Returns:
object

New instance of the AC method with only the diagonal elements.

property omega_fit#

Return the frequency grid used for fitting.

fcdmft.ac.pade.pade_thiele(freqs, zn, coeff)[source]#
fcdmft.ac.pade.pade_thiele_ndarray(freqs, zn, coeff)[source]#

NDarray-friendly analytic continuation using Pade-Thiele method.

Parameters:
freqsnp.ndarray, shape (nfreqs,), complex

Points in the complex plane at which to evaluate the analytic continuation.

znnp.ndarray, shape (ncoeff,), complex

interpolation points

coeffnp.ndarray, shape (ncoeff, M1, M2, …,), complex

Pade-Thiele coefficients

Returns:
np.ndarray, shape (nfreqs, M1, M2, …,), complex

Pade-Thiele analytic continuation evaluated at freqs

fcdmft.ac.pade.thiele(fn, zn)[source]#
fcdmft.ac.pade.thiele_ndarray(fn, zn)[source]#

Iterative Thiele algorithm to compute coefficients of Pade approximant

Parameters:
fnnp.ndarray, shape (nw, N1, N2, …,), complex

Function values at the points zn

znnp.ndarray, shape(nw,), complex

Points in the complex plane used to compute fn

Returns:
np.ndarray, shape(nw, N1, N2, …), complex

Coefficients of Pade approximant