TwoBodyTerm Class
Nearest-neighbor two-body Hamiltonian contributions and correlator measurements on lattice models.
- class edlgt.modeling.twobody_term.TwoBodyTerm(axis, op_list, op_names_list, **kwargs)[source]
Bases:
QMBTermNearest-neighbor two-body term along a selected lattice axis.
Initialize a two-body term definition.
- Parameters:
- Return type:
- get_hamiltonian(strength, add_dagger=False, mask=None)[source]
Build the two-body Hamiltonian contribution.
- Parameters:
strength (
scalar) – Coupling constant multiplying the two-body term.add_dagger (
bool, optional) – IfTrue, add the Hermitian conjugate of the constructed term.mask (
numpy.ndarray, optional) – Boolean lattice mask selecting the sites where the term is applied.
- Returns:
Return type depends on the current workflow:
if
self.sector_configs is None: sparse matrix Hamiltonian term;otherwise:
(row_list, col_list, value_list)as three NumPy arrays in the symmetry-reduced basis.
- Return type:
- Raises:
TypeError – If
strengthis not scalar.NotImplementedError – If
add_dagger=Trueis requested in an unsupported momentum-basis pair mode.
- get_Hamiltonian(strength, add_dagger=False, mask=None)
Build the two-body Hamiltonian contribution.
- Parameters:
strength (
scalar) – Coupling constant multiplying the two-body term.add_dagger (
bool, optional) – IfTrue, add the Hermitian conjugate of the constructed term.mask (
numpy.ndarray, optional) – Boolean lattice mask selecting the sites where the term is applied.
- Returns:
Return type depends on the current workflow:
if
self.sector_configs is None: sparse matrix Hamiltonian term;otherwise:
(row_list, col_list, value_list)as three NumPy arrays in the symmetry-reduced basis.
- Return type:
- Raises:
TypeError – If
strengthis not scalar.NotImplementedError – If
add_dagger=Trueis requested in an unsupported momentum-basis pair mode.