netket.symmetry.LabeledRepresentation#
- class netket.symmetry.LabeledRepresentation[source]#
Bases:
RepresentationA
Representationwith automatic irrep labeling.Extends the base
Representationwith:irrep_labelsβ a human-readable string for each irrep, derived from character values on a minimal set of βseparatingβ group elements. For example:"+1","-1","+i","exp(+0.3333Οi)", or tuples thereof for multi-generator groups.projector()accepting alabel=keyword in addition to the integercharacter_index.
The constructor signature is identical to
Representation, so existing code that passes a(group, representation_dict)pair works unchanged.Subclasses can override
irrep_labelsto provide physics-specific names (e.g."even"/"odd"for Zβ).Examples
Project a state onto the antisymmetric sector of a Zβ group:
rep = nk.symmetry.spin_flip_representation(hilbert) print(rep.irrep_labels) # ['+1', '-1'] proj = rep.projector(label='-1')
- Inheritance

- __init__(group, representation_dict)[source]#
Construct a Representation.
- Parameters:
group (
FiniteGroup) β The group being represented.representation_dict (
dict[Element,DiscreteJaxOperator]) β The dictionary that defines the representation. Its keys must be the elements ofgroup. The value this dictionary associates to a group element is the operator that the representation maps this group element onto.
- Attributes
- character#
The vector storing the character of the representation.
Corresponds to
[op.trace() for (_, op) in self].Requires that each operator of the representation implements the trace method.
- irrep_labels#
Human-readable label for each irrep (one per
character_index).Derived from character values on the minimal set of separating group elements:
Single separator:
"+1","-1","+i", etc.Multiple separators:
"(+1, -1)","(-1, +i)", etc.
Subclasses override this with domain-specific labels.
- representation_dict#
Dictionary associating every group element to a representation
Equivalent to {el: rep for (el, rep) in (self.group.elems, self.operators)}
- Methods
- coset_filter(subgroup)[source]#
Build the coset Fourier filter for this group G modulo subgroup H.
- Parameters:
subgroup (
LabeledRepresentation) βLabeledRepresentationfor a subgroup H β€ G.- Return type:
- Returns:
LabeledRepresentationCosetFilterfor G/H.
Example:
rep_d4 = nk.symmetry.canonical_representation(hi, lattice.point_group()) rep_c4 = nk.symmetry.canonical_representation(hi, c4_subgroup) C = rep_d4.coset_filter(rep_c4)
- irrep_subspace_dims()[source]#
Return the dimension of the subspace associated to each irreducible representation.
Requires that each operator of the representation implements the trace method.
- Return type:
- project(state, character_index=None, *, atol=1e-15, **kwargs)[source]#
Return the state projected onto the subspace associated to the irreducible representation specified by character_index.
Additional keyword arguments are forwarded to
projector(), so subclasses that acceptlabel=,k=, etc. can be used here too.
- projector(character_index=None, *, label=None, atol=1e-15)[source]#
Build the projection operator for an irrep.
Accepts either:
character_index(int): index into the character table, as in the baseRepresentation.label(str): human-readable label fromirrep_labels.
- Parameters:
character_index β Irrep index (0-based).
label β Irrep label string, e.g.
"+1"or"-1".atol β Tolerance for dropping near-zero projector terms.
- Return type:
- Returns:
A
SumOperatorprojection operator.- Raises:
ValueError β if
labelis not inirrep_labels.TypeError β if neither or both arguments are supplied.
- symmetry_adapted_basis()[source]#
Return a tuple (mat, irrep_dims), where mat is the change of basis matrix associated to a symmetry adapted basis, and irrep_dims is an array giving the dimension of the subspace associated to each irreducible representation.
The basis vectors of mat are ordered by the index of their irreducible representation.