netket.errors.InvalidConstraintInterface

netket.errors.InvalidConstraintInterface#

exception netket.errors.InvalidConstraintInterface[source]#

Error thrown when a constraint for an Homogeneous Hilbert space does not conform to the expected interface.

A custom Constraint must respect the netket.hilbert.constraint.DiscreteHilbertConstraint interface by inheriting that class and by having a jax-jittable __call__ method.

If you see this error, your constraint might just be a function without inheriting from this class, or it does not have a jittable call method.

See the class documentation of netket.hilbert.constraint.DiscreteHilbertConstraint for some examples.