Netket

Latest version: v3.16.1.post1

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

3.17

Breaking Changes

Deprecations

Bug Fixes

3.16

Breaking Changes
* The ordering of the {class}`netket.hilbert.Spin` hilbert space has been changed to reflect the more rational ordering of spin up == 1 and spin down == -1. T
* The default dtype of the samples returned from {meth}`~netket.hilbert.DiscreteHilbert.random_state` has been changed to be consistent with the default dtype of the local values, and will generally switch from ``jnp.float32`` to ``jnp.int8``.
* The default dtype of all {class}`netket.sampler.Sampler`s and their subclasses is now inferred from the Hilbert space, and will generally change from ``jnp.float32`` to ``jnp.int8``.

Improvements
* The default dtype of samples generated by discrete Hilbert spaces is now the smallest dtype possible that can represent all local degrees of freedom, and is now much smaller than before [1963](https://github.com/netket/netket/pull/1963).
* NetKet now supports networks defined using [NNX](https://flax.readthedocs.io/en/latest/why.html), the future flax API to define neural networks [#1986](https://github.com/netket/netket/pull/1986).
* Creating a graph with periodic boundary conditions along a direction with only 2 sites will now raise a warning, as the underlying graph is the same as without periodic boundary conditions [1990](https://github.com/netket/netket/pull/1990).

Deprecations
* The flag ``NETKET_DISABLE_ODE_JIT`` which has long defaulted to True, has been removed. Now ODE integrator drivers can only run outside of jit, because jax has not supported re-entrant jitting since several versions and officially removed support for it in jax 0.5.

Bug Fixes
* A bug in the deserialization of variational states, which was not properly restoring the good sharding, has been fixed [1983](https://github.com/netket/netket/pull/1983)
* A performance bug that caused `.block_until_ready()` to be called every time we sampled, even when not timing, was addressed [1991](https://github.com/netket/netket/pull/1991).
* The default implementation of {meth}`netket.operator.DiscreteJaxOperator.n_conn` has been improved to return a more realistic value. This should mainly affect `~netket.operator.BoseHubbardJax` [1995](https://github.com/netket/netket/pull/1995).
* A bug that caused {meth}`~netket.operator.FermionOperator2nd.n_conn` to raise an error if called immediately after constructing the operator has been addressed [1995](https://github.com/netket/netket/pull/1995).

3.15

Improvements
* The {meth}`~netket.graph.Lattice.draw` method of {class}`~netket.graph.Lattic` has been overhauled, and now supports 3D lattices and additional keyword arguments. The defaults are now tuned to draw the whole lattice as well as repeated cells due to periodicity, as well as the basis vectors.
* Drivers now call the loggers from all ranks, allowing more advanced logging logic (and checkpointers) to be implemented [1920](https://github.com/netket/netket/pull/1920).
* The `netket.experimental.dynamics` module has been greatly refactored, changing all internal logics but exposing a well designed, easier to extend interface. While the interface is not yet documented, it is now reasonably possible to implement new ode integrators on top of our interface to be used with {class}`~netket.experimental.driver.TDVP` or other drivers [1933](https://github.com/netket/netket/pull/1933).
* Timing of the run function with `timeit=True` is now more accurate, even on GPUs, but it will decrease performance [1958](https://github.com/netket/netket/pull/1958).
* The model {class}`netket.models.Jastrow` now constructs its kernel matrix differently, resulting in faster calculations, especially on GPUs. The usage of the class is unchanged and the internal structure of the parameters does not break from previous versions [1964](https://github.com/netket/netket/pull/1964).
* Several under-the-hood changes to better serialize objects containing sharded arrays.
* The {class}`~netket.utils.history.History` objects logged into a logger are now stored in a {class}`~netket.utils.history.HistoryDict` dictionary instead of a standard dictionary. This should be a transparent change, as the ``HistoryDict`` behaves as a standard dictionary, but will allow for improved serialization and deserialization.
* It is now possible to load a json-serialized ``.log`` file from standard loggers with the command {meth}`netket.utils.history.HistoryDict.from_file`.


Breaking Changes
* Removed support for using Numba-operators under sharding. This has never really worked realiably and lead to uncomprehensible crashes, and was very hard to maintain so it's leaving [1919](https://github.com/netket/netket/pull/1919).
* Loggers will now be called from all MPI ranks/ Jax processes, and are themselves responsible for only performing expensive I/O operations on a single rank (such as rank 0). The attribute {attr}`netket.logging.AbstractLog._is_master_process` can be used to determine whether the logger is being executed on the master process or not. For examples on how update loggers, refer to {class}`netket.logging.RuntimeLog` or {class}`netket.logging.TensorboardLog` [1920](https://github.com/netket/netket/pull/1920).
* The `integrator` argument of the constructors {class}`~netket.experimental.driver.TDVP` and {class}`~netket.experimental.driver.TDVPSchmitt` has been renamed to `ode_solver`, and a deprecation warning will be raised if `integrator is specified`. The attribute `integrator` of the driver is maintained, albeit it has sensibly different internals, but we also have added a new `ode_solver` attribute as well [1933](https://github.com/netket/netket/pull/1933).

Deprecations
* Constructing the {class}~`netket.optimizer.SR` object with `SR(qgt=QGTType(...))` is now deprecated. This construction can lead to unexpected results because the keyword arguments specified in the `QGTType` are overwritten by those specified by the SR class and its defaults. To fix this, construct SR as `SR(qgt=QGTType, ...)`. A warning will be raised when using the deprecated syntax, and this will become an error in a future release.

3.14.4

* Fix a bug introduced in 3.14.3 when using chunking [1943](https://github.com/netket/netket/pull/1943).
* Remove upper version constraints for flax and numba
* Support jax 0.4.35
* Support mpi4py>4

3.14.3

* Fix an issue in Jax operators, which would not be chunking correctly if they had more connected entries than the chunk size [1940](https://github.com/netket/netket/pull/1940).

3.14.2

* Fix an issue in {class}`~netket.experimental.hilbert.SpinOrbitalFermions` where the extra constraint would not work without a fermion number constraint [1924](https://github.com/netket/netket/pull/1924).

Page 1 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.