Releases: netket/netket
NetKet 3.19.2: bugfix release
NetKet 3.19.1 was a broken release and has been nuked.
What's Changed
- [jax 0.7] Support jax 0.7, take 2 by @PhilipVinc in #2072
- Generate serialization methods for ParallelTempering sampler state by @lindamauron in #2116
- swap nkjax.PRNGKey to use nkjax.key by @PhilipVinc in #2117
- [NFC][Sharding tools] Move sharding tools in subfolder. by @PhilipVinc in #2118
- Improve even more distributed documentation by @PhilipVinc in #2119
- Update automorphism by @Adrien-Kahn in #2120
- Fix a bug preventing the usage of non differentiable parameters when sharding + chunking is used by @PhilipVinc in #2124
- Fix constraint validation bug in SumConstrainedHilbertIndex by @PhilipVinc in #2127
Full Changelog: v3.19.0...v3.19.2
NetKet 3.19
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
andFermionOperator2nd
are now aliases forLocalOperatorJax
,PaulistringsJax
andFermionOperator2ndJax
. To use the previous operators, you should useFermionOperator2ndNumba
,LocalOperatorNumba
and so on. - {class}
netket.operator.ContinuousOperator
s 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 thechunk_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
- Allow for setting netket experimental sharding mode at runtime by @PhilipVinc in #2078
- Remove MPI/mpi4jax support by @PhilipVinc in #2077
- Implement VMC_SR with various run modes. by @PhilipVinc in #2007
- Allow specifying
characters
directly inSymmSumExp
by @attila-i-szabo in #2075 - Add 'deprecation warning' to _translations_along_axis and improve err… by @PhilipVinc in #2083
- Turn GraphOperator into a function building an operator by @PhilipVinc in #2090
- Update myst-nb requirement from <1.3,>=1.0 to >=1.0,<1.4 by @dependabot[bot] in #2086
- Fix some sampler tests (?) by @PhilipVinc in #2091
- Add warning that PNC is more appropriate by @inailuig in #2088
- support non-multiple chunk_size and has_aux in vjp_chunked by @inailuig in #1812
- Correct treatment of nonsymmorphic space groups, projective representations by @attila-i-szabo in #2080
- [NFC] Preliminary changes for Numba->Jax default swap by @PhilipVinc in #2095
- Make
DiscreteJaxOperator.to_sparse
return scipy matrices by default instead of Jax by @PhilipVinc in #2092 - Skip slow tests in GitHub CI, keep running them locally by @PhilipVinc in #2096
- Swap default operator implementation from Numba to Jax by @PhilipVinc in #2089
- Remove more references to mpi from tests and netket by @PhilipVinc in #2098
- Pytree: allow ignoring of some entries by @PhilipVinc in #2101
- Sharding-by-default by @PhilipVinc in #2085
- Change condition for scientific notation when printing Stats object by @Adrien-Kahn in #2102
- Bump CI versions of ruff, uv by @PhilipVinc in #2105
- Simplify the definition of continuous operators by @PhilipVinc in #2097
- Improve documentation by @PhilipVinc in #2099
- Update state within sweeps of ParallelTempering sampler by @lindamauron in #2106
- Finalize deprecations from 48 months ago to 12... by @PhilipVinc in #2108
- Add a more generic, flexible SumOperator by @PhilipVinc in #2110
- Infidelity driver by @alleSini99 in #2076
Full Changelog: v3.18...v3.19.0
NetKet 3.18.1
Minor bug fixes and improvements
Full Changelog: v3.18...v3.18.1
NetKet 3.18
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 ofSpaceGroup
is implemented with reference to its structure, making group-theory calculations much faster than for a genericPermutationGroup
. Another subclass ofPermutationGroup
, {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 withSpaceGroup
. 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
v3.17.1
Minor bugfixes
Full Changelog: v3.17...v3.17.1
NetKet 3.17
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, andnp.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
- Minor changes to Samplers by @PhilipVinc in #2011
- expect_forces_chunked statistics minor fix by @Quantumgunhee in #2013
- Tutorial ViT wave function by @llviteritti in #2004
- Update myst-nb requirement from <1.2,>=1.0 to >=1.0,<1.3 by @dependabot in #2001
- History: complexification of histdict arrays by @lgravina1997 in #2025
- Remove MetropolisSamplerPmap by @PhilipVinc in #2028
- Rename arguments in samplers to more pythonic self name by @PhilipVinc in #2029
- Samplers: add option to return the probability of samples by @PhilipVinc in #2012
New Contributors
- @Quantumgunhee made their first contribution in #2013
Full Changelog: v3.16.1...v3.17
v3.16.1
Minor fixes to the serialization of NNX models
Full Changelog: v3.16.0.post2...v3.16.1.post1
v3.16.0.post2
HotFix v2 for recent jax versions having introduced some bugs
v3.16.0.post1
Hotfix
Full Changelog: v3.16...v3.16.0.post1
NetKet 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 fromjnp.float32
tojnp.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 fromjnp.float32
tojnp.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
- Improve dtypes StaticRange by @macekmar in #1963
- Update sphinx-autodoc-typehints requirement from <3.0,>=1.22 to >=1.22,<4.0 by @dependabot in #1972
- Swap ordering of spin hilbert space by @PhilipVinc in #1977
- Sampler dtypes: use the smallest possible dtype. by @PhilipVinc in #1976
- Address TDVP Schmitt unexpected nan and tests. by @Daniel-Haas-B in #1960
- fix tests for jax 0.5 by @PhilipVinc in #1982
- handle sharding in deserialization of MCState by @lgravina1997 in #1983
- Remove flag to disable jax jit in ode integrators by @PhilipVinc in #1981
- Add support to
flax.nnx
to define neural networks by @PhilipVinc in #1986 - Move fermions to stable netket by @PhilipVinc in #1797
- Fermions to main by @jwnys in #1952
- fix: timer is never null only NullTimer by @vigsterkr in #1991
- fix: the return type of the samples should be the same as the input by @vigsterkr in #1992
- fix: BoseHubbardJax precision by @vigsterkr in #1994
- Added warning when attempting to initialize a periodic lattice on a small lattice by @wttai004 in #1990
- Skip failing tests by @PhilipVinc in #1996
- fix: n_conn implementation for DiscreteOperatorJax and FermionOperator2ndJax by @vigsterkr in #1995
New Contributors
- @lgravina1997 made their first contribution in #1983
- @vigsterkr made their first contribution in #1991
- @wttai004 made their first contribution in #1990
Full Changelog: v3.15.2...v3.16