Netket

Latest version: v3.15.2

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

Scan your dependencies

Page 1 of 7

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.

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).

3.14.1

* Fix a dtype-stability issue in adaptive TDVP integrators [1918](https://github.com/netket/netket/pull/1918).

3.14

New features
* Hilbert spaces such as {class}`netket.hilbert.Spin` and {class}`netket.hilbert.Fock`, as well as their base class {class}`netket.hilbert.HomogeneousHilbert`, now support arbitrary custom constraints [1908](https://github.com/netket/netket/pull/1908).
* The constraint interface has been stabilised, documented, and made compatible with several utilities. It is now possible to generate random states from arbitrary constrained hilbert spaces automatically, and it is possible to index into those spaces efficiently. Look at the hilbert space documentation for more information [1908](https://github.com/netket/netket/pull/1908).
* Fermionic hilbert spaces {class}`~netket.experimental.hilbert.SpinOrbitalFermions` now support an extra arbitrary constraint that can be specified by passing the keyword argument `constraint=...` [1832](https://github.com/netket/netket/pull/1832)
* Support equinox modules as models in Variational states. Note that equinox models by default only work with scalar inputs, while NetKet requires modules that work with batch inputs, so you will have to modify them slightly.

Breaking Changes
* Jax operators now use the same `chunk_size` as specified by the user when computing the forward pass. Prior to this change, Jax operators would be chunking the sample axis, but if an operator had a lot of connected elements this would end up increasing the effective sample size [1875](https://github.com/netket/netket/pull/1875).
* Metropolis Hamiltonian sampler for numba operators has been greatly simplified in order to remove the dependency on numba4jax. The new implementation will generally be slower than before, so we encourage you to use Jax Operators if possible. In the future, if people ask for it, we may reintroduce this implementation as a separate package [1747](https://github.com/netket/netket/pull/1747).
* Previously-internal hilbert space constraint sub-module located at `netket.hilbert.index.constraints` has been moved to `netket.hilbert.constraint` [1908](https://github.com/netket/netket/pull/1908).
* Due to improvements to the saving logic, it might no longer be possible to load when using MPI the sampler state saved in previous versions using MPI, as those only contained the sampler state of the rank 0 and it was leading silently to having the same sampler state across all ranks [1914](https://github.com/netket/netket/pull/1914).

Improvements
* Specialised lattice constructors like {func}`netket.graph.Grid` now accept a `point_group` argument, overriding the default (usually maximal) point groups [1879](https://github.com/netket/netket/pull/1879).
* Methods to generate random states are automatically implemented for all {class}`netket.hilbert.HomogeneousHilbert`, constrained or not [1911](https://github.com/netket/netket/pull/1911).
* Serialization of metropolis sampler states when using MPI will now serialise the parameters across all MPI ranks, not only rank 0 [1914](https://github.com/netket/netket/pull/1914).
* Our implementation of `netket.sampler.MetropolisSampler` had a sub-optimal complexity of `O((sweep_size+1) * n_samples)` instead of `O(sweep_size * n_samples)` because it was recomputing the variational function at the beginning of every sweep. This has now been fixed [1915](https://github.com/netket/netket/pull/1915).

Bug fixes
* Fix the function {meth}`netket.graph.SpaceGroupBuilder.space_group_irreps` throwing away the imaginary part of point-group characters, which led to incorrect space-group characters in some rare cases [1876](https://github.com/netket/netket/pull/1876).
* Fixed bug [1811](https://github.com/netket/netket/pull/1811), and it is now possible to serialise sampler states that have new-style jax random number generators [#1914](https://github.com/netket/netket/pull/1914).

Finalized deprecations
Some features that have been deprecated for the last ~24 months have been finally removed from NetKet and will now raise errors. If this is a problem for you, you should install an older version of NetKet.

* Finalized deprecation for `netket.nn.update_dense_symm` utility used to change the format of stored parameters for DenseSymm layers. The method was used to update from a format used in NetKet v3.2, released in 2021.
* Finalized deprecation for `netket.nn.initializers` which has been deprecated in favor of `jax.nn.initializers` in 2021.
* Finalized deprecation for `netket.nn.Module`, `netket.nn.compact`, `netket.nn.Dense` and similar methods that have been aliasing to `flax.linen` since NetKet 3.5 (released in august 2022).
* Finalized deprecation for `rescale_shift` argument of `QGTJacobian***` implementations, which was superseeded by `diag_scale`. This was deprecated since NetKet v3.6 released in november 2022.
* Finalized deprecation for preconditioner signatures with only 2 arguments in favour of the new format using 3 arguments, which have been deprecated since NetKet v3.6 released in november 2022.

Page 1 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.