netket.symmetry.group.FiniteGroup#

class netket.symmetry.group.FiniteGroup[source]#

Bases: FiniteSemiGroup

Collection of Elements expected to satisfy group axioms. Unlike FiniteSemiGroup, product tables, conjugacy classes, etc. can be calculated.

Group elements can be implemented in any way, as long as a subclass of Group is able to implement their action. Subclasses must implement a _canonical() method that returns an array of integers for each acceptable Element such that two Elements are considered equal iff the corresponding matrices are equal.

Inheritance
Inheritance diagram of netket.symmetry.group.FiniteGroup
Attributes
character_table_by_class#

Calculates the character table using Burnside’s algorithm.

Each row of the output lists the characters of one irrep in the order the conjugacy classes are listed in conjugacy_classes.

Assumes that Identity() == self[0], if not, the sign of some characters may be flipped. The irreps are sorted by dimension.

conjugacy_classes#

The conjugacy classes of the group.

Returns:

A tuple (classes, representatives, inverse) where classes is a boolean array whose rows indicate the elements belonging to each conjugacy class, representatives contains the lowest-indexed member of each conjugacy class, and inverse stores the conjugacy-class index of every group element.

conjugacy_table#

The conjugacy table of the group.

Assuming the definitions

g = self[idx_g]
h = self[idx_h]

self[self.conjugacy_table[idx_g,idx_h]] corresponds to \(h^{-1}gh\).

inverse#

Indices of the inverse of each element.

Assuming the definitions

g = self[idx_g]
h = self[self.inverse[idx_g]]

gh = product(g, h) is equivalent to Identity()

product_table#

A table of indices corresponding to \(g^{-1} h\) over the group.

Assuming the definitions

g = self[idx_g]
h = self[idx_h]
idx_u = self.product_table[idx_g, idx_h]

self[idx_u] corresponds to \(u = g^{-1} h\) .

elems: list[Element]#

List of group elements.

Methods
__call__(initial)[source]#

Apply all group elements to all entries of initial along the last axis.

character_table(multiplier=None)[source]#

Calculates the character table using Burnside’s algorithm.

Parameters:

multiplier (Union[ndarray, Array, None]) – (optional) Schur multiplier

Return type:

ndarray

Returns:

a matrix of all linear irrep characters (if multiplier is None) or projective irrep characters with the given multiplier, sorted by dimension.

Each row of lists the characters of all group elements for one irrep, i.e. self.character_table()[i,g] gives \(\chi_i(g)\).

It is assumed that Identity() == self[0]. If not, the sign of some characters may be flipped and the sorting by dimension will be wrong.

character_table_readable(multiplier=None, full=False)[source]#

Returns a conventional rendering of the character table.

Parameters:
  • multiplier (Union[ndarray, Array, None]) – (optional) Schur multiplier

  • full (bool) – whether the character table for all group elements (True) or one representative per conjugacy class (False, default)

Return type:

tuple[list[str], Union[ndarray, Array]]

Returns:

A tuple (classes, characters) where classes is a list of string labels for each conjugacy-class representative (or for each group element when full=True), and characters is a matrix whose rows list the characters of one irrep.

check_multiplier(multiplier, rtol=1e-08, atol=0)[source]#

Checks the associativity constraint of Schur multipliers.

\[\alpha(x, y) \alpha(xy, z) = \alpha(x, yz) \alpha(y, z).\]
Parameters:
  • multiplier (Union[ndarray, Array]) – the array of Schur multipliers \(\alpha(x,y)\)

  • rtol – relative tolerance

  • atol – absolute tolerance

Return type:

bool

Returns:

whether multiplier is a valid Schur multiplier up to the given tolerance

Raises:

ValueError – if the shape of multiplier does not match the size of the group

irrep_matrices()[source]#

Returns matrices that realise all irreps of the group.

Return type:

list[Union[ndarray, Array]]

Returns:

A list of 3D arrays such that self.irrep_matrices()[i][g] contains the representation of self[g] consistent with the characters in self.character_table()[i].

is_subgroup(other, *, proper=False)[source]#

Return True if other is a subgroup of self.

Checks Lagrange’s theorem (|self| divisible by |other|) and that every element of other is present in self.

Parameters:
  • other (FiniteGroup) – the candidate subgroup.

  • proper (bool) – if True, also require |other| < |self| (i.e. other != self).

Return type:

bool

Returns:

True if every element of other belongs to self (and other is strictly smaller if proper=True).

projective_characters_by_class(multiplier)[source]#

Calculates the character table of projective representations with a given Schur multiplier α using a modified Burnside algorithm.

Parameters:

multiplier (Union[ndarray, Array, None]) – the unitary Schur multiplier. If unspecified, computes linear representation characters.

Return type:

tuple[ndarray, ndarray]

Returns:

If multiplier is None, returns characters_by_class, a 2D array whose rows contain the characters of one linear irrep evaluated on a representative of each conjugacy class. Otherwise it returns a tuple (characters_by_class, class_factors), where class_factors is a 1D array listing the per-element factors needed to recover the character of each element from the character of its class representative.

Note: the algorithm and the definitions above are explained in more detail in https://arxiv.org/abs/2505.14790.

remove_duplicates(*, return_inverse=False)[source]#

Returns a new FiniteGroup with duplicate elements (that is, elements with identical canonical forms) removed.

Parameters:

return_inverse – If True, also return indices to reconstruct the original group from the result.

Returns:

The group with duplicate elements removed. If return_inverse==True it also returns the list of indices needed to reconstruct the original group from the result.

replace(**updates)[source]#

Returns a new object replacing the specified fields with new values.