netket.hilbert.TensorHilbert#

class netket.hilbert.TensorHilbert[source]#

Bases: ABC

Abstract base class for the tensor product of several sub-spaces, representing the space.

This class can also be used to construct the correct type of TensorHilbert subclass given the input types: if all input types are Generic hilbert spaces, TensorGeneralHilbert will be constructed, while if they all are DiscreteHilbert a TensorDiscreteHilbert will be created.

In general you should not construct this object directly, but you should simply multiply different hilbert spaces together. In this case, Python’s * operator will be interpreted as a tensor product.

This is an abstract mixing class that should be inherited from, together with another class that inherits from AbstractHilbert.

Inheritance
Inheritance diagram of netket.hilbert.TensorHilbert
__init__(hilb_spaces, *args, **kwargs)[source]#

Constructs a tensor Hilbert space.

Parameters:
Attributes
size#
subspaces#

Tuplec ontaining all the subspaces of this tensor product of Hilbert spaces.

Methods
ptrace(sites)[source]#
Return type:

Optional[AbstractHilbert]

Parameters:

sites (int | list)