dyson.solvers

Contents

dyson.solvers#

Solvers for solving the Dyson equation.

Solvers generally provide some method to solving the Dyson equation

\[\mathbf{G}(\omega) = \left( \left[ \mathbf{G}^0(\omega) \right]^{-1} - \boldsymbol{\Sigma}(\omega) \right)^{-1},\]

which can also be written recursively as

\[\mathbf{G}(\omega) = \mathbf{G}^0(\omega) + \mathbf{G}^0(\omega) \boldsymbol{\Sigma}(\omega) \mathbf{G}(\omega),\]

and can be expressed as an eigenvalue problem as

\[\begin{split}\begin{bmatrix} \boldsymbol{\Sigma}(\omega) & \mathbf{v} \\ \mathbf{v}^\dagger & \mathbf{K} + \mathbf{C} \end{bmatrix} \mathbf{u} = \omega \mathbf{u}.\end{split}\]

For more details on the equivalence of these representations, see the representations module.

The BaseSolver interface provides the constructors from_expression() and from_self_energy() to create a solver of that type from either an instance of a subclass of BaseExpression or a self-energy in the form of an instance of Lehmann object, respectively

>>> from dyson import util, quiet, CCSD, Exact
>>> quiet()  # Suppress output
>>> mf = util.get_mean_field("H 0 0 0; H 0 0 1", "6-31g")
>>> ccsd = CCSD.h.from_mf(mf)
>>> solver = Exact.from_expression(ccsd)

Solvers can be run by calling the kernel() method, which in the case of static solvers sets the attribute and returns result, an instance of Spectral

>>> result = solver.kernel()
>>> type(result)
<class 'dyson.representations.spectral.Spectral'>

The result can then be used to construct Lehmann representations of the Green’s function and self-energy, details of which can be found in the representations module. On the other hand, solvers in dynamic return an instance of Dynamic, which contains the dynamic Green’s function in the format requested by the solver arguments.

A list of available solvers is provided in the documentation of dyson, along with their expected inputs.

Submodules#

solver

Base class for Dyson equation solvers.

static

Solvers for solving the Dyson equation statically.

dynamic

Solvers for solving the Dyson equation dynamically.