Extending NetKet# Defining Custom Models Commonalities Using Flax Linen Using Jax/Stax Using Haiku Overriding defaults in NetKet NetKet Architecture: Multiple Dispatch Defining Custom Preconditioners The preconditioner interface Custom operators and observables Defining custom expect and expect_and_grad Defining custom local estimators (new) Custom Hilbert Space Constraints Built-in Constraints Overview Interface Requirements Advanced Patterns Integration with Variational States See Also The Run Loop and Callback Hooks The run loop Hook reference Implementing a custom callback Stopping the optimisation Injecting custom samples Rejecting a step Callback ordering Relationship to legacy callbacks