Skip to content

rgf#

Includes the selected inversion solver.

Classes:

  • RGF –

    Selected inversion solver based on the Schur complement.

RGF #

RGF(max_batch_size: int = 100)

Bases: GFSolver

Selected inversion solver based on the Schur complement.

Parameters:

  • max_batch_size (int, default: 100 ) –

    Maximum batch size to use when inverting the matrix, by default 100.

Methods:

  • selected_inv –

    Performs selected inversion of a block-tridiagonal matrix.

  • selected_solve –

    Produces elements of the solution to the congruence equation.

selected_inv #

selected_inv(a: DSDBSparse, out: DSDBSparse, obc_blocks: OBCBlocks | None = None) -> None

Performs selected inversion of a block-tridiagonal matrix.

Parameters:

  • a (DSDBSparse) –

    Matrix to invert.

  • out (DSDBSparse) –

    Preallocated output matrix.

  • obc_blocks (OBCBlocks, default: None ) –

    OBC blocks for lesser, greater and retarded Green's functions. By default None.

selected_solve #

selected_solve(a: DSDBSparse, sigma_lesser: DSDBSparse, sigma_greater: DSDBSparse, out: tuple[DSDBSparse, ...], obc_blocks: OBCBlocks | None = None, return_retarded: bool = False, callbacks: list[Callable] | None = None) -> None

Produces elements of the solution to the congruence equation.

This method produces selected elements of the solution to the relation:

\[ X^{\lessgtr} = A^{-1} \Sigma^{\lessgtr} A^{-\dagger} \]

Parameters:

  • a (DSDBSparse) –

    Matrix to invert.

  • sigma_lesser (DSDBSparse) –

    Lesser matrix. This matrix is expected to be skew-hermitian, i.e. \(\Sigma_{ij} = -\Sigma_{ji}^*\).

  • sigma_greater (DSDBSparse) –

    Greater matrix. This matrix is expected to be skew-hermitian, i.e. \(\Sigma_{ij} = -\Sigma_{ji}^*\).

  • out (tuple[DSDBSparse, ...]) –

    Preallocated output matrices.

  • obc_blocks (OBCBlocks, default: None ) –

    OBC blocks for lesser, greater and retarded Green's functions. By default None.

  • return_retarded (bool, default: False ) –

    Wether the retarded Green's function should be returned along with lesser and greater, by default False

  • callbacks (list[Callable], default: None ) –

    List of callback functions to be called during the back substitution step. Each callback function should accept a single argument of type BackwardSubstitutionContext, by default None.