netket.operator.permutation.construct_permutation_operator

netket.operator.permutation.construct_permutation_operator#

netket.operator.permutation.construct_permutation_operator(hilbert_space, permutation)[source]#

Return the appropriate permutation operator depending on the type of Hilbert space.

If the Hilbert space is a spin or boson Hilbert space, a PermutationOperator will be returned, if it is a fermion Hilbert space, a PermutationOperatorFermion will be returned.

For mathematical details on permutation operators, see Representation theory in NetKet.

Parameters:
  • hilbert_space (AbstractHilbert) – The Hilbert space on which the permutation acts.

  • permutation (Permutation) – The permutation to be represented as an operator.

Returns:

Either a PermutationOperator or PermutationOperatorFermion depending on the Hilbert space type.

Raises:

TypeError – If the Hilbert space type is not supported.