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 (True for open boundaries).

  • operator (numpy.ndarray, optional) – Single operator associated with the term.

  • op_name (str, optional) – Name of operator.

  • op_list (list, optional) – List of operators for multi-operator terms.

  • op_names_list (list, optional) – Names corresponding to op_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_ops only when self.sector_configs is available.

get_staggered_conditions(coords, stag_label)[source]

Check whether a site satisfies a staggered-sublattice selection.

Parameters:
  • coords (tuple) – Lattice coordinates of the site.

  • stag_label (str or None) – "even", "odd", or None (no filtering).

Returns:

True if the site satisfies the requested staggered condition.

Return type:

bool

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.ndarray or None) – Boolean lattice mask. If None, all sites are accepted.

Returns:

True if the site should be included.

Return type:

bool