triqs.operators.util.extractors.extract_U_dict2
- triqs.operators.util.extractors.extract_U_dict2()
Signature : (many_body_operator H, bool ignore_irrelevant = false) -> dict2_t<real_or_complex>
Extract U-matrix of the density-density interaction part \(\frac{1}{2}\sum_{ij} U_{ij} n_i n_j\) from a Hamiltonian H as a 2-index dictionary.
- Parameters:
H (Operator) – The Hamiltonian.
ignore_irrelevant (bool) – If True, ignore all irrelevant terms in H. Otherwise raise an exception when such terms are met.
- Returns:
U_dict – The 2-index interaction dictionary, {(i,j) : float}.
- Return type:
dict