netket.errors#

Netket has the following classes of errors.

Error classes#

HilbertIndexingDuringTracingError

Illegal attempt to use state indexing function from inside of a Jax function transformation.

HolomorphicUndeclaredWarning

Complex-to-Complex model detected.

JaxOperatorSetupDuringTracingError

Illegal attempt to use a Jax-operator Numba-operators constructed inside of a Jax function transformation with non-constant data.

JaxOperatorNotConvertibleToNumba

Illegal attempt to convert to the Numba format a Jax operator that had been flattened and unflattened.

NonHolomorphicQGTOnTheFlyDenseRepresentationError

QGTOnTheFly cannot be converted to a dense matrix for non-holomorphic functions which have complex parameters.

NumbaOperatorGetConnDuringTracingError

Illegal attempt to use Numba-operators inside of a Jax function transformation.

RealQGTComplexDomainError

This error is raised when you apply the Quantum Geometric Tensor of a

UnoptimalSRtWarning

SRt should be used when the number of parameters exceed the number of samples.

SymmModuleInvalidInputShape

This error when you attempt to use a module with an input having a wrong number of dimensions.

ParameterMismatchError

Error thrown when the structure of the parameters does not match the expected structure.

InitializePeriodicLatticeOnSmallLatticeWarning

Warning thrown when attempting to create a periodic lattice on a lattice with less than two sites in one direction.

Hilbert space errors#

Errors arising when working with Hilbert spaces and their constraints:

UnoptimisedCustomConstraintRandomStateMethodWarning

Warning thrown when calling random_state on a Hilbert space with a custom constraint.

UnhashableConstraintError

Error thrown when a constraint is not a fully static pytree, and it cannot be hashed.

InvalidConstraintInterface

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

PyTree errors#

NetKetPyTreeUndeclaredAttributeAssignmentError

Error thrown when trying to assign an undeclared attribute to a NetKet-style Pytree.