dyson.solvers.solver#

Base class for Dyson equation solvers.

Classes

BaseSolver()

Base class for Dyson equation solvers.

DynamicSolver(*args, **kwargs)

Base class for dynamic Dyson equation solvers.

StaticSolver(*args, **kwargs)

Base class for static Dyson equation solvers.

class dyson.solvers.solver.BaseSolver[source]#

Bases: ABC

Base class for Dyson equation solvers.

set_options(**kwargs: Any) None[source]#

Set options for the solver.

Parameters:

kwargs – Keyword arguments to set as options.

abstractmethod kernel() Any[source]#

Run the solver.

abstractmethod classmethod from_self_energy(static: Array, self_energy: Lehmann, overlap: Array | None = None, **kwargs: Any) BaseSolver[source]#

Create a solver from a self-energy.

Parameters:
  • static – Static part of the self-energy.

  • self_energy – Self-energy.

  • overlap – Overlap matrix for the physical space.

  • kwargs – Additional keyword arguments for the solver.

Returns:

Solver instance.

Notes

This method will extract the appropriate quantities or functions from the self-energy to instantiate the solver. In some cases, additional keyword arguments may required.

abstractmethod classmethod from_expression(expression: BaseExpression, **kwargs: Any) BaseSolver[source]#

Create a solver from an expression.

Parameters:
  • expression – Expression to be solved.

  • kwargs – Additional keyword arguments for the solver.

Returns:

Solver instance.

Notes

This method will extract the appropriate quantities or functions from the expression to instantiate the solver. In some cases, additional keyword arguments may required.

abstract property nphys: int#

Get the number of physical degrees of freedom.

class dyson.solvers.solver.StaticSolver(*args: Any, **kwargs: Any)[source]#

Bases: BaseSolver

Base class for static Dyson equation solvers.

result: Spectral | None = None#
kernel(*args: Any, **kwargs: Any) Any[source]#

Run the solver.

class dyson.solvers.solver.DynamicSolver(*args: Any, **kwargs: Any)[source]#

Bases: BaseSolver

Base class for dynamic Dyson equation solvers.

kernel(*args: Any, **kwargs: Any) Any[source]#

Run the solver.