netket.utils.group.PermutationGroup#
- class netket.utils.group.PermutationGroup[source]#
Bases:
FiniteGroup
Collection of permutation operations acting on sequences of length
degree
.Group elements need not all be of type
netket.utils.group.Permutation
, only act as such on a sequence when called.The class can contain elements that are distinct as objects (e.g.,
Identity()
andTranslation((0,))
) but have identical action. Those can be removed by callingremove_duplicates()
.- Inheritance
- 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:
The three arrays
classes: a boolean array, each row indicating the elements that belong to one conjugacy class
representatives: the lowest-indexed member of each conjugacy class
inverse: 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 toIdentity()
- 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\) .
- shape#
Tuple
(<# of group elements>, <degree>)
.Equivalent to
self.to_array().shape
.
- Methods
-
- character_table(multiplier=None)[source]#
Calculates the character table using Burnside’s algorithm.
- Parameters:
multiplier (
Union
[ndarray
,Array
,None
]) – (optional) Schur multiplier- Return type:
- Returns:
a matrix of all linear irrep characters (if
multiplier is None
) or projective irrep characters with the givenmultiplier
, 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:
- Return type:
- Returns:
A tuple containing a list of strings and an array
classes
: a text description of a representative of each conjugacy class (or each group element) as a listcharacters
: a matrix, each row of which lists 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:
- Return type:
- 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
- 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:
- Returns:
characters_by_class
a 2D array, each row containing the characters of a representative element of each conjugacy class in one projective irrep with the given multiplier.
class_factors
a 1D array listing the “class factors” of each element of the group. The character of each element is the product of the character of the class representative with this class factor. (Only returned if
multiplier
is notNone
.)
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
PermutationGroup
with duplicate elements (that is, elements which represent identical permutations) removed.- Parameters:
return_inverse – If True, also return indices to reconstruct the original group from the result.
- Return type:
- Returns:
The permutation group with duplicate elements removed. If
return_inverse==True
, it also returns the indices needed to reconstruct the original group from the result.
- to_array()[source]#
Convert the abstract group operations to an array of permutation indices.
It returns a matrix where the i-th row contains the indices corresponding to the i-th group element. That is,
self.to_array()[i, j]
is \(g_i^{-1}(j)\). Moreover,G = # this permutation group... V = np.arange(G.degree) assert np.all(G(V) == V[..., G.to_array()])