triqs.operators.util.extractors.dict_to_matrix

triqs.operators.util.extractors.dict_to_matrix()

Dispatched C++ function(s).

[1] (d: dict[tuple[[int | str | float | [int, len = 3]], [int | str | float | [int, len = 3]]] -> float | complex],
     gf_struct: [tuple[str, int]])
  -> ndarray[float, 2] | ndarray[complex, 2]

[2] (d: dict[tuple[[int | str | float | [int, len = 3]], [int | str | float | [int, len = 3]], [int | str | float | [int, len = 3]], [int | str | float | [int, len = 3]]] -> float | complex],
     gf_struct: [tuple[str, int]])
  -> ndarray[float, 4] | ndarray[complex, 4]

Convert a coefficient dictionary to a matrix, given a GF structure.

Parameters:
ddict[tuple[[int | str | float | [int, len = 3]], [int | str | float | [int, len = 3]]] -> float | complex]

The 2-index/4-index dictionary.

gf_struct[tuple[str, int]]

The Green’s function block structure.

Returns:
ndarray[float, 2] | ndarray[complex, 2]

A real or complex matrix/rank-4 tensor (as variant).