netket.utils.group.Permutation#
- class netket.utils.group.Permutation[source]#
Bases:
Element
- Inheritance
- __init__(permutation=None, *, name=None, permutation_array=None, inverse_permutation_array=None)[source]#
Creates a Permutation from either the array of images permutation_array or preimages inverse_permutation_array.
Exactly one argument among permutation_array and inverse_permutation_array (and the deprecated argument permutation) must be specified.
The deprecated argument permutation should be substituted for inverse_permutation_array.
Note that the left action of a permutation on an array a is a[inverse_permutation_array].
- Parameters:
permutation (
Union
[ndarray
,Array
,None
]) – (deprecated) 1D array listing \(g^{-1}(x)\) for all \(0\le x \le N-1\).name (
str
|None
) – Optional, custom name for the permutation.permutation_array (
Union
[ndarray
,Array
,None
]) – 1D array listing \(g(x)\) for all \(0\le x \le N-1\).inverse_permutation_array (
Union
[ndarray
,Array
,None
]) – 1D array listing \(g^{-1}(x)\) for all \(0\le x \le N-1\).
- Returns:
A Permutation object that encodes the specified permutation.