The gftools.matrix
module contains functions to work with Green’s functions
in matrix form.
Functions to work with Green’s in matrix from.
In the limit of infinite coordination number the self-energy becomes local, inverse Green’s functions take the simple form:
gftools.matrix.
Decomposition
(rv, xi, rv_inv)[source]¶Abstraction for matrix decomposition designed for green’s functions.
This can be used as drop-in replacement for returning rv, xi, rv_inv. Additionally it offers methods to reconstruct that matrix. The intended use case is to use the Decomposition for the inversion of the Green’s function to calculate it from the resolvent.
rv
¶(N, N) complex np.ndarray – The matrix of right eigenvalues.
xi
¶(N, …) complex np.ndarray – The vector of eigenvalues
rv_inv
¶(N, N) complex np.ndarray – The inverse of rv.
apply
(func, *args, **kwds)[source]¶Modify self.xi according to func.
Simple wrapper to transform the eigenvalues self.xi.
reconstruct
(xi=None, kind='full')[source]¶Get matrix back from Decomposition.
If the reciprocal of self.xi was taken, this corresponds to the inverse of the original matrix. New axises can be appended to self.xi, however the 0th axis has to correspond to the matrix dimension.
Parameters: |
|
---|---|
Returns: | reconstruct – The reconstructed matrix. |
Return type: | (N, N, ..) or (N, ..) ndarray |
gftools.matrix.
construct_gf_omega
(rv, diag_inv, rv_inv)[source]¶Construct Green’s function from decomposition of its inverse.
Parameters: |
|
---|---|
Returns: | gf_omega – The Green’s function |
Return type: | (N, N) complex ndarray |
gftools.matrix.
decompose_gf_omega
(g_inv)[source]¶Decompose the inverse Green’s function into eigenvalues and eigenvectors.
The similarity transformation:
Parameters: | g_inv ((N, N) complex ndarray) – matrix to be decomposed |
---|---|
Returns: |
|
gftools.matrix.
decompose_hamiltonian
(hamilton)[source]¶Decompose the Hamiltonian matrix into eigenvalues and eigenvectors.
The similarity transformation:
Parameters: | hamilton ((N, N) complex ndarray) – matrix to be decomposed |
---|---|
Returns: |
|