netket.hilbert.constraint.ExtraConstraint#

class netket.hilbert.constraint.ExtraConstraint[source]#

Bases: ExtraConstraint

Wraps a Constraint and its HilbertIndex into a second constraint (with a default lookup-based hilbert index).

The first argument is the base constraint while the second is the wrapping one.

Inheritance
Inheritance diagram of netket.hilbert.constraint.ExtraConstraint
Attributes
base_constraint: DiscreteHilbertConstraint#
extra_constraint: DiscreteHilbertConstraint#
Methods
replace(**kwargs)[source]#

Replace the values of the fields of the object with the values of the keyword arguments. If the object is a dataclass, dataclasses.replace will be used. Otherwise, a new object will be created with the same type as the original object.

Return type:

TypeVar(P, bound= Pytree)

Parameters:
  • self (P)

  • kwargs (Any)