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:
- Returns:
- fcdmft.ac.pade.AC_pade_thiele_full(sigma, omega, npts=18, step_ratio=0.6666666666666666)[source]#
Pade fitting for full matrix.
- Parameters:
- Returns:
- class fcdmft.ac.pade.PadeAC(*args, npts=18, step_ratio=0.6666666666666666, **options)[source]#
Bases:
AC_MethodAnalytic continuation to real axis using a Pade approximation from Thiele’s reciprocal difference method Reference: J. Low Temp. Phys. 29, 179 (1977)
- Attributes:
omega_fitReturn 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:
- freqs
np.ndarray[np.complex128] 1D array of complex frequencies
- axis
int, 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)
- freqs
- Returns:
np.ndarrayPade-Thiele AC evaluated at freqs
- ac_fit(data, omega, axis=-1)[source]#
Compute Pade-Thiele AC coefficients for the given data and omega.
- Parameters:
- data
np.ndarray Data to be fit, e.g. self energy
- omega
np.ndarray[np.double] 1D imaginary frequency grid
- axis
int, 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)
- data
- 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.
- property omega_fit#
Return the frequency grid used for fitting.
- fcdmft.ac.pade.pade_thiele_ndarray(freqs, zn, coeff)[source]#
NDarray-friendly analytic continuation using Pade-Thiele method.
- Parameters:
- freqs
np.ndarray, shape (nfreqs,), complex Points in the complex plane at which to evaluate the analytic continuation.
- zn
np.ndarray, shape (ncoeff,), complex interpolation points
- coeff
np.ndarray, shape (ncoeff, M1, M2, …,), complex Pade-Thiele coefficients
- freqs
- Returns:
np.ndarray, shape (nfreqs, M1, M2, …,), complexPade-Thiele analytic continuation evaluated at freqs
- fcdmft.ac.pade.thiele_ndarray(fn, zn)[source]#
Iterative Thiele algorithm to compute coefficients of Pade approximant
- Parameters:
- fn
np.ndarray, shape (nw, N1, N2, …,), complex Function values at the points zn
- zn
np.ndarray, shape(nw,), complex Points in the complex plane used to compute fn
- fn
- Returns:
np.ndarray, shape(nw, N1, N2, …), complexCoefficients of Pade approximant