Skip to content

Releases: netket/netket

NetKet 3.19.2: bugfix release

04 Sep 13:02
Compare
Choose a tag to compare

NetKet 3.19.1 was a broken release and has been nuked.

What's Changed

Full Changelog: v3.19.0...v3.19.2

NetKet 3.19

25 Jul 12:58
36edec2
Compare
Choose a tag to compare

This version will be the last one supporting Jax 0.5, and therefore will be the last to run on manylinux2014.
In practice, this will be the last version to run on computers/clusters with outdated OS/GLIBC.
The next NetKet version will require Jax 0.7 and Python 3.11 and be incredibly more powerful.

Breaking Changes

  • MPI is no longer supported as a parallelization mode for NetKet. JAX sharding is now the only supported method for distributed computing.
  • {func}netket.operator.GraphOperator is now a function and not a class anymore.
  • {meth}netket.operator.DiscreteJaxOperator.to_sparse now returns a scipy sparse matrix by default #2092.
  • The default implementation of all NetKet operator constructed has been swapped from the previous Numba implementation to the Jax one. The class names LocalOperator, PauliStrings and FermionOperator2nd are now aliases for LocalOperatorJax, PaulistringsJax and FermionOperator2ndJax. To use the previous operators, you should use FermionOperator2ndNumba, LocalOperatorNumba and so on.
  • {class}netket.operator.ContinuousOperators and subclasses have had their interface considerably changed, and they are now Pytrees. If you have custom Continuous Operators and your code is somewhere accessible with a few stars on GitHub, I've notified you. If you haven't, you are a bit evil but worry not. Just look at NetKet's implementation of classes like {class}netket.operator.KineticOperator to understand what to change #2097.

New features

  • A new {class}netket.experimental.driver.VMC_SR driver, which implements both standard SR and the kernel trick/minSR variant, using an often more efficient implementation, is now available. We advise everyone using SR to switch to this driver #2007.
  • {class}netket.nn.blocks.SymmExpSum supports specifying group characters as an array in addition to their index in the full character table #2075.
  • {class}netket.utils.group.FiniteGroup can now compute projective irrep characters of groups in addition to standard linear irreps #2080.
  • {class}netket.sampler.rules.LangevinRule will not inherit the chunk_size from the sampler if its own chunk size is not set.
  • {class}netket.stats.Stats repr logic is improved to switch to scientific notation more often when the quantity is close to 0. Moreover, the character count is fixed so the progress bar will wiggle less #2102.
  • When using sub-optimal {class}netket.operator.FermionOperator2nd with hilbert spaces with a fixed number of particles, a warning will be now printed suggesting users to switch to Particle Number Conserving operators #2088.
  • A new, general implementation of {class}netket.operator.SumOperator can be used to sum 2 or more different operators of any different type, which was previously not possible.
  • A new {class}netket.experimental.observable.InfidelityOperator for computing the infidelity between two quantum states (possibly with an operator in the middle) and a new {class}netket.experimental.driver.Infidelity_SR driver for minimizing it, which implements both standard SR and the kernel trick/minSR variant, are now available. #2076.

Deprecations and Removals

  • {class}netket.experimental.driver.VMC_SRt has been deprecated in favour of {class}netket.experimental.driver.VMC_SR, which implements both standard SR and the kernel trick/minSR variant, and possibly more efficiently #2007.
  • Finalized deprecations from August 2024 and earlier #2108.

Bug Fixes

  • Do not error when the chunk_size of a sampler is larger than the number of chains.
  • {class}netket.graph.space_group.SpaceGroup now generates correct space-group irreps for nonsymmorphic space groups #2080.
  • Addressed an issue with Metropolis Samplers providing to the transition rule a non-up-to-date sampler state inside a sweep. In practice nobody ever reported this bug before.
  • Support flax.nnx for flax version 10.7.

What's Changed

Full Changelog: v3.18...v3.19.0

NetKet 3.18.1

18 Jul 10:47
Compare
Choose a tag to compare

Minor bug fixes and improvements

Full Changelog: v3.18...v3.18.1

NetKet 3.18

03 Jul 11:35
Compare
Choose a tag to compare

This version will be the last one supporting Python 3.10 and Jax 0.5. The next NetKet version will require Jax 0.7 and Python 3.11 and be incredibly more powerful.

New features

  • Added particle-number conserving fermionic operators {class}netket.experimental.operator.ParticleNumberConservingFermioperator2nd and {class}netket.experimental.operator.ParticleNumberAndSpinConservingFermioperator2nd
    which are more efficient and produce fewer connected elements than the generic {class}netket.operator.FermionOperator2ndJax operator, and a explicit Fermi-Hubbard operator implementation {class}netket.experimental.operator.FermiHubbardJax based on it #2024.
  • The functionality of {class}~netket.graph.SpaceGroupBuilder is merged into a subclass of {class}~netket.utils.group.PermutationGroup called {class}~netket.graph.SpaceGroup that also represents the space group itself. The product table of SpaceGroup is implemented with reference to its structure, making group-theory calculations much faster than for a generic PermutationGroup. Another subclass of PermutationGroup, {class}~netket.graph.TranslationGroup, is introduced to handle translation groups efficiently. All functionality of {meth}~netket.graph.Lattice.space_group_builder() is taken over by {meth}~netket.graph.Lattice.space_group(), so the former is deprecated #2051.

Deprecations and Removals

  • The nk.utils.group.Permutation class, which was constructed by passing an inverse permutation, can now be constructed by passing both a permutation array or an inverse permutation array. It's attributes have also been updated to reflect the change. If you were operating directly on those objects you will have to update how you build them #2067.
  • Removed nk.hilbert.CustomHilbert, as it has been deprecated for a long time and was not fully functional anymore. If you need to build a custom Hilbert space, define a class. #2073.
  • Some methods specific to SpaceGroupBuilder have been removed as it has been merged with SpaceGroup. If you were manipulating this object directly you might have to update some usages. See the new feature above as well #2051.
  • The Particle Hilbert space has been moved to experiemntal to reflect the fact that it has seen very little development since its inception #2058.

Bug Fixes

  • Fixed a bug in the computation of the Autocorrelation time when using sharding #2044.
  • When using a Parallel Tempering sampler with a custom set of diffusion parameters their normalisation was computed incorrectly. This has been fixed #2041.

v3.17.1

28 Apr 15:37
Compare
Choose a tag to compare

Minor bugfixes

Full Changelog: v3.17...v3.17.1

NetKet 3.17

20 Apr 09:23
Compare
Choose a tag to compare

This version (as all previous versions) are incompatible with Jax 0.6 . A future release will make it compatible.

Breaking Changes

  • The {meth}~netket.sampler.Sampler._sample_chain method of {class}~netket.sampler.Sampler, as well as {meth}~netket.sampler.MetropolisSampler._sample_next is now passed a new optional keyword argument, return_log_probabilities. This means that custom samplers will stop working unless they start accepting this new extra keyword argument. To upgrade, we suggest to simply raise an error if this extra argument is True #2012.

New Features

  • The {meth}~netket.sampler.Sampler.sample method of {class}~netket.sampler.Sampler now accepts a new optional keyword argument, return_log_probabilities which, if specified, will make the samplers return both the samples and the corresponding log-probabilities. The default is False, and therefore the default behaviour is unchanged #2012.

Improvements

  • When loading log files with {meth}netket.utils.history.HistoryDict.from_file, the real and imaginary part are re-joined together to reproduce the original history objects, and np.nan are also correctly deserialized #2025.

Bug Fixes

  • A minor bug that lead to a wrong calculation of Rhat when using chunking has been addressed #2013.

What's Changed

New Contributors

Full Changelog: v3.16.1...v3.17

v3.16.1

07 Feb 11:02
Compare
Choose a tag to compare

Minor fixes to the serialization of NNX models

Full Changelog: v3.16.0.post2...v3.16.1.post1

v3.16.0.post2

04 Feb 15:08
Compare
Choose a tag to compare

HotFix v2 for recent jax versions having introduced some bugs

v3.16.0.post1

04 Feb 14:24
Compare
Choose a tag to compare

Hotfix

Full Changelog: v3.16...v3.16.0.post1

NetKet 3.16

04 Feb 14:21
Compare
Choose a tag to compare

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.Samplers 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.
  • NetKet now supports networks defined using NNX, the future flax API to define neural networks #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.

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
  • A performance bug that caused .block_until_ready() to be called every time we sampled, even when not timing, was addressed 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.
  • 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.

What's Changed

New Contributors

Full Changelog: v3.15.2...v3.16