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.

InsufficientSamplesForSRWarning

Warning issued when using Stochastic Reconfiguration (SR) with insufficient samples.

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.

JaxOperatorGetConnInJitError

Illegal attempt to use get_conn_flattened() or similar methods inside of a Jax function transformation with a Jax operator.

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.

OperatorMultiplicationDeprecationWarning

Warning issued when using deprecated A*B syntax for operator multiplication.

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.

MCMixedStateExpectAndGradOnPhysicalOperatorError

Error raised when calling netket.vqs.MCMixedState.expect_and_grad() with a physical operator instead of a superoperator.

InitializePeriodicLatticeOnSmallLatticeWarning

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

NNXModuleToSamplerInput

Error thrown when attempting to use a sampler with a bare NNX module.

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.

Driver update warnings#

LogAdditionalDataSignatureDeprecationWarning

Warning issued when a driver subclass overrides _log_additional_data with the old two-argument signature (self, log_dict, step) instead of the current one-argument signature (self, log_dict).

DriverResetDeprecationWarning

Warning issued when calling the deprecated reset() method on a driver.

ForwardAndBackwardDeprecationWarning

Warning issued when a driver subclass overrides the deprecated _forward_and_backward method instead of the renamed compute_loss_and_update.