Global Abelian Symmetries
Filters and generators for global Abelian (U(1), Z2, and string-like) symmetry sectors.
Global Abelian symmetry filters for many-body configurations.
The functions in this module test and generate configuration subsets satisfying global U(1), Z2, or string-like diagonal symmetry constraints.
- edlgt.symmetries.global_abelian_sym.check_global_sym(config, sym_op_diags, sym_sectors, sym_type_flag)[source]
Check whether a configuration satisfies global Abelian symmetry sectors.
- Parameters:
config (
numpy.ndarray) – Single many-body configuration (one local state label per site).sym_op_diags (
numpy.ndarray) – Operator diagonals defining the symmetries. Shape is typically(n_sym, loc_dim)for uniform local spaces.sym_sectors (
numpy.ndarray) – Target sector value for each symmetry generator.sym_type_flag (
int) – Symmetry type selector:0for additive U(1),1for multiplicative Z2, and values>1for element-wise string constraints.
- Returns:
Trueifconfigbelongs to the chosen sector.- Return type:
- edlgt.symmetries.global_abelian_sym.check_global_sym_sitebased(config, sym_op_diags, sym_sectors, sym_type_flag)[source]
Site-based version of
check_global_sym()for nonuniform local bases.- Parameters:
config (
numpy.ndarray) – Single many-body configuration.sym_op_diags (
numpy.ndarray) – Site-resolved operator diagonals of shape(n_sym, n_sites, max(loc_dims)).sym_sectors (
numpy.ndarray) – Target sector value for each symmetry generator.sym_type_flag (
int) – Symmetry type selector:0for U(1),1for Z2.
- Returns:
Trueifconfigbelongs to the chosen sector.- Return type:
- edlgt.symmetries.global_abelian_sym.global_abelian_sector(loc_dims, sym_op_diags, sym_sectors, sym_type, configs=None)[source]
Filter configurations by global Abelian symmetry constraints.
- Parameters:
loc_dims (
numpy.ndarray) – Local Hilbert-space dimensions.sym_op_diags (
numpy.ndarray) – Diagonals of symmetry generators. Can be site-independent or site-based.sym_sectors (
numpy.ndarrayortyping.Sequence) – Target sector values for the generators.sym_type (
str) – Symmetry type code:"U"(U(1)),"Z"(Z2), or other values for string constraints.configs (
numpy.ndarray, optional) – If provided, filter this existing configuration table instead of generating the full product basis.
- Returns:
Configurations belonging to the requested global symmetry sector.
- Return type:
- edlgt.symmetries.global_abelian_sym.global_sector_configs(loc_dims, glob_op_diags, glob_sectors, sym_type_flag)[source]
Enumerate site-based global-symmetry configurations from the full basis.
- Parameters:
loc_dims (
numpy.ndarray) – Local Hilbert-space dimensions.glob_op_diags (
numpy.ndarray) – Site-resolved diagonals of global symmetry generators.glob_sectors (
numpy.ndarray) – Target sector values.sym_type_flag (
int) – Symmetry type selector used bycheck_global_sym_sitebased().
- Returns:
Filtered configuration table.
- Return type:
- edlgt.symmetries.global_abelian_sym.check_string_sym_sitebased(config, sym_op_diags, sym_sectors)[source]
Check site-resolved string constraints for one configuration.
- Parameters:
config (
numpy.ndarray) – Single many-body configuration.sym_op_diags (
numpy.ndarray) – Site-resolved diagonals for the string constraints.sym_sectors (
numpy.ndarray) – Target values for the string constraints.
- Returns:
Trueif the configuration satisfies all string constraints.- Return type: