Hybridization fitting
- adapol.hybfit.hybfit(Delta, iwn_vec, tol=None, Np=None, svdtol=1e-07, solver='lstsq', maxiter=500, mmin=4, mmax=50, verbose=False)[source]
The function for hybridization fitting.
Examples:
- Fitting with \(N_p\) poles:
hybfit(Delta, iwn_vec, Np = Np)
- Fitting with fixed error tolerance tol :
hybfit(Delta, iwn_vec, tol = tol)
Parameters:
Delta
: np.array, \((N_w, N_\mathrm{orb}, N_\mathrm{orb})\)The input hybridization function in Matsubara frequency.
iwn_vec
: np.array, \((N_w)\)The Matsubara frequency vector, complex-valued
svdtol
: float, optionalTruncation threshold for bath orbitals while doing SVD of weight matrices in hybridization fitting default:1e-7
tol
,Np
,solver
,maxiter
,mmin
,mmax
,verbose
:see below in anacont
Returns:
bathenergy
\(E\): np.array, \((N_b)\)Bath energy
bathhyb
\(V\): np.array, \((N_b,N_{\mathrm{orb}})\)Bath hybridization
final_error
: floatfinal fitting error
func
: functionHybridization function evaluator \(f(z) = \sum_n V_{ni}V_{nj}^*/(z-E_n).\)
Analytic continuation
- adapol.anacont.anacont(Delta, iwn_vec, tol=None, Np=None, solver='lstsq', maxiter=500, mmin=4, mmax=50, verbose=False)[source]
The function for analytical continuation.
Examples:
- Analytic continuation with \(N_p\) poles:
func = anacont(Np = Np)
- Fitting with fixed error tolerance tol:
func = anacont(tol = tol)
- Analytic continuation with improved accuracy:
fitting(Np = Np, flag = flag, solver = "sdp")
Parameters:
Delta
: np.array, \((N_w, N_\mathrm{orb}, N_\mathrm{orb})\)The input hybridization function in Matsubara frequency.
iwn_vec
: np.array, \((N_w,)\)The Matsubara frequency vector, complex-valued
tol
: Fitting error tolreance, floatIf tol is specified, the fitting will be conducted with fixed error tolerance tol. default: None
Np
: number of poles, integerIf Np is specified, the fitting will be conducted with fixed number of poles Np. default: None Np needs to be an odd integer, and number of supoort points is Np + 1.
solver
: stringThe solver that is used for optimization. choices: “lstsq”, “sdp” default: “lstsq”
maxiter
: intmaximum number of iterations default: 500
mmin
,mmax
: number of minimum or maximum poles, integerdefault: mmin = 4, mmax = 50 if tol is specified, mmin and mmax will be used as the minimum and maximum number of poles. if Np is specified, mmin and mmax will not be used.
verbose
: boolwhether to display optimization details default: False
Returns:
func
: functionAnalytic continuation function: \(f(z) = \sum_n \mathrm{Weight}[n]/(z-\mathrm{pol}[n]).\)
fitting_error
: floatfitting error
pol
: np.array, \((N_p,)\)poles obtained from fitting
weight
: np.array, \((N_p, N_\mathrm{orb}, N_\mathrm{orb})\)weights obtained from fitting
TRIQS interface
- adapol.hybfit.hybfit_triqs(Delta_triqs, tol=None, Np=None, svdtol=1e-07, solver='lstsq', maxiter=500, mmin=4, mmax=50, verbose=False, debug=False)[source]
The triqs interface for hybridization fitting. The function requires triqs package in python.
Examples:
- Fitting with \(N_p\) poles:
hybfit_triqs(delta_triqs, Np = Np)
- Fitting with fixed error tolerance tol :
hybfit_triqs(delta_triqs, tol = tol)
Parameters:
Delta_triqs
: triqs Green’s function containerThe input hybridization function in Matsubara frequency
debug
: boolreturn additional outputs for debugging. Default: False
svdtol
: float, optionalTruncation threshold for bath orbitals while doing SVD of weight matrices in hybridization fitting default: 1e-7
tol
,Np
,solver
,maxiter
,mmin
,mmax
,verbose
:same as in hybfit
Returns:
bathhyb
: np.array \((N_b, N_\mathrm{orb})\)Bath hybridization
bathenergy
: np.array \((N_b,)\)Bath energy
Delta_fit
: triqs Gf or BlockGfDiscretized hybridization function The input hybridization function in Matsubara frequency
- if debug is True:
final_error
: floatfinal fitting error
weight
: np.array \((N_p, N_\mathrm{orb}, N_\mathrm{orb})\)weights obtained from fitting
- adapol.anacont.anacont_triqs(Delta_triqs, tol=None, Np=None, solver='lstsq', maxiter=500, mmin=4, mmax=50, verbose=False, debug=False)[source]
The triqs interface for analytical continuation. The function requires triqs package in python.
Parameters:
Delta_triqs
: triqs Green’s function containerThe input hybridization function in Matsubara frequency
debug
: boolreturn additional outputs for debugging. Default: False
tol
,Np
,solver
,maxiter
,mmin
,mmax
,verbose
:same as in anacont
Returns:
func
: functionAnalytic continuation function: \(f(z) = \sum_n \mathrm{Weight}[n]/(z-\mathrm{pol}[n]).\)
- if debug == True:
fitting_error
: floatfitting error
pol
: np.array, \((N_p,)\)poles obtained from fitting
weight
: np.array, \((N_p, N_\mathrm{orb}, N_\mathrm{orb})\)weights obtained from fitting