Previous topic

GfTools

This Page

GfTools.matrix

The gftools.matrix module contains functions to work with Green’s functions in matrix form.

API

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:

\[ \begin{align}\begin{aligned}(G^{-1}(iω))_{ii} &= iω - μ_i - t_{ii} - Σ_i(iω)\\(G^{-1}(iω))_{ij} &= t_{ij} \quad \text{for } i ≠ j\end{aligned}\end{align} \]
gftools.matrix.construct_gf_omega(rv_inv, diag_inv, rv)[source]

Construct Green’s function from decomposition of its inverse.

\[G^{−1} = P h P^{-1} ⇒ G = P h^{-1} P^{-1}\]
Parameters:
  • rv_inv ((N, N) ndarray(complex)) – The inverse of the matrix of right eigenvectors (\(P^{-1}\))
  • diag_inv – The eigenvalues (\(h\))
  • rv ((N, N) ndarray(complex)) – The matrix of right eigenvectors (\(P\))
Returns:

gf_omega – The Green’s function

Return type:

(N, N) ndarray(complex)

gftools.matrix.decompose_gf_omega(g_inv)[source]

Decompose the inverse Green’s function into eigenvalues and eigenvectors.

The similarity transformation:

\[G^{-1} = P h P^{-1}, \quad h = diag(λ(G))\]
Parameters:g_inv ((N, N) ndarray(complex)) – matrix to be decomposed
Returns:
  • rv_inv ((N, N) ndarray(complex)) – The inverse of the right eigenvectors \(P\)
  • h ((N) ndarray(complex)) – The complex eigenvalues of g_inv
  • rv ((N, N) ndarray(complex)) – The right eigenvectors \(P\)
gftools.matrix.decompose_gf_omega_symmetric(g_inv_band)[source]

Decompose the Green’s function into eigenvalues and eigenvectors.

The similarity transformation for symmetric matrices is orthogonal.

\[G^{-1} = O h O^T, \quad h = diag(λ(G))\]
Parameters:g_inv_band ((2, N) ndarray(complex)) – matrix to be decomposed, needs to be given in banded form (see scipy.linalg.eig_banded())
Returns:
  • rv_inv ((N, N) ndarray(complex)) – The inverse of the right eigenvectors \(O\)
  • h ((N) ndarray(complex)) – The complex eigenvalues of g_inv_band
  • rv ((N, N) ndarray(complex)) – The right eigenvectors \(O\)
gftools.matrix.decompose_hamiltonian(hamilton)[source]

Decompose the Hamiltonian matrix into eigenvalues and eigenvectors.

The similarity transformation:

\[H = U^\dagger h U^\dagger, \quad h = diag(λ(G))\]
Parameters:hamilton ((N, N) ndarray(complex)) – matrix to be decomposed
Returns:
  • rv_inv ((N, N) ndarray(complex)) – The inverse of the right eigenvectors \(U^†\). The Hamiltonian is hermitian, thus the decomposition is unitary \(U^† = U ^{-1}\)
  • h ((N) ndarray(complex)) – The eigenvalues of hamilton
  • rv ((N, N) ndarray(complex)) – The right eigenvectors \(U\)