triqs.operators.util.hamiltonians.h_int_density

triqs.operators.util.hamiltonians.h_int_density(spin_names, n_orb, U, Uprime, off_diag=None, map_operator_structure=None, H_dump=None, orb_names=None)[source]

Create a density-density Hamiltonian.

\[H = \frac{1}{2} \sum_{(i \sigma) \neq (j \sigma')} U_{i j}^{\sigma \sigma'} n_{i \sigma} n_{j \sigma'}.\]
Parameters:
  • spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].

  • n_orb (int) – Number of orbitals.

  • U (2D matrix or array) – \(U_{ij}^{\sigma \sigma} (same spins)\)

  • Uprime (2D matrix or array) – \(U_{ij}^{\sigma \bar{\sigma}} (opposite spins)\)

  • off_diag (boolean) – Do we have (orbital) off-diagonal elements? If yes, the operators and blocks are denoted by (‘spin’, ‘orbital’), otherwise by (‘spin_orbital’,0).

  • map_operator_structure (dict) – Mapping of names of GF blocks 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 denoted by the mapping of ('spin', 'orbital').

  • H_dump (string) – Name of the file to which the Hamiltonian should be written.

Returns:

H – The Hamiltonian.

Return type:

Operator