dgamore.self_energy#

Single-particle self-energy. SelfEnergy wraps the (possibly momentum-dependent) self-energy \(\Sigma_{ab}(k, \nu)\) and provides its high-frequency moments (\(\Sigma_\infty\) and the \(1/\imath\nu\) coefficient), tools to estimate the core frequency box, to append the analytic asymptotic tail beyond the core, to polynomial-fit the tail, and to interpolate the self-energy between temperatures. The moments are obtained by fitting the highest available Matsubara frequencies.

class dgamore.self_energy.SelfEnergy(mat: ndarray, nk: tuple[int, int, int] = (1, 1, 1), full_niv_range: bool = True, has_compressed_q_dimension: bool = False, estimate_niv_core: bool = False, calc_smom: bool = True, beta: float = None)[source]#

Bases: TwoPoint

The (possibly momentum-dependent) single-particle self-energy \(\Sigma_{ab}(k, \nu)\). On top of the two-point orbital bookkeeping inherited from LocalTwoPoint it provides the high-frequency moments (\(\Sigma_\infty\) and the \(1/\imath\nu\) coefficient), an estimate of the core frequency box, the construction/append of the analytic asymptotic tail beyond the core, a polynomial tail fit, and the temperature/frequency interpolation between grids. The moments are obtained by fitting the highest available Matsubara frequencies.

Parameters:
add(other) SelfEnergy[source]#

Adds another SelfEnergy (momentum dimensions are aligned first) or a numpy array; see _add().

Parameters:

other – A SelfEnergy or numpy array.

Returns:

A new SelfEnergy holding the sum (moments not recomputed).

Return type:

SelfEnergy

append_asympt(niv: int)[source]#

Returns a copy with the analytic asymptotic tail appended on both ends so that the frequency box extends to niv. A no-op (returns a copy) if niv <= self.niv.

Parameters:

niv (int) – Target number of positive fermionic frequencies.

Returns:

A copy of the self-energy extended to niv.

concatenate_self_energies(other: SelfEnergy) SelfEnergy[source]#

Builds a self-energy that keeps self inside its core box and uses other for the shell, up to other.niv.

Parameters:

other (SelfEnergy) – The self-energy supplying the shell frequencies; must have at least as many frequencies as self.

Returns:

A new SelfEnergy spanning other’s frequency box.

Raises:

ValueError – If other has fewer frequencies than self.

Return type:

SelfEnergy

create_with_asympt_up_to_core() SelfEnergy[source]#

Returns a copy whose data inside the estimated core box is kept and whose shell (up to the full stored box) is replaced by the analytic asymptotic tail. A no-op (returns a copy) if the core already spans the full box or the tail is empty.

Returns:

A copy of the self-energy with the asymptotic tail outside the core region.

Return type:

SelfEnergy

fit_polynomial(n_fit: int = 4, degree: int = 3, niv_core: int = 0) SelfEnergy[source]#

Replaces the self-energy by a per-(momentum, orbital) polynomial fit of the positive-frequency data, evaluated on the full positive frequency grid, then mirrored to the full range. A no-op (returns a copy) if n_fit == 0.

Parameters:
  • n_fit (int) – Number of positive frequencies used for the fit; if 0 the object is returned unchanged, and if larger than self.niv (or negative) it falls back to niv_core + 200.

  • degree (int) – Degree of the fitted polynomial.

  • niv_core (int) – Core frequency count used for the fallback n_fit when n_fit is out of range.

Returns:

A new SelfEnergy holding the polynomial fit, in the full fermionic frequency range.

Return type:

SelfEnergy

fit_smom()[source]#

Fits the first two high-frequency moments of the (k-averaged) self-energy from the highest stored Matsubara frequencies: the constant Hartree shift \(\Sigma_\infty\) (real part) and the \(1/\imath\nu\) coefficient \(\Sigma_1\) (from the imaginary part). At least four frequencies are used for the fit.

Returns:

The tuple (mom0, mom1) of moments, each of shape [o1, o2].

interpolate(beta_target: float, niv_target: int, niv_linear: int = 4) SelfEnergy[source]#

Re-grids the self-energy from its own inverse temperature \(\beta\) (self._beta) to beta_target. Only the last (frequency) axis is interpolated.

The innermost niv_linear source frequencies are interpolated linearly (no curvature assumption where the grid is sparsest); everything above is interpolated with shape-preserving (PCHIP) splines. Re/Im are handled separately on the full signed grid. All target frequencies are returned.

Parameters:
  • beta_target (float) – Inverse temperature \(\beta\) of the target grid.

  • niv_target (int) – Number of positive fermionic frequencies of the target grid.

  • niv_linear (int) – Number of innermost positive source frequencies interpolated linearly (PCHIP above).

Returns:

A new SelfEnergy on the target frequency grid (half niv range flag set to full on output).

Return type:

SelfEnergy

property smom: tuple[ndarray, ndarray]#

The fitted high-frequency moments of the self-energy.

Returns:

The first two high-frequency moments \((\Sigma_\infty, \Sigma_1)\) of the self-energy, each of shape [o1, o2].

sub(other) SelfEnergy[source]#

Subtracts another SelfEnergy or numpy array, implemented as self._add(other, subtract=True) (see _add()).

Parameters:

other – A SelfEnergy or numpy array.

Returns:

A new SelfEnergy holding the difference.

Return type:

SelfEnergy

to_full_niv_range()[source]#

Extends the object to the full (signed) fermionic frequency range in place, using \(\Sigma(-\nu) = \Sigma(\nu)^*\). A no-op if there is no fermionic axis or the object is already full.

Returns:

self in the full fermionic frequency range.