dgamore.two_point#

Momentum-dependent two-point objects. TwoPoint extends LocalTwoPoint with one momentum axis (see IAmNonLocal) and is the common parent of the single-particle Green’s function, the self-energy and the superconducting gap function. It overrides the orbital permutation to account for the leading momentum axis and adds the irreducible-to-full-BZ unfold with two orbital dimensions. It mirrors how FourPoint extends LocalFourPoint.

class dgamore.two_point.TwoPoint(mat: ndarray, nk: tuple[int, int, int] = (1, 1, 1), full_niv_range: bool = True, has_compressed_q_dimension: bool = False)[source]#

Bases: IAmNonLocal, LocalTwoPoint

Base class for the momentum-dependent two-point objects (Green’s function, self-energy, gap function). They carry one momentum dimension, two orbital dimensions, no bosonic and exactly one fermionic frequency dimension. The momentum-agnostic orbital symmetrization helpers are inherited from LocalTwoPoint; the orbital permutation is overridden here to keep the leading momentum axis fixed, and the irreducible-to-full-BZ unfold is added.

Parameters:
map_to_full_bz(k_grid: KGrid, nq: tuple = None)[source]#

Unfolds the object from the irreducible BZ to the full BZ using the grid’s symmetry index map (see IAmNonLocal._map_to_full_bz()), with two orbital dimensions.

Parameters:
  • k_grid (KGrid) – The KGrid providing the irreducible-to-full BZ index mapping.

  • nq (tuple) – Optional number of momenta per direction for the unfolded grid; defaults to the object’s nq.

Returns:

self defined on the full BZ.

permute_orbitals(permutation: str = 'ab->ab') TwoPoint[source]#

Permutes the two orbital axes according to an einsum-style string, returning a copy (the identity permutation returns self). The momentum and frequency axes are kept fixed.

Parameters:

permutation (str) – A permutation of the form "ab->..." using exactly the two orbital labels.

Returns:

The orbital-permuted object (a copy), or self for the identity permutation.

Raises:

ValueError – If the permutation is malformed or does not list both orbitals on each side.

Return type:

TwoPoint