netket.utils.group.Permutation#

class netket.utils.group.Permutation[source]#

Bases: Element

Inheritance
Inheritance diagram of netket.utils.group.Permutation
__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.

Attributes
inverse_permutation_array#
permutation#
permutation_array#
Methods
__call__(ket)[source]#

Call self as a function.

apply_to_id(x)[source]#

Returns the image of indices x under the permutation

Parameters:

x (ndarray | Array)