dyson.solvers.static.mblse#

Moment block Lanczos for moments of the self-energy [1].

Classes

MBLSE(*args, **kwargs)

Moment block Lanczos for moments of the self-energy.

MLSE(*args, **kwargs)

Moment Lanczos for scalar moments of the self-energy.

RecursionCoefficients(nphys[, hermitian, ...])

Recursion coefficients for the moment block Lanczos algorithm for the self-energy.

ScalarRecursionCoefficients(nphys[, ...])

Scalar recursion coefficients for the moment block Lanczos algorithm for the self-energy.

class dyson.solvers.static.mblse.RecursionCoefficients(nphys: int, hermitian: bool = True, force_orthogonality: bool = True)[source]#

Bases: BaseRecursionCoefficients

Recursion coefficients for the moment block Lanczos algorithm for the self-energy.

Parameters:

nphys – Number of physical degrees of freedom.

class dyson.solvers.static.mblse.ScalarRecursionCoefficients(nphys: int, hermitian: bool = True, force_orthogonality: bool = True)[source]#

Bases: BaseRecursionCoefficients

Scalar recursion coefficients for the moment block Lanczos algorithm for the self-energy.

Parameters:

nphys – Number of physical degrees of freedom.

NDIM: int = 0#
class dyson.solvers.static.mblse.MBLSE(*args: Any, **kwargs: Any)[source]#

Bases: BaseMBL

Moment block Lanczos for moments of the self-energy.

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

  • moments – Moments of the self-energy.

Coefficients#

alias of RecursionCoefficients

classmethod from_self_energy(static: Array, self_energy: Lehmann, overlap: Array | None = None, **kwargs: Any) MBLSE[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.

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

Create a solver from an expression.

Parameters:
  • expression – Expression to be solved.

  • kwargs – Additional keyword arguments for the solver.

Returns:

Solver instance.

reconstruct_moments(iteration: int) Array[source]#

Reconstruct the moments.

Parameters:

iteration – The iteration number.

Returns:

The reconstructed moments.

initialise_recurrence() tuple[float | None, float | None, float | None][source]#

Initialise the recurrence (zeroth iteration).

Returns:

If calculate_errors, the error metrics in the square root of the off-diagonal block, the inverse square root of the off-diagonal block, and the error in the recovered moments. If not, all three are None.

solve(iteration: int | None = None) Spectral[source]#

Solve the eigenvalue problem at a given iteration.

Parameters:

iteration – The iteration to get the results for.

Returns:

The :cls:`Spectral` object.

property static: Array#

Get the static part of the self-energy.

property overlap: Array | None#

Get the overlap matrix for the physical space.

property coefficients: BaseRecursionCoefficients#

Get the recursion coefficients.

property on_diagonal: dict[int, Array]#

Get the on-diagonal blocks of the self-energy.

property off_diagonal: dict[int, Array]#

Get the off-diagonal blocks of the self-energy.

kernel(*args: Any, **kwargs: Any) Any#

Run the solver.

class dyson.solvers.static.mblse.MLSE(*args: Any, **kwargs: Any)[source]#

Bases: MBLSE

Moment Lanczos for scalar moments of the self-energy.

This is a specialisation of MBLSE for scalar moments.

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

  • moments – Moments of the self-energy.

Coefficients#

alias of ScalarRecursionCoefficients

classmethod from_self_energy(static: Array, self_energy: Lehmann, overlap: Array | None = None, **kwargs: Any) MBLSE[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.

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

Create a solver from an expression.

Parameters:
  • expression – Expression to be solved.

  • kwargs – Additional keyword arguments for the solver.

Returns:

Solver instance.

property orthogonalisation_metric: Array#

Get the orthogonalisation metric.

property orthogonalisation_metric_inv: Array#

Get the inverse of the orthogonalisation metric.

orthogonalised_moment(order: int) Array[source]#

Compute an orthogonalised moment.

Parameters:

order – The order of the moment.

Returns:

The orthogonalised moment.

reconstruct_moments(iteration: int) Array[source]#

Reconstruct the moments.

Parameters:

iteration – The iteration number.

Returns:

The reconstructed moments.

initialise_recurrence() tuple[float | None, float | None, float | None][source]#

Initialise the recurrence (zeroth iteration).

Returns:

If calculate_errors, the error metrics in the square root of the off-diagonal block, the inverse square root of the off-diagonal block, and the error in the recovered moments. If not, all three are None.

property nphys: int#

Get the number of physical degrees of freedom.

kernel(*args: Any, **kwargs: Any) Any#

Run the solver.