triqs.gf.tools.discretize_bath

triqs.gf.tools.discretize_bath(delta_in, Nb, eps0=3, V0=None, tol=1e-15, maxiter=10000, cmplx=False, method='BFGS')[source]

Discretize a given hybridization function using Nb bath sites.

The discretized hybridization is constructed as .. math:: Delta_{kl}^{disc} (i omega_n) = sum_{j=1}^{Nb} V_{kj} S V_{jl}^* . where S is either: .. math:: [i omega_n - eps_j]^{-1} for MeshImFreq or .. math:: - exp(-tau * eps_j) / (1 + exp(-beta * eps_j) ) for MeshImTime.

The hoppings V and energies eps are chosen to minimize the norm .. math:: left[ frac{1}{sqrt(N)} sum_{i omega_n}^{N} | Delta^{disc} (i omega_n) - Delta (i omega_n) |^2 right]^{frac{1}{2}} and for MeshImTime .. math:: left[ frac{1}{sqrt(N)} sum_{tau}^{N} | Delta^{disc} (tau) - Delta (tau) |^2 right]^{frac{1}{2}} This minimization is performed with the given tolerance using scipy.optimize.minimize or the scipy.optimize.basinhopping frontend.

Parameters:
  • delta_in (Gf or BlockGf) – Matsubara or imaginary-time hybridization function to discretize

  • Nb (int) – Number of bath sites per Gf block

  • eps0 (float or list(float), default=3.0) – Approximate bandwith or initial guesses for bath energies.

  • V0 (float or np.ndarray (shape norb X Nb), optional) – If float: initial guess used for all hopping values. If np.ndarray: initial guess for V. Otherwise use the cholesky decomposition of .. math:: lim_{omega->infty} iomega*Delta(iomega) or .. math:: -Delta(tau=0^+) - Delta(tau=beta^-) to obtain an initial guess for V.

  • tol (float, default=1e-15) – Tolerance for scipy minimize on data to optimize (xatol / ftol)

  • maxiter (int, default=10000) – Maximum number of optimization steps

  • complx (bool, default=False) – Allow the hoppings V to be complex

  • method (string, default=BFGS) – Method for minimizing the function. Should be one of ‘BFGS’, ‘Nelder-Mead’ and ‘basinhopping’.

Returns:

  • V_opt (np.array (shape norb x Nb) or list thereof) – Optimized bath hoppings

  • eps_opt (list(float) or list(list(float)) – Optimized bath energies (sorted)

  • delta_disc (Gf or BlockGf) – Discretized hybridization function