netket.symmetry.Representation#

class netket.symmetry.Representation[source]#

Bases: object

A representation of a group.

This is the central object for symmetrizing wavefunctions. The character table of the group of the representation indicates the various subspaces on which the wavefunction can be projected. A variational state vstate can be projected on the subspace associated to the character k by calling representation.project(vstate, k) , which returns the new, projected variational state.

For more details on the theory of representations of finite group and its application in variational Monte Carlo, we refer to Representation theory in NetKet.

For a tutorial of symmetrizing variational states in practice, we refer to the Symmetries, Representations and Projectors for arbitrary NQS.

Inheritance
Inheritance diagram of netket.symmetry.Representation
__init__(group, representation_dict)[source]#

Construct a Representation.

Parameters:
  • group (FiniteGroup) – The group being represented.

  • representation_dict (dict[Element, DiscreteJaxOperator]) – The dictionary that defines the representation. Its keys must be the elements of group. The value this dictionary associates to a group element is the operator that the representation maps this group element onto.

Attributes
character#

The vector storing the character of the representation.

Corresponds to [op.trace() for (_, op) in self].

Requires that each operator of the representation implements the trace method.

representation_dict#

Dictionary associating every group element to a representation

Equivalent to {el: rep for (el, rep) in (self.group.elems, self.operators)}

Methods
irrep_subspace_dims()[source]#

Return the dimension of the subspace associated to each irreducible representation.

Requires that each operator of the representation implements the trace method.

Return type:

int

project(state, character_index=None, *, atol=1e-15, **kwargs)[source]#

Return the state projected onto the subspace associated to the irreducible representation specified by character_index.

Additional keyword arguments are forwarded to projector(), so subclasses that accept label=, k=, etc. can be used here too.

Return type:

MCState

Parameters:

atol (float)

projector(character_index, *, atol=1e-15)[source]#

Build the projection operator corresponding to a given irreducible representation.

As there might be some terms in the projector whose character is 0, we drop them by default according to a given absolute tolerance.

Parameters:
  • character_index (int) – The index of the irreducible representation for which to construct the projector.

  • atol (float) – Absolute tolerance used to drop zero-terms from the projector to reduce its number of connected entries (defaults to 1e-15).

Return type:

DiscreteJaxOperator

Returns:

A netket.operator.DiscreteJaxOperator that projects on the relevant subspace.

symmetry_adapted_basis()[source]#

Return a tuple (mat, irrep_dims), where mat is the change of basis matrix associated to a symmetry adapted basis, and irrep_dims is an array giving the dimension of the subspace associated to each irreducible representation.

The basis vectors of mat are ordered by the index of their irreducible representation.

Return type:

tuple[ndarray, ndarray]