Hamiltonians
A set of Python functions to construct standard Hamiltonians is provided in the module triqs.operators.util.hamiltonians
.
Namely, three standard local interaction Hamiltonians are implemented: Slater, (Hubbard-)Kanamori and density-density Hamiltonians.
The Hamiltonians can be written for any set of spin and orbital names. Note that there is no actual notion of spin, the spin names
simply identify a division of the GF structure into non-hybridizing blocks.
-
triqs.operators.util.hamiltonians.
h_int_slater
(spin_names, n_orb, U_matrix, off_diag=None, map_operator_structure=None, H_dump=None, complex=False, orb_names=None)[source] Create a Slater Hamiltonian using fully rotationally-invariant 4-index interactions:
\[H = \frac{1}{2} \sum_{ijkl,\sigma \sigma'} U_{ijkl} a_{i \sigma}^\dagger a_{j \sigma'}^\dagger a_{l \sigma'} a_{k \sigma}.\]Parameters: - spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].
- n_orb (int) – Number of orbitals.
- U_matrix (4D matrix or array) – The fully rotationally-invariant 4-index interaction \(U_{ijkl}\).
- 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.
- complex (bool) – Whether there are complex values in the interaction. If False, passing a complex U will cause an error.
Returns: H – The Hamiltonian.
Return type:
-
triqs.operators.util.hamiltonians.
h_int_kanamori
(spin_names, n_orb, U, Uprime, J_hund, off_diag=None, map_operator_structure=None, H_dump=None, orb_names=None)[source] Create a Kanamori Hamiltonian using the density-density, spin-fip and pair-hopping interactions.
\[H = \frac{1}{2} \sum_{(i \sigma) \neq (j \sigma')} U_{i j}^{\sigma \sigma'} n_{i \sigma} n_{j \sigma'} - \sum_{i \neq j} J a^\dagger_{i \uparrow} a_{i \downarrow} a^\dagger_{j \downarrow} a_{j \uparrow} + \sum_{i \neq j} J a^\dagger_{i \uparrow} a^\dagger_{i \downarrow} a_{j \downarrow} a_{j \uparrow}.\]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)\)
- J_hund (scalar) – \(J\)
- 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:
-
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:
-
triqs.operators.util.hamiltonians.
diagonal_part
(H)[source] Extract the density part from an operator H.
The density part is a sum of all those monomials of H that are products of occupation number operators \(n_1 n_2 n_3 \ldots\).
Parameters: H (Operator) – The operator from which the density part is extracted. Returns: n_part – The density part of H. Return type: Operator
-
triqs.operators.util.hamiltonians.
make_operator_real
(H, tol=0)[source] Return the real part of a given operator H checking that its imaginary part is below tolerance.
Parameters: - H (Operator) – The operator to be converted.
- tol (float) – Tolerance threshold for the imaginary part of the operator’s coefficients.
Returns: H_real – The real part of H.
Return type: