risb.helpers_triqs module¶
Functions used in RISB based on the TRIQS library.
- risb.helpers_triqs.get_C_Op(gf_struct, dagger=False)[source]¶
Return all creation operators in Hilbert space.
- Parameters:
- Returns:
For each block in gf_struct, a vector of all creation/annihilation operators in its subspace.
- Return type:
- risb.helpers_triqs.get_g0_k_w(gf_struct, mesh, h0_k=None, h0_k_gf=None, mu=0, use_broadcasting=True)[source]¶
Return a TRIQS non-interacting lattice Green’s function.
- Parameters:
gf_struct (list of pairs [ (str,int), ...]) – Structure of the matrices. It must be a list of pairs, each containing the name of the matrix block as a string and the size of that block. For example:
[ ('up', 3), ('down', 3) ]
.mesh (triqs.gf.MeshProduct) – A meshproduct where first index is a triqs.gf.MeshBrZone mesh and the second index is a triqs.gf.MeshReFreq or triqs.gf.MeshImFreq mesh. MeshProduct is a fancy list.
h0_k (triqs.gf.BlockGf) – Non-interacting dispersion indexed as k, orb_i, orb_j. Each key in dictionary must follow
gf_struct
.h0_k – Non-interacting dispersion as a triqs.gf.BlockGf. Must follow the structure given by
gf_struct
, on the mesh given bymesh
.mu (float, optional) – Chemical potential.
use_broadcasting (bool, optional) – Whether to treat triqs.gf.Gf with its underlying numpy.ndarray data structure, or to use iterators over for loops and lazy expressions from TRIQS.
- Returns:
Non-interacting Green’s function from a non-interacting dispersion relation
h0_k
.- Return type:
triqs.gf.BlockGf
- risb.helpers_triqs.get_g_k_w(g0_k_w=None, sigma_w=None, g_qp_k_w=None, R=None, use_broadcasting=True)[source]¶
Return a TRIQS lattice interacting Green’s function, with a local self-energy.
Must pass g0_k_w and sigma_w, or g_qp_k_w and R. Passing g_qp_k_w and R is specific to RISB. Passing g0_k_w and sigma_w is valid for any interacting theory with a local self-energy (it is just Dyson’s equation at each k-point).
- Parameters:
g0_k_w (triqs.gf.BlockGf, optional) – Non-interacting Green’s function on a meshproduct where the first index is a triqs.gf.MeshBrZone mesh and the second index is a triqs.gf.MeshReFreq or triqs.gf.MeshImFreq mesh.
sigma_w (triqs.gf.BlockGf, optional) – Local self-energy on a triqs.gf.MeshReFreq or triqs.gf.MeshImFreq mesh.
gp_k_w (triqs.gf.BlockGf, optional) – Quasiparticle Green’s function on a meshproduct where the first index is a triqs.gf.MeshBrZone mesh and the second index is a triqs.gf.MeshReFreq or triqs.gf.MeshImFreq mesh.
R (dict[numpy.ndarray], optional) – Rormalization matrix from electrons to quasiparticles. Each key in dictionary must follow the gf_struct in
g0_k_w
andsigma_w
.use_broadcasting (bool, optional) – Whether to treat triqs.gf.Gf with its underlying numpy.ndarray data structure, or to use iterators over for loops and lazy expressions from TRIQS.
- Returns:
Physical c-electrons Green’s function \(G(k,\omega)\).
- Return type:
triqs.gf.BlockGf
- risb.helpers_triqs.get_g_qp_k_w(gf_struct, mesh, h0_kin_k, Lambda, R, mu=0, use_broadcasting=True)[source]¶
Return a TRIQS lattice RISB quasiparticle Green’s function.
- Parameters:
gf_struct (list of pairs [ (str,int), ...]) – Structure of the matrices. It must be a list of pairs, each containing the name of the matrix block as a string and the size of that block. For example:
[ ('up', 3), ('down', 3) ]
.mesh (triqs.gf.MeshProduct) – A meshproduct where first index is a triqs.gf.MeshBrZone mesh and the second index is a triqs.gf.MeshReFreq or triqs.gf.MeshImFreq mesh. MeshProduct is a fancy list.
h0_kin_k (dict[numpy.ndarray]) – Single-particle dispersion between local clusters. Indexed as k, orb_i, orb_j. Each key in dictionary must follow
gf_struct
.Lambda (dict[numpy.ndarray]) – Correlation potential of quasiparticles. Each key in dictionary must follow
gf_struct
.R (dict[numpy.ndarray]) – Rormalization matrix from electrons to quasiparticles. Each key in dictionary must follow
gf_struct
.mu (float, optional) – Chemical potential.
use_broadcasting (bool, optional) – Whether to treat triqs.gf.Gf with its underlying numpy.ndarray data structure, or to use iterators over for loops and lazy expressions from TRIQS.
- Returns:
Quasiparticle Green’s function \(G^{\mathrm{qp}}(k,\omega)\).
- Return type:
triqs.gf.BlockGf
- risb.helpers_triqs.get_g_w_loc(g_k_w, use_broadcasting=True)[source]¶
Return a TRIQS local Green’s function from a lattice Green’s function.
- Parameters:
g_k_w (triqs.gf.BlockGf) – A Green’s function on a meshproduct where the first index is a triqs.gf.MeshBrZone mesh and the second index is a triqs.gf.MeshReFreq or triqs.gf.MeshImFreq mesh.
use_broadcasting (bool, optional) – Whether to treat triqs.gf.Gf with its underlying numpy.ndarray data structure, or to use iterators over for loops and lazy expressions from TRIQS.
- Returns:
k-integrated Green’s function on a triqs.gf.MeshReFreq or triqs.gf.MeshImFreq mesh.
- Return type:
triqs.gf.BlockGf
- risb.helpers_triqs.get_gf_struct_from_g(block_gf)[source]¶
Return the block structure of a TRIQS Green’s function.
- risb.helpers_triqs.get_h0_loc(h0_k, P, gf_struct=None, gf_struct_mapping=None, force_real=True)[source]¶
Return a TRIQS operator of the non-interacting terms in the subspace given by
P
.- Parameters:
h0_k (dict[numpy.ndarray]) – Single-particle dispersion in each block.
P (dict[numpy.ndarray]) – The projector onto a local cluster within the supercell.
gf_struct (list of pairs [ (str,int), ...] | None, optional) – Structure of the matrices. It must be a list of pairs, each containing the name of the matrix block as a string and the size of that block. For example:
[ ('up', 3), ('down', 3) ]
. Default is structure worked out from the projector P.gf_struct_mapping (dict[str, str] | None, optional) – The mapping from the symmetry blocks in the subspace of P to the symmetry blocks of h0_k. Default assumes the keys in P are the same as the keys in h0_k.
force_real (bool) – Whether to make the resulting matrix real or not.
- Returns:
Non-interacting terms in the cluster defined by the projector P.
- Return type:
triqs.operators.Operator
- risb.helpers_triqs.get_h0_loc_blocks(h0_k, P, gf_struct=None, gf_struct_mapping=None, force_real=True)[source]¶
Return a TRIQS operator of the non-interacting terms in the subspace given by
P
.This function splits the terms into the symmetry blocks given by
gf_struct
.- Parameters:
h0_k (dict[numpy.ndarray]) – Single-particle dispersion in each block.
P (dict[numpy.ndarray]) – The projector onto a local cluster within the supercell.
gf_struct (list of pairs [ (str,int), ...] | None, optional) – Structure of the matrices. It must be a list of pairs, each containing the name of the matrix block as a string and the size of that block. For example:
[ ('up', 3), ('down', 3) ]
. Default is structure worked out from the projector P.gf_struct_mapping (dict[str, str] | None, optional) – The mapping from the symmetry blocks in the subspace of P to the symmetry blocks of h0_k. Default assumes the keys in P are the same as the keys in h0_k.
force_real (bool) – Whether to make the resulting matrix real or not.
- Returns:
For each single-particle symmetry block the non-interacting terms in the cluster defined by the projector P.
- Return type:
dict[triqs.operators.Operator]
- risb.helpers_triqs.get_sigma_w(gf_struct, mesh, Lambda, R, mu=0, h0_loc=None, use_broadcasting=True)[source]¶
Return a TRIQS local self-energy from RISB.
- Parameters:
gf_struct (list of pairs [ (str,int), ...]) – Structure of the matrices. It must be a list of pairs, each containing the name of the matrix block as a string and the size of that block. For example:
[ ('up', 3), ('down', 3) ]
.mesh (triqs.gf.meshes.MeshReFreq | triqs.gf.meshes.MeshImFreq) – Frequency mesh of the returned self-energy.
Lambda (dict[numpy.ndarray]) – Correlation potential of quasiparticles. Each key in dictionary must follow
gf_struct
.R (dict[numpy.ndarray]) – Rormalization matrix from electrons to quasiparticles. Each key in dictionary must follow
gf_struct
.mu (float, optional) – Chemical potential.
h0_loc (dict[numpy.ndarray], optional) – Matrix of non-interacting hopping terms in each local subspace. Each key in dictionary must follow
gf_struct
.use_broadcasting (bool, optional) – Whether to treat triqs.gf.Gf with its underlying numpy.ndarray data structure, or to use iterators over for loops and lazy expressions from TRIQS.
- Returns:
RISB local self-energy \(\Sigma(\omega)\).
- Return type:
triqs.gf.BlockGf
- risb.helpers_triqs.matrix_to_Op(A, gf_struct)[source]¶
Return a TRIQS operator from a matrix representation of quadratic operators.
- Parameters:
A (dict[numpy.ndarray]) – Single-particle matrix, where each key is a different block.
gf_struct (list of pairs [ (str,int), ...]) – Structure of the matrices. It must be a list of pairs, each containing the name of the matrix block as a string and the size of that block. For example:
[ ('up', 3), ('down', 3) ]
.
- Returns:
The single-particle matrix as a quadratic TRIQS operator.
- Return type:
dict[triqs.operators.Operator]