triqs.operators.util.op_struct.get_mkind
- triqs.operators.util.op_struct.get_mkind(off_diag, map_operator_structure)[source]
Build the index function that maps a (spin, orbital) pair to an operator/GF-block index.
- Parameters:
- off_diagbool
If
True, the operators and Green’s-function blocks are denoted by('spin', 'orbital'); otherwise by('spin_orbital', 0).- map_operator_structuredict
Mapping of GF-block names from one convention to another, e.g.
{('up', 0): ('up_0', 0), ('down', 0): ('down_0', 0)}. If provided, the operators and blocks are labelled by the image of('spin', 'orbital')under this mapping.
- Returns: