netket.utils.group.Permutation#

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

Bases: Element

Inheritance
Inheritance diagram of netket.utils.group.Permutation
__init__(permutation, name=None)[source]#

Creates a Permutation from an array of preimages of range(N).

Parameters:
  • permutation (Union[ndarray, Array]) – 1D array listing \(g^{-1}(x)\) for all \(0\le x < N\) (i.e., V[permutation] permutes the elements of V as desired)

  • name (Optional[str]) – optional, custom name for the permutation

Returns:

a Permutation object encoding the same permutation

Methods
__call__(ket)#

Call self as a function.

apply_to_id(x)[source]#

Returns the image of indices x under the permutation

Parameters:

x (ndarray | Array)