QMBTerm Base
Base class shared by lattice Hamiltonian term builders. It stores lattice geometry metadata, operator metadata, and common helper checks (masks and staggered-site selection).
- class edlgt.modeling.qmb_term.QMBTerm(lvals, has_obc, operator=None, op_name=None, op_list=None, op_names_list=None, sector_configs=None, loc_dims=None, staggered_basis=False, gauge_basis=None, momentum_basis=None)[source]
Base class for Hamiltonian-term builders on a lattice.
Initialize geometry and operator metadata for a lattice term.
- Parameters:
lvals (
list[int]) – Lattice dimensions.has_obc (
list[bool]) – Boundary-condition flags per axis (Truefor open boundaries).operator (
numpy.ndarray, optional) – Single operator associated with the term.op_name (
str, optional) – Name ofoperator.op_list (
list, optional) – List of operators for multi-operator terms.op_names_list (
list, optional) – Names corresponding toop_list.sector_configs (
numpy.ndarray, optional) – Symmetry-sector basis configurations. If provided, symmetry-reduced operators are prepared when possible.momentum_basis (
object, optional) – Optional momentum-basis metadata used by some derived classes.
- get_symmetry_operator()[source]
Prepare symmetry-sector operators from the provided operator data.
Notes
This method stores the processed operators in
self.sym_opsonly whenself.sector_configsis available.
- get_staggered_conditions(coords, stag_label)[source]
Check whether a site satisfies a staggered-sublattice selection.
- get_mask_conditions(coords, mask)[source]
Check whether a site passes an optional boolean mask.
- Parameters:
coords (
tuple) – Lattice coordinates of the site.mask (
numpy.ndarrayorNone) – Boolean lattice mask. IfNone, all sites are accepted.
- Returns:
Trueif the site should be included.- Return type: