dyson.grids.frequency#

Frequency grids.

Classes

BaseFrequencyGrid(points[, weights])

Base class for frequency grids.

GridIF

alias of ImaginaryFrequencyGrid

GridRF

alias of RealFrequencyGrid

ImaginaryFrequencyGrid(points[, weights])

Imaginary frequency grid.

RealFrequencyGrid(points[, weights])

Real frequency grid.

class dyson.grids.frequency.BaseFrequencyGrid(points: Array, weights: Array | None = None, **kwargs: Any)[source]#

Bases: BaseGrid

Base class for frequency grids.

evaluate_lehmann(lehmann: Lehmann, reduction: Reduction = Reduction.NONE, component: Component = Component.FULL, **kwargs: Any) Dynamic[BaseFrequencyGrid][source]#

Evaluate a Lehmann representation on the grid.

The imaginary frequency representation is defined as

\[\sum_{k} \frac{v_{pk} u_{qk}^*}{i \omega - \epsilon_k},\]

and the real frequency representation is defined as

\[\sum_{k} \frac{v_{pk} u_{qk}^*}{\omega - \epsilon_k \pm i \eta},\]

where \(\omega\) is the frequency grid, \(\epsilon_k\) are the poles, and the sign of the broadening factor is determined by the time ordering.

Parameters:
  • lehmann – Lehmann representation to evaluate.

  • reduction – The reduction of the dynamic representation.

  • component – The component of the dynamic representation.

  • kwargs – Additional keyword arguments for the resolvent.

Returns:

Lehmann representation, realised on the grid.

property domain: str#

Get the domain of the grid.

Returns:

Domain of the grid.

abstractmethod resolvent(energies: Array, chempot: float | Array, **kwargs: Any) Array[source]#

Get the resolvent of the grid.

Parameters:
  • energies – Energies of the poles.

  • chempot – Chemical potential.

Returns:

Resolvent of the grid.

class dyson.grids.frequency.RealFrequencyGrid(points: Array, weights: Array | None = None, **kwargs: Any)[source]#

Bases: BaseFrequencyGrid

Real frequency grid.

eta: float = 0.01#
property reality: bool#

Get the reality of the grid.

Returns:

Reality of the grid.

resolvent(energies: Array, chempot: float | Array, ordering: Ordering = Ordering.ORDERED, invert: bool = True, **kwargs: Any) Array[source]#

Get the resolvent of the grid.

For real frequency grids, the resolvent is given by

\[R(\omega) = \frac{1}{\omega - E \pm i \eta},\]

where \(\eta\) is a small broadening factor, and \(E\) are the pole energies. The sign of \(i \eta\) depends on the time ordering of the resolvent.

Parameters:
  • energies – Energies of the poles.

  • chempot – Chemical potential.

  • ordering – Time ordering of the resolvent.

  • invert – Whether to apply the inversion in the resolvent formula.

Returns:

Resolvent of the grid.

classmethod from_uniform(start: float, stop: float, num: int, eta: float | None = None) RealFrequencyGrid[source]#

Create a uniform real frequency grid.

Parameters:
  • start – Start of the grid.

  • stop – End of the grid.

  • num – Number of points in the grid.

  • eta – Broadening factor.

Returns:

Uniform real frequency grid.

dyson.grids.frequency.GridRF#

alias of RealFrequencyGrid

class dyson.grids.frequency.ImaginaryFrequencyGrid(points: Array, weights: Array | None = None, **kwargs: Any)[source]#

Bases: BaseFrequencyGrid

Imaginary frequency grid.

beta: float = 256#
property reality: bool#

Get the reality of the grid.

Returns:

Reality of the grid.

resolvent(energies: Array, chempot: float | Array, invert: bool = True, **kwargs: Any) Array[source]#

Get the resolvent of the grid.

For imaginary frequency grids, the resolvent is given by

\[R(i \omega_n) = \frac{1}{i \omega_n - E},\]

where \(E\) are the pole energies.

Parameters:
  • energies – Energies of the poles.

  • chempot – Chemical potential.

  • invert – Whether to apply the inversion in the resolvent formula.

Returns:

Resolvent of the grid.

classmethod from_uniform(num: int, beta: float | None = None) ImaginaryFrequencyGrid[source]#

Create a uniform imaginary frequency grid.

Parameters:
  • num – Number of points in the grid.

  • beta – Inverse temperature.

Returns:

Uniform imaginary frequency grid.

classmethod from_legendre(num: int, diffuse_factor: float = 1.0, beta: float | None = None) ImaginaryFrequencyGrid[source]#

Create a Legendre imaginary frequency grid.

Parameters:
  • num – Number of points in the grid.

  • diffuse_factor – Diffuse factor for the grid.

  • beta – Inverse temperature.

Returns:

Legendre imaginary frequency grid.

dyson.grids.frequency.GridIF#

alias of ImaginaryFrequencyGrid