Recent Releases of netket

netket - 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 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

  • Allow for setting netket experimental sharding mode at runtime by @PhilipVinc in https://github.com/netket/netket/pull/2078
  • Remove MPI/mpi4jax support by @PhilipVinc in https://github.com/netket/netket/pull/2077
  • Implement VMC_SR with various run modes. by @PhilipVinc in https://github.com/netket/netket/pull/2007
  • Allow specifying characters directly in SymmSumExp by @attila-i-szabo in https://github.com/netket/netket/pull/2075
  • Add 'deprecation warning' to translationsalong_axis and improve err… by @PhilipVinc in https://github.com/netket/netket/pull/2083
  • Turn GraphOperator into a function building an operator by @PhilipVinc in https://github.com/netket/netket/pull/2090
  • Update myst-nb requirement from <1.3,>=1.0 to >=1.0,<1.4 by @dependabot[bot] in https://github.com/netket/netket/pull/2086
  • Fix some sampler tests (?) by @PhilipVinc in https://github.com/netket/netket/pull/2091
  • Add warning that PNC is more appropriate by @inailuig in https://github.com/netket/netket/pull/2088
  • support non-multiple chunksize and hasaux in vjp_chunked by @inailuig in https://github.com/netket/netket/pull/1812
  • Correct treatment of nonsymmorphic space groups, projective representations by @attila-i-szabo in https://github.com/netket/netket/pull/2080
  • [NFC] Preliminary changes for Numba->Jax default swap by @PhilipVinc in https://github.com/netket/netket/pull/2095
  • Make DiscreteJaxOperator.to_sparse return scipy matrices by default instead of Jax by @PhilipVinc in https://github.com/netket/netket/pull/2092
  • Skip slow tests in GitHub CI, keep running them locally by @PhilipVinc in https://github.com/netket/netket/pull/2096
  • Swap default operator implementation from Numba to Jax by @PhilipVinc in https://github.com/netket/netket/pull/2089
  • Remove more references to mpi from tests and netket by @PhilipVinc in https://github.com/netket/netket/pull/2098
  • Pytree: allow ignoring of some entries by @PhilipVinc in https://github.com/netket/netket/pull/2101
  • Sharding-by-default by @PhilipVinc in https://github.com/netket/netket/pull/2085
  • Change condition for scientific notation when printing Stats object by @Adrien-Kahn in https://github.com/netket/netket/pull/2102
  • Bump CI versions of ruff, uv by @PhilipVinc in https://github.com/netket/netket/pull/2105
  • Simplify the definition of continuous operators by @PhilipVinc in https://github.com/netket/netket/pull/2097
  • Improve documentation by @PhilipVinc in https://github.com/netket/netket/pull/2099
  • Update state within sweeps of ParallelTempering sampler by @lindamauron in https://github.com/netket/netket/pull/2106
  • Finalize deprecations from 48 months ago to 12... by @PhilipVinc in https://github.com/netket/netket/pull/2108
  • Add a more generic, flexible SumOperator by @PhilipVinc in https://github.com/netket/netket/pull/2110
  • Infidelity driver by @alleSini99 in https://github.com/netket/netket/pull/2076

Full Changelog: https://github.com/netket/netket/compare/v3.18...v3.19.0

- Python
Published by PhilipVinc 10 months ago

netket - NetKet 3.18.1

Minor bug fixes and improvements

Full Changelog: https://github.com/netket/netket/compare/v3.18...v3.18.1

- Python
Published by PhilipVinc 11 months ago

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

- Python
Published by PhilipVinc 11 months ago

netket - v3.17.1

Minor bugfixes

Full Changelog: https://github.com/netket/netket/compare/v3.17...v3.17.1

- Python
Published by PhilipVinc about 1 year ago

netket - 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, 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

  • Minor changes to Samplers by @PhilipVinc in https://github.com/netket/netket/pull/2011
  • expectforceschunked statistics minor fix by @Quantumgunhee in https://github.com/netket/netket/pull/2013
  • Tutorial ViT wave function by @llviteritti in https://github.com/netket/netket/pull/2004
  • Update myst-nb requirement from <1.2,>=1.0 to >=1.0,<1.3 by @dependabot in https://github.com/netket/netket/pull/2001
  • History: complexification of histdict arrays by @lgravina1997 in https://github.com/netket/netket/pull/2025
  • Remove MetropolisSamplerPmap by @PhilipVinc in https://github.com/netket/netket/pull/2028
  • Rename arguments in samplers to more pythonic self name by @PhilipVinc in https://github.com/netket/netket/pull/2029
  • Samplers: add option to return the probability of samples by @PhilipVinc in https://github.com/netket/netket/pull/2012

New Contributors

  • @Quantumgunhee made their first contribution in https://github.com/netket/netket/pull/2013

Full Changelog: https://github.com/netket/netket/compare/v3.16.1...v3.17

- Python
Published by PhilipVinc about 1 year ago

netket - v3.16.1

Minor fixes to the serialization of NNX models

Full Changelog: https://github.com/netket/netket/compare/v3.16.0.post2...v3.16.1.post1

- Python
Published by PhilipVinc over 1 year ago

netket -

HotFix v2 for recent jax versions having introduced some bugs

- Python
Published by PhilipVinc over 1 year ago

netket - v3.16.0.post1

Hotfix

Full Changelog: https://github.com/netket/netket/compare/v3.16...v3.16.0.post1

- Python
Published by PhilipVinc over 1 year ago

netket - 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 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

  • Improve dtypes StaticRange by @macekmar in https://github.com/netket/netket/pull/1963
  • Update sphinx-autodoc-typehints requirement from <3.0,>=1.22 to >=1.22,<4.0 by @dependabot in https://github.com/netket/netket/pull/1972
  • Swap ordering of spin hilbert space by @PhilipVinc in https://github.com/netket/netket/pull/1977
  • Sampler dtypes: use the smallest possible dtype. by @PhilipVinc in https://github.com/netket/netket/pull/1976
  • Address TDVP Schmitt unexpected nan and tests. by @Daniel-Haas-B in https://github.com/netket/netket/pull/1960
  • fix tests for jax 0.5 by @PhilipVinc in https://github.com/netket/netket/pull/1982
  • handle sharding in deserialization of MCState by @lgravina1997 in https://github.com/netket/netket/pull/1983
  • Remove flag to disable jax jit in ode integrators by @PhilipVinc in https://github.com/netket/netket/pull/1981
  • Add support to flax.nnx to define neural networks by @PhilipVinc in https://github.com/netket/netket/pull/1986
  • Move fermions to stable netket by @PhilipVinc in https://github.com/netket/netket/pull/1797
  • Fermions to main by @jwnys in https://github.com/netket/netket/pull/1952
  • fix: timer is never null only NullTimer by @vigsterkr in https://github.com/netket/netket/pull/1991
  • fix: the return type of the samples should be the same as the input by @vigsterkr in https://github.com/netket/netket/pull/1992
  • fix: BoseHubbardJax precision by @vigsterkr in https://github.com/netket/netket/pull/1994
  • Added warning when attempting to initialize a periodic lattice on a small lattice by @wttai004 in https://github.com/netket/netket/pull/1990
  • Skip failing tests by @PhilipVinc in https://github.com/netket/netket/pull/1996
  • fix: n_conn implementation for DiscreteOperatorJax and FermionOperator2ndJax by @vigsterkr in https://github.com/netket/netket/pull/1995

New Contributors

  • @lgravina1997 made their first contribution in https://github.com/netket/netket/pull/1983
  • @vigsterkr made their first contribution in https://github.com/netket/netket/pull/1991
  • @wttai004 made their first contribution in https://github.com/netket/netket/pull/1990

Full Changelog: https://github.com/netket/netket/compare/v3.15.2...v3.16

- Python
Published by PhilipVinc over 1 year ago

netket - v3.15.2

Full Changelog: https://github.com/netket/netket/compare/v3.15.1...v3.15.2

- Python
Published by PhilipVinc over 1 year ago

netket - v3.15.1

What's Changed

  • Fix exotic history logging bug (+a sharding one) by @PhilipVinc in https://github.com/netket/netket/pull/1967
  • Throw informative error when changing parameters by @PhilipVinc in https://github.com/netket/netket/pull/1968

Full Changelog: https://github.com/netket/netket/compare/v3.15.0...v3.15.1

- Python
Published by PhilipVinc over 1 year ago

netket - NetKet 3.15.0

NetKet 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.
  • 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.
  • Timing of the run function with timeit=True is now more accurate, even on GPUs, but it will decrease performance #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.
  • 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.
  • 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.
  • 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.

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.

Full Changelog: https://github.com/netket/netket/compare/v3.14.4...v3.15.0

- Python
Published by PhilipVinc over 1 year ago

netket - NetKet 3.14.4.post1

Bump minimum numba version to help pypi resolver

- Python
Published by PhilipVinc over 1 year ago

netket - NetKet 3.14.4

Full Changelog: https://github.com/netket/netket/compare/v3.14.3...v3.14.4

- Python
Published by PhilipVinc over 1 year ago

netket - v3.14.3

What's Changed

  • Fix #1916: Make RK structures more type-stable by @PhilipVinc in https://github.com/netket/netket/pull/1918
  • Fix chunking for Jax operators to also chunk along connected elements by @chrisrothUT in https://github.com/netket/netket/pull/1940

Full Changelog: https://github.com/netket/netket/compare/v3.14.0...v3.14.3

- Python
Published by PhilipVinc over 1 year ago

netket - NetKet 3.14.2

What's Changed

  • Make constraints more flexible for SpinOrbitalFermions by @Z-Denis in https://github.com/netket/netket/pull/1924
  • Init network using a valid state by @PhilipVinc in https://github.com/netket/netket/pull/1923

Full Changelog: https://github.com/netket/netket/compare/v3.14.1...v3.14.2

- Python
Published by PhilipVinc over 1 year ago

netket - v3.14.1

What's Changed

  • Fix #1916: Make RK structures more type-stable by @PhilipVinc in https://github.com/netket/netket/pull/1918

Full Changelog: https://github.com/netket/netket/compare/v3.14.0...v3.14.1

- Python
Published by PhilipVinc over 1 year ago

netket - NetKet 3.14 (⛓️ 4 September 2024)

New features

  • Hilbert spaces such as {class}nk.hilbert.Spin and {class}nk.hilbert.Fock, as well as their base class {class}nk.hilbert.HomogeneousHilbert, now support arbitrary custom constraints #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.
  • Fermionic hilbert spaces {class}~nk.experimental.hilbert.SpinOrbitalFermions now support an extra arbitrary constraint that can be specified by passing the keyword argument constraint=... #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.
  • 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.
  • Previously-internal hilbert space constraint sub-module located at netket.hilbert.index.constraints has been moved to netket.hilbert.constraint #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.

Improvements

  • Specialised lattice constructors like {func}nk.graph.Grid now accept a point_group argument, overriding the default (usually maximal) point groups #1879.
  • Methods to generate random states are automatically implemented for all {class}nk.hilbert.HomogeneousHilbert, constrained or not #1911.
  • Serialization of metropolis sampler states when using MPI will now serialise the parameters across all MPI ranks, not only rank 0 #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.

Bug fixes

  • Fix the function {meth}nk.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.
  • Fixed bug #1811, and it is now possible to serialise sampler states that have new-style jax random number generators #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 nk.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 nk.nn.Module, nk.nn.compact, nk.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.

New Contributors

  • @wttai004 made their first contribution in https://github.com/netket/netket/pull/1889
  • @Daniel-Haas-B made their first contribution in https://github.com/netket/netket/pull/1892

Other Contributors

  • @PhilipVinc
  • @alleSini99
  • @attila-i-szabo
  • @dependabot
  • @lindamauron

Full Changelog: https://github.com/netket/netket/compare/v3.13.0...v3.14.0

- Python
Published by PhilipVinc over 1 year ago

netket - NetKet 3.13 (11 July 2024)

This is the last release supporting python 3.9

New Features

  • Added the function {func}netket.jax.tree_norm to compute the L-p norm of a PyTree, interpreted as a vector of values, without concatenating or ravelling the leaves #1819.
  • The default value of n_discard_per_chain has been changed to 5, which is a more reasonable number in most cases. It might be low for some applications.
  • The sampler {class}netket.sampler.MetropolisSampler and all its derivatives now support chunking for the evaluation of the wavefunction at every Metropolis step #1828.
  • Add a new function {meth}netket.hilbert.DiscreteHilbert.local_indices_to_states to convert integer indices to local configurations #1833.
  • Support NetKet's own linear solvers in {class}netket.experimental.driver.VMC_SRt #1830.
  • Added the observable {func}netket.experimental.observable.VarianceObservable to compute the value and the gradient of the variance of an arbitrary quantum operator #1687.

Deprecations

  • Following the discovery and fix of the Parallel Tempering bugs, {class}netket.experimental.sampler.MetropolisPt and related samplers have been stabilised, so they should be constructed with {class}netket.sampler.ParallelTemperingSampler #1803.

Improvements

  • Drivers now always log Monte Carlo acceptance if you are using a Monte Carlo sampler #1816.
  • {class}netket.sampler.rules.ExchangeRule now only proposes exchanges where the local degrees of freedom changes #1815.
  • All solvers within netket.optimizer.solver now automatically return a partial capturing keyword arguments such as rtol and rcond if called with only the keyword arguments. This can be used to more easily set those optimizer options when constructing the solver to be passed to SR or other algorithms #1817.
  • Unify the initialisation logic of {class}netket.optimizer.qgt.QGTJacobianDense and {class}netket.optimizer.qgt.QGTJacobianPyTree, providing a single entry point for defining the QGT constructors for custom variational states #1320.
  • Fix serialisation of {class}netket.sampler.SamplerState RNG seed, which now will be correct under MPI and Sharding #1823.
  • Ensure that {class}netket.hilbert.DoubledSpace is indexable in more situations when wrapping constrained Hilbert spaces #1846.
  • Make the identity preconditioner an (empty) PyTree instead of a function #1836.
  • Improve several aspects of the fermions API when working with systems that have Spin-1 or greater fermions #1844.
  • Greatly improve the documentation of {func}netket.jax.expect and provide examples of how to use it when running with multiple MPI nodes #1356.
  • Supports Numpy 2.0 #1852.
  • Supports any positive real power machine_pow of the wave function amplitude as probability distribution for Monte Carlo sampling, not just integers #1854.

Bug Fixes

  • When deserializing a variational state with flax, convert all arrays to {class}jax.Array instead of returning numpy arrays #1842.
  • Fix internal issue with {class}netket.utils.struct.Pytree not inizializing default fields correctly #1837.
  • Fix issue with {class}netket.logging.JsonLog raising an error at the end of a program because of a wrongly defined __del__ method #2dd40cf

New Contributors

  • @Exferro made their first contribution in https://github.com/netket/netket/pull/1808
  • @ocadni made their first contribution in https://github.com/netket/netket/pull/1809
  • @gentinettagian made their first contribution in https://github.com/netket/netket/pull/1851

Full Changelog: https://github.com/netket/netket/compare/v3.12.0...v3.13.0

- Python
Published by PhilipVinc almost 2 years ago

netket - NetKet 3.12.4 (4 July 2024)

What's Changed

  • Adding Ising operators with different graphs (fixes #1850) by @gentinettagian in https://github.com/netket/netket/pull/1851

New Contributors

  • @Exferro made their first contribution in https://github.com/netket/netket/pull/1808
  • @ocadni made their first contribution in https://github.com/netket/netket/pull/1809
  • @gentinettagian made their first contribution in https://github.com/netket/netket/pull/1851

Full Changelog: https://github.com/netket/netket/compare/v3.12.3...v3.12.4

- Python
Published by PhilipVinc almost 2 years ago

netket - NetKet 3.12.3

BugFix Release:

  • Improve compatibility with NumPy 2.0
  • Address warnings raised by plum-dispatch v2.4.2
  • Fix a bug in QGT Constructor when the diagonal is not a scalar value

Full Changelog: https://github.com/netket/netket/compare/v3.12.2...v3.12.3

- Python
Published by PhilipVinc almost 2 years ago

netket - NetKet 3.12.2 (June 2024)

Bugfix release for several internal utilities.

  • Support jax 0.4.29
  • The NETKET_MPI_AUTODETECT_LOCAL_GPU=1 environment variable to autoselect local GPUs when running under MPI has had a bug fixed that prevented it from working correctly.
  • A bug where running with NETKET_EXPERIMENTAL_SHARDING=1 seeds where not correctly syncronised across different processes has been fixed #1829.

Full Changelog: https://github.com/netket/netket/compare/v3.12.1...v3.12.2

- Python
Published by PhilipVinc almost 2 years ago

netket - NetKet 3.12.1

  • This release fixes a bug in {class}netket.sampler.MetropolisSamplerNumpy that prevented it from working when using MPI #1818.

Full Changelog: https://github.com/netket/netket/compare/v3.12.0...v3.12.1

- Python
Published by PhilipVinc about 2 years ago

netket - NetKet 3.12 (💫 13 May 2024)

New Features

  • Discrete Hilbert spaces now use a special {class}nk.utils.StaticRange object to store the local values that label the local degree of freedom. This special object is jax friendly and can be converted to arrays, and allows for easy conversion from the local degrees of freedom to integers that can be used to index into arrays, and back. While those objects are not really used internally yet, in the future they will be used to simplify the implementations of operators and other objects #1732.
  • Some utilities to time execution of training loop are now provided, that can be used to coarsely see what part of the algorithm is dominating the training cost. To use it, pass driver.run(..., timeit=True) to all drivers when running them.
  • Added several new tensor network ansatze to the nk.models.tensor_networks namespace. Those also replace previous tensor network implementations, that were de-facto broken #1745.
  • Add jax implementation of Bose Hubbard Operator, named {class}netket.operator.BoseHubbardJax and split numba implementation in a separate class #1773.
  • NetKet now automatically sets the visible GPUs when running under MPI with GPUs, by enumerating local GPUs and setting jax_default_device according to some local rank. This behaviour should allow users to not have to specify CUDA_VISIBLE_DEVICES and local mpi ranks on their scripts. This behaviour is only activated when running using MPI, and not used when using experimental sharding mode. To disable this functionality, set NETKET_MPI_AUTODETECT_LOCAL_GPU=0 #1757.
  • {class}netket.experimental.models.Slater2nd now implements also the generalized hartree fock, as well as the restricted and unrestricted HF of before #1765.
  • A new variational state computing the sum of multiple slater determinants has been added, named {class}nk.experimental.models.MultiSlater2nd. This state has the same options of {class}~netket.experimental.models.Slater2nd #1765.
  • Support for jax>=0.4.27 #1801.

Breaking Changes

  • The out keyword of Discrete Hilbert indexing methods (all_states, numbers_to_states and states_to_numbers) deprecated in the last release has been removed completely #1722.
  • The Homogeneous Hilbert spaces now must store the list of valid local values for the states with a {class}nk.utils.StaticRange objects instead of list of floats. The constructors have been updated accordingly. {class}~nk.utils.StaticRange is a range-like object that is jax-compatible and from now on should be used to index into local hilbert spaces #1732.
  • The numbers_to_states and states_to_numbers methods of {class}netket.hilbert.DiscreteHilbert must now be jax jittable. Custom Hilbert spaces using non-jittable functions have to be adapted by including a {func}jax.pure_callback in the numbers_to_states/states_to_numbers member functions #1748.
  • {attr}~netket.vqs.MCState.chunk_size must be set to an integer and will error immediately otherwise. This might break some code, but in general should give more informative error messages overall #1798.

Deprecations

  • The method {func}netket.nn.states_to_numbers is now deprecated. Please use {meth}~DiscreteHilbert.numbers_to_states directly.

Improvements

  • Rewrite the code for generating random states of netket.hilbert.Fock and netket.hilbert.Spin in Jax and jit the init and reset functions of netket.sampler.MetropolisSampler for better performance and improved compatibility with sharding #1721.
  • Rewrite netket.hilbert.index used by HomogeneousHilbert (including Spin and Fock) so that larger spaces with a sum constraint can be indexed. This can be useful for netket.sampler.Exactsampler, netket.vqs.FullSumState as well as for ED calculations #1720.
  • Duplicating a netket.vqs.MCState now leads to perfectly deterministic, identical samples between two different copies of the same MCState even if the sampler is changed. Previously, duplicating an MCState and changing the sampler on two copies of the same state would lead to some completely random seed being used and therefore different samples to be generated. This change is needed to eventually achieve proper checkpointing of our calculations #1778.
  • The methods converting Jax Operators to another kind (such as LocalOperators to PauliOperators) will return the Jax version of those operators if available #1781.
  • Parallel Tempering samplers {class}netket.experimental.sampler.MetropolisPt now accept a distribution (lin or log) for the distribution of the temperatures, or a custom array #1786.

Finalized Deprecations

  • Removed module function netket.sampler.sample_next that was deprecated in NetKet 3.3 (December 2021) #17XX.

Internal changes

  • Initialize the MetropolisSamplerState in a way that avoids recompilation when using sharding #1776.
  • Wrap several functions in the samplers and operators with a shard_map to avoid unnecessary collective communication when doing batched indexing of sharded arrays #1777.
  • Callbacks are now Pytree and can be flattened/unflatted and serialized with flax #1666.

Bug Fixes

  • Fixed the gradient of variational states w.r.t. complex parameters which was missing a factor of 2. The learning rate needs to be halved to reproduce simulations made with previous versions of NetKet #1785.
  • Fixed the bug #1791. where MetropolisHamiltonian with jax operators was leaking tracers and crashing #1792.
  • The bug in Parallel Tempering samplers was found and they have now been fixed. In short, usages until now were most likely returning garbage samples, but not anymore! #1769.

Merged PRs

  • Remove out argument from HilbertIndex and DiscreteHilbert by @inailuig in https://github.com/netket/netket/pull/1722
  • Fix typos by @jwnys in https://github.com/netket/netket/pull/1729
  • Rewrite random fock and spin in jax by @inailuig in https://github.com/netket/netket/pull/1721
  • Fix HashableArray being a pytree by @PhilipVinc in https://github.com/netket/netket/pull/1731
  • Fix #1735: repr and integer t0 in RKSolverState by @PhilipVinc in https://github.com/netket/netket/pull/1736
  • Move Hilbert spaces to Lazy range objects by @PhilipVinc in https://github.com/netket/netket/pull/1732
  • Add utilities for lexicographic search / sort of matrices by @inailuig in https://github.com/netket/netket/pull/1739
  • Remove some code duplication in tensorhilbert by @PhilipVinc in https://github.com/netket/netket/pull/1741
  • Remove unused sample_fun from MCState by @inailuig in https://github.com/netket/netket/pull/1746
  • Rewrite Hilbert Index by @inailuig in https://github.com/netket/netket/pull/1720
  • Fix #1742, Fix conjugation of fermionic operators to be only conjugation, not conjugate-transposition by @PhilipVinc in https://github.com/netket/netket/pull/1743
  • Make .to_qobj() work on jax operators by @PhilipVinc in https://github.com/netket/netket/pull/1749
  • Reset struct.Pytree property_cached by @inailuig in https://github.com/netket/netket/pull/1750
  • Update optax requirement from <0.2,>=0.1.3 to >=0.1.3,<0.3 by @dependabot in https://github.com/netket/netket/pull/1751
  • Consistency fixes for constraints in hilbert by @PhilipVinc in https://github.com/netket/netket/pull/1755
  • use automatic tqdm selection by @PhilipVinc in https://github.com/netket/netket/pull/1756
  • update support to qutip 5 by @PhilipVinc in https://github.com/netket/netket/pull/1762
  • Some docs improvements by @PhilipVinc in https://github.com/netket/netket/pull/1761
  • Add utilities to profile netket optimisation loop by @PhilipVinc in https://github.com/netket/netket/pull/1760
  • Add MPS/MPDO models with open and periodic boundary conditions by @LionSR in https://github.com/netket/netket/pull/1745
  • Autoset CUDA_VISIBLE_GPUS when running with MPI by @PhilipVinc in https://github.com/netket/netket/pull/1757
  • Update to solve jax deprecations by @PhilipVinc in https://github.com/netket/netket/pull/1766
  • Update sphinx requirement from <7.3,>=7.0 to >=7.0,<7.4 by @dependabot in https://github.com/netket/netket/pull/1772
  • Update myst-nb requirement from ~=1.0.0 to >=1.0,<1.2 by @dependabot in https://github.com/netket/netket/pull/1768
  • Fix typo in variational state loading documentation by @Adrien-Kahn in https://github.com/netket/netket/pull/1775
  • Bose Hubbard as a DiscreteJaxOperator by @Z-Denis in https://github.com/netket/netket/pull/1773
  • Allow overriding the function a MCState is sampled from by @inailuig in https://github.com/netket/netket/pull/1770
  • Declare correct sharding in MetropolisSamplerState.init by @PhilipVinc in https://github.com/netket/netket/pull/1776
  • Make variational state samples reproducible in more situations by @PhilipVinc in https://github.com/netket/netket/pull/1778
  • update macos CI by @inailuig in https://github.com/netket/netket/pull/1780
  • Convert LocalOperatorJax to PauliStringsJax by @inailuig in https://github.com/netket/netket/pull/1781
  • Remove remaining numberstostates / statestonumbers callbacks by @inailuig in https://github.com/netket/netket/pull/1748
  • Update myst-parser requirement from <2.1.0,>=2.0.0 to >=2.0.0,<3.1.0 by @dependabot in https://github.com/netket/netket/pull/1779
  • Include multi determinant and generalized HF by @jwnys in https://github.com/netket/netket/pull/1765
  • Correction of Parallel Tempering by @lindamauron in https://github.com/netket/netket/pull/1769
  • [Sharding] Avoid unnecessary communication when using multiple jax devices by @inailuig in https://github.com/netket/netket/pull/1777
  • [Sharding] Avoid unnecessary communication when using multiple jax devices in MetropolisPT by @inailuig in https://github.com/netket/netket/pull/1784
  • Fix gradients of variational states with complex parameters by @inailuig in https://github.com/netket/netket/pull/1785
  • Upgrade ruff, move CI installation to uv by @PhilipVinc in https://github.com/netket/netket/pull/1783
  • docs improvements for jax operators by @PhilipVinc in https://github.com/netket/netket/pull/1787
  • Fix gradients of density matrix variational states with complex parameters by @PhilipVinc in https://github.com/netket/netket/pull/1788
  • finalize historical deprecation by @PhilipVinc in https://github.com/netket/netket/pull/1790
  • Fix #1791 by @PhilipVinc in https://github.com/netket/netket/pull/1792
  • Improve callbacks, make them checkpointable by @PhilipVinc in https://github.com/netket/netket/pull/1666
  • Update parallelization docs by @inailuig in https://github.com/netket/netket/pull/1796
  • [Sharding] Fixes for jax v0.4.27 by @inailuig in https://github.com/netket/netket/pull/1801
  • QGTOnTheFly: use chunking only if nsamplesper_rank is smaller thank chunking by @PhilipVinc in https://github.com/netket/netket/pull/1799
  • Ensure chunk size is an integer by @PhilipVinc in https://github.com/netket/netket/pull/1798
  • List of betas for parallel tempering by @lindamauron in https://github.com/netket/netket/pull/1786
  • Fix shard_map nesting: only shard outermost function call by @PhilipVinc in https://github.com/netket/netket/pull/1800

New Contributors

  • @LionSR made their first contribution in https://github.com/netket/netket/pull/1745
  • @Adrien-Kahn made their first contribution in https://github.com/netket/netket/pull/1775
  • @lindamauron made their first contribution in https://github.com/netket/netket/pull/1769

Full Changelog: https://github.com/netket/netket/compare/v3.11.4...v3.12.0

- Python
Published by PhilipVinc about 2 years ago

netket - NetKet 3.11.4

Updates for deprecations in jax 0.4.25

Full Changelog: https://github.com/netket/netket/compare/v3.11.3...v3.11.4

- Python
Published by PhilipVinc about 2 years ago

netket - NetKet 3.11.3

Bugfix release addressing the following issues: * Fixes a bug where the conjugate of a fermionic operator was the conjugate-transpose, and the hermitian transpose .H was the identity. This could break code relying on complex-valued fermionic operators #1743. * Fixed a bug when converting jax operators to qutip format #1749. * Fixed an internal bug of netket.utils.struct.Pytree, where the cached properties's cache was not cleared when replace was used to copy and modify the Pytree #1750. * Update upper bound on optax to optax<0.3, following the release of optax 0.2 #1751. * Support QuTiP 5, released in march 2024 #1762.

Full Changelog: https://github.com/netket/netket/compare/v3.11.2...v3.11.3

- Python
Published by PhilipVinc about 2 years ago

netket - NetKet 3.11.2

Bugfix release to solve the following issues: * Fix error thrown in repr method of error thrown in TDVP integrators. * Fix repr error of {class}nk.sampler.rules.MultipleRules #1729. * Solve an issue with RK Integrators that could not be initialised with integer t0 initial time if dt was a float, as well as a wrong repr method leading to uncomprehensible stacktraces #1736. * Fix HashableArray being a pytree: make it just an hashable object #1731.

Full Changelog: https://github.com/netket/netket/compare/v3.11.1...v3.11.2

- Python
Published by PhilipVinc over 2 years ago

netket - v3.11.1 (Bugfix release)

Bugfix release to solve two issues:

  • Fix resetchains=True does not work in NETKETEXPERIMENTAL_SHARDING mode #1727.
  • Fix unsolvable deprecation warning when using DoubledHilbert #1728.

- Python
Published by PhilipVinc over 2 years ago

netket - NetKet 3.11 (~💘 16 february 2024)

This release supports Python 3.12 through the latest release of Numba, introduces several new jax-compatible operators and adds a new experimental way to distribute calculations among multiple GPUs without using MPI.

We have a few breaking changes as well: deprecations that were issued more than 18 months ago have now been finalized, most notable the dtype argument to several models and layers, some keywords to GCNN and setting the number of chains of exact samplers.

New Features

  • Recurrent neural networks and layers have been added to nkx.models and nkx.nn #1305.
  • Added experimental support for running NetKet on multiple jax devices (as an alternative to MPI). It is enabled by setting the environment variable/configuration flag NETKET_EXPERIMENTAL_SHARDING=1. Parallelization is achieved by distributing the Markov chains / samples equally across all available devices utilizing jax.Array sharding. On GPU multi-node setups are supported via jax.distribued, whereas on CPU it is limited to a single process but several threads can be used by setting XLA_FLAGS='--xla_force_host_platform_device_count=XX' #1511.
  • {class}netket.experimental.operator.FermionOperator2nd is a new Jax-compatible implementation of fermionic operators. It can also be constructed starting from a standard fermionic operator by calling operator.to_jax_operator(), or used in combination with pyscf converters#1675,#1684.
  • {class}netket.operator.LocalOperatorJax is a new Jax-compatible implementation of local operators. It can also be constructed starting from a standard operator by calling operator.to_jax_operator() #1654.
  • The logger interface has been formalised and documented in the abstract base class {class}netket.logging.AbstractLog #1665.
  • The {class}~netket.experimental.sampler.ParticleExchange sampler and corresponding rule {class}~netket.experimental.sampler.rules.ParticleExchangeRule has been added, which special cases {class}~netket.sampler.ExchangeSampler to fermionic spaces in order to avoid proposing moves where the two site exchanged have the same population #1683.

Breaking Changes

  • The {class}netket.models.Jastrow wave-function now only has {math}N (N-1) variational parameters, instead of the {math}N^2 redundant ones it had before. Saving and loading format has now changed and won't be compatible with previous versions#1664.
  • Finalize deprecations of some old methods in nk.sampler namespace (see original commit 1f77ad8267e16fe8b2b2641d1d48a0e7ae94832e)
  • Finalize deprecations of 2D input to DenseSymm layers, which now turn into error and extra_bias option of Equivariant Networks/GCNNs (see original commit c61ea542e9d0f3e899d87a7471dea96d4f6b152d)
  • Finalize deprecations of very old input/properties to Lattices 0f6f520da9cb6afcd2361dd6fd029e7ad6a2693e)
  • Finalie the deprecation for dtype= attribute of several modules in nk.nn and nk.models, which has been printing an error since April 2022. You should update usages of dtype= to param_dtype= #1724

Deprecations

  • MetropolisSampler.n_sweeps has been renamed to {attr}~netket.sampler.MetropolisSampler.MetropolisSampler.sweep_size for clarity. Using n_sweeps when constructing the sampler now throws a deprecation warning; sweep_size should be used instead going forward #1657.
  • Samplers and metropolis rules defined as {func}netket.utils.struct.dataclass are deprecated because the base class is now a {class}netket.utils.struct.Pytree. The only change needed is to remove the dataclass decorator and define a standard init method #1653.
  • The out keyword of Discrete Hilbert indexing methods (all_states, numbers_to_states and states_to_numbers) is deprecated and will be removed in the next release. Plan ahead and remove usages to avoid breaking your code 3 months from now #1725!

Internal changes

  • A new class {class}netket.utils.struct.Pytree, can be used to create Pytrees for which inheritance autoamtically works and for which it is possible to define __init__. Several structures such as samplers and rules have been transitioned to this new interface instead of old style @struct.dataclass #1653.
  • The {class}~netket.experimental.operator.FermionOperator2nd and related classes now store the constant diagonal shift as another term instead of a completely special cased scalar value. The same operators now also respect the cutoff keyword argument more strictly #1686.
  • Dtypes of the matrix elements of operators are now handled more correctly, and fewer warnings are raised when running NetKet in X32 mode. Moreover, operators like Ising now default to floating point dtype even if the coefficients are integers #1697.

Bug Fixes

  • Support multiplication of Discrete Operators by Sparse arrays #1661.

Full list of PRs merged:

What's Changed

  • [experimental] Add initial support for jax multi-device and multi-process environments (part 1) by @inailuig in https://github.com/netket/netket/pull/1645
  • Fix #1646 by @PhilipVinc in https://github.com/netket/netket/pull/1647
  • Actually use chunk size in vs.local_estimators by @PhilipVinc in https://github.com/netket/netket/pull/1650
  • throw error in Ising when using non Spin Hilbert space by @PhilipVinc in https://github.com/netket/netket/pull/1648
  • Add RNN by @wdphy16 in https://github.com/netket/netket/pull/1305
  • PauliStrings: hash stable for mask by @PhilipVinc in https://github.com/netket/netket/pull/1651
  • Pv/news by @PhilipVinc in https://github.com/netket/netket/pull/1652
  • Update state.py by @llviteritti in https://github.com/netket/netket/pull/1658
  • [experimental] Add initial support for jax multi-device and multi-process environments (part 2) by @inailuig in https://github.com/netket/netket/pull/1511
  • Fix some doc generation issues in sampler by @PhilipVinc in https://github.com/netket/netket/pull/1660
  • Use np.testing for better error messages by @wdphy16 in https://github.com/netket/netket/pull/1663
  • Support matmul between DiscreteOperator and sparse array by @wdphy16 in https://github.com/netket/netket/pull/1661
  • Use autoflush_cost when flushing parameters in JsonLog by @wdphy16 in https://github.com/netket/netket/pull/1662
  • Modified Jastrow model using tril_indices by @llviteritti in https://github.com/netket/netket/pull/1664
  • Formalise logger interface, minor fixes by @PhilipVinc in https://github.com/netket/netket/pull/1665
  • enable changing the mode of PauliStrings by @PhilipVinc in https://github.com/netket/netket/pull/1669
  • Make Samplers and rules 'standard' classes, less magical by @PhilipVinc in https://github.com/netket/netket/pull/1653
  • Refactor FermionOperator tests by @PhilipVinc in https://github.com/netket/netket/pull/1677
  • Rename 'MetropolisSampler.nsweeps' to 'sweepsize' #1657 by @iamoeg in https://github.com/netket/netket/pull/1680
  • FermionOperatorJax by @PhilipVinc in https://github.com/netket/netket/pull/1675
  • Fix 1675 by @inailuig in https://github.com/netket/netket/pull/1684
  • Run distributed tests on CI by @inailuig in https://github.com/netket/netket/pull/1679
  • port local operator to jax by @inailuig in https://github.com/netket/netket/pull/1654
  • Remove constant in fermion operator and include an explicit cutoff by @jwnys in https://github.com/netket/netket/pull/1686
  • Add metropolis exchange rule for fermions by @jwnys in https://github.com/netket/netket/pull/1683
  • makeluigihappy by @PhilipVinc in https://github.com/netket/netket/pull/1689
  • Fix passing diag_scale through QGTAuto by @wdphy16 in https://github.com/netket/netket/pull/1692
  • Substitute variables with parameters in automatic QGT selector by @alleSini99 in https://github.com/netket/netket/pull/1693
  • Override to_local_operator to return LocalOperatorJax instead of LocalOperator by @alleSini99 in https://github.com/netket/netket/pull/1694
  • Finalize deprecations from > 2 years ago by @PhilipVinc in https://github.com/netket/netket/pull/1698
  • Update flax requirement from <0.8,>=0.7.1 to >=0.7.1,<0.9 by @dependabot in https://github.com/netket/netket/pull/1700
  • Formalize operator dtypes by @wdphy16 in https://github.com/netket/netket/pull/1697
  • Support multiple "batch" dimensions in GCNN layers by @attila-i-szabo in https://github.com/netket/netket/pull/1699
  • Fix tests like x in ys where x is an array by @wdphy16 in https://github.com/netket/netket/pull/1701
  • remove VMC/TDVP .info method, variational_common.info by @PhilipVinc in https://github.com/netket/netket/pull/1703
  • [PaulistringsJax] Implement cutoff by @inailuig in https://github.com/netket/netket/pull/1702
  • Fix #1705: raise error if vs.sample(chain_length=X, n_samples=X) by @PhilipVinc in https://github.com/netket/netket/pull/1709
  • Address changes in purest 8 by @PhilipVinc in https://github.com/netket/netket/pull/1710
  • Update numba requirement from <0.59,>=0.52 to >=0.52,<0.60 by @dependabot in https://github.com/netket/netket/pull/1707
  • Update sphinx-autodoc-typehints requirement from ~=1.22 to >=1.22,<3.0 by @dependabot in https://github.com/netket/netket/pull/1711
  • support batches in number_to_hilbert by @PhilipVinc in https://github.com/netket/netket/pull/1712
  • Cleanup Parallel Tempering, fix a bug in PT+Multiplerules by @PhilipVinc in https://github.com/netket/netket/pull/1713
  • Support SingleDeviceSharding in gather by @inailuig in https://github.com/netket/netket/pull/1716
  • LocalOperatorJax: Fix a few corner cases and Implement cutoff by @inailuig in https://github.com/netket/netket/pull/1717
  • Restore order in sampler n_chains per rank by @PhilipVinc in https://github.com/netket/netket/pull/1714
  • Minor refactor AbstractVariationalDriver by @PhilipVinc in https://github.com/netket/netket/pull/1718
  • Cleanup VMC SRt by @PhilipVinc in https://github.com/netket/netket/pull/1719
  • Finalize deprecated dtype deprecation cycle by @PhilipVinc in https://github.com/netket/netket/pull/1724
  • Deprecation warning for #1722 by @PhilipVinc in https://github.com/netket/netket/pull/1725
  • Compute data lazily in TensorHilbertDiscrete by @inailuig in https://github.com/netket/netket/pull/1723

New Contributors

  • @llviteritti made their first contribution in https://github.com/netket/netket/pull/1658
  • @iamoeg made their first contribution in https://github.com/netket/netket/pull/1680

Full Changelog: https://github.com/netket/netket/compare/v3.10.1...v3.11.0

- Python
Published by PhilipVinc over 2 years ago

netket - NetKet 3.10.2 (bug fixes)

What's Changed

  • Fix #1646 by @PhilipVinc in https://github.com/netket/netket/pull/1647
  • Actually use chunk size in vs.local_estimators by @PhilipVinc in https://github.com/netket/netket/pull/1650
  • throw error in Ising when using non Spin Hilbert space by @PhilipVinc in https://github.com/netket/netket/pull/1648

Full Changelog: https://github.com/netket/netket/compare/v3.10.1...v3.10.2

- Python
Published by PhilipVinc over 2 years ago

netket - NetKet 3.10.1

What's Changed

  • Fix #1643 : support complex parameters in SRt by @PhilipVinc in https://github.com/netket/netket/pull/1644

Full Changelog: https://github.com/netket/netket/compare/v3.10...v3.10.1

- Python
Published by PhilipVinc over 2 years ago

netket - NetKet 3.10

The highlights of this version are a new experimental driver to optimise networks with millions of parameters using SR, and introduces new utility functions to convert a pyscf molecule to a netket Hamiltonian.

Read below for a more detailed changelog

New Features

  • Added new {class}netket.experimental.driver.VMC_SRt driver, which leads in identical parameter updates as the standard Stochastic Reconfiguration with diagonal shift regularization. Therefore, it is essentially equivalent to using the standard {class}netket.driver.VMC with the {class}netket.optimizer.SR preconditioner. The advantage of this method is that it requires the inversion of a matrix with side number of samples instead of number of parameters, making this formulation particularly useful in typical deep learning scenarios #1623.
  • Added a new function {func}netket.experimental.operator.from_pyscf_molecule to construct the electronic hamiltonian of a given molecule specified through pyscf. This is accompanied by {func}netket.experimental.operator.pyscf.TV_from_pyscf_molecule to compute the T and V tensors of a pyscf molecule #1602.
  • Added the operator computing the Rényi2 entanglement entropy on Hilbert spaces with discrete dofs #1591.
  • It is now possible to disable netket's double precision default activation and force all calculations to be performed using single precision by setting the environment variable/configuration flag NETKET_ENABLE_X64=0, which also sets JAX_ENABLE_X64=0. When running with this flag, the number of warnings printed by jax is considerably reduced as well #1544.
  • Added new shortcuts to build the identity operator as {func}netket.operator.spin.identity and {func}netket.operator.boson.identity #1601.
  • Added new {class}netket.hilbert.Particle constructor that only takes as input the number of dimensions of the system #1577.
  • Added new {class}netket.experimental.models.Slater2nd model implementing a Slater ansatz #1622.
  • Added new {func}netket.jax.logdet_cmplx function to compute the complex log-determinant of a batch of matrices #1622.

Breaking changes

  • {class}netket.experimental.hilbert.SpinOrbitalFermions attributes have been changed: {attr}~netket.experimental.hilbert.SpinOrbitalFermions.n_fermions now always returns an integer with the total number of fermions in the system (if specified). A new attribute {attr}~netket.experimental.hilbert.SpinOrbitalFermions.n_fermions_per_spin has been introduced that returns the same tuple of fermion number per spin subsector as before. A few fields are now marked as read-only as modifications where ignored #1622.
  • The {class}netket.nn.blocks.SymmExpSum layer is now normalised by the number of elements in the symmetry group in order to maintain a reasonable normalisation #1624.
  • The labelling of spin sectors in {func}netket.experimental.operator.fermion.create and similar operators has now changed from the eigenvalue of the spin operator ({math}\pm 1/2 and so on) to the eigenvalue of the Pauli matrices ({math}\pm 1 and so on) #1637.
  • The connected elements and expectation values of all non-simmetric fermionic operators is now changed in order to be correct #1640.

Improvements

  • Considerably reduced the memory consumption of {class}~netket.operator.LocalOperator, especially in the case of large local hilbert spaces. Also leveraged sparsity in the terms to speed up compilation (_setup) in the same cases #1558.
  • {class}netket.nn.blocks.SymmExpSum now works with inputs of arbitrary dimensions, while previously it errored for all inputs that were not 2D #1616
  • Stop using FrozenDict from flax and instead return standard dictionaries for the variational parameters from the variational state. This makes it much easier to edit parameters #1547.
  • Vastly improved, finally readable documentation of all Flax modules and neural network architectures #1641.

Bug Fixes

  • Fixed minor bug where {class}netket.operator.LocalOperator could not be built with np.matrix object obtained by converting scipy sparse matrices to dense #1597.
  • Raise correct error instead of unintelligible one when multiplying {class}netket.experimental.operator.FermionOperator2nd with other operators #1599.
  • Do not rescale the output of {func}netket.jax.jacobian by the square root of number of samples. Previously, when specifying center=True we were incorrectly rescaling the output #1614.
  • Fix bug in {class}netket.operator.PauliStrings that caused the dtype to get out of sync with the dtype of the internal arrays, causing errors when manipulating them symbolically #1619.
  • Fix bug that prevented the use of {class}netket.operator.DiscreteJaxOperator as observables with all drivers #1625.
  • Fermionic operator get_conn method was returning values as if the operator was transposed, and has now been fixed. This will break the expectation value of non-simmetric fermionic operators, but hopefully nobody was looking into them #1640.

- Python
Published by PhilipVinc over 2 years ago

netket - NetKet 3.9.2 (bug fix)

What's Changed

  • Use dynamic ncol in tqdm by @PhilipVinc in https://github.com/netket/netket/pull/1542
  • Ensure localoperator keeps single precision with */-+ by @PhilipVinc in https://github.com/netket/netket/pull/1545
  • fix #1550 by @PhilipVinc in https://github.com/netket/netket/pull/1551

Full Changelog: https://github.com/netket/netket/compare/v3.9.1...v3.9.2

- Python
Published by PhilipVinc almost 3 years ago

netket - 3.9.1

Fix a bug in the conversion of paulistrings to jax operators

- Python
Published by PhilipVinc almost 3 years ago

netket - NetKet 3.9 (🔥 24 July 2023)

This release requires Python 3.8 and Jax 0.4.

New Features

  • netket.callbacks.EarlyStopping now supports relative tolerances for determining when to stop #1481.
  • netket.callbacks.ConvergenceStopping has been added, which can stop a driver when the loss function reaches a certain threshold #1481.
  • A new base class {class}netket.operator.DiscreteJaxOperator has been added, which will be used as a base class for a set of operators that are jax-compatible #1506.
  • {func}netket.sampler.rules.HamiltonianRule has been split into two implementations, {class}netket.sampler.rules.HamiltonianRuleJax and {class}netket.sampler.rules.HamiltonianRuleNumba, which are to be used for {class}~netket.operator.DiscreteJaxOperator and standard numba-based {class}~netket.operator.DiscreteOperators. The user-facing API is unchanged, but the returned type might now depend on the input operator #1514.
  • {class}netket.operator.PauliStringsJax is a new operator that behaves as netket.operator.PauliStrings but is Jax-compatible, meaning that it can be used inside of jax-jitted contexts and works better with chunking. It can also be constructed starting from a standard Ising operator by calling operator.to_jax_operator() #1506.
  • {class}netket.operator.IsingJax is a new operator that behaves as netket.operator.Ising but is Jax-compatible, meaning that it can be used inside of jax-jitted contexts and works better with chunking. It can also be constructed starting from a standard Ising operator by calling operator.to_jax_operator() #1506.
  • Added a new method {meth}netket.operator.LocalOperator.to_pauli_strings to convert {class}netket.operator.LocalOperator to {class}netket.operator.PauliStrings. As PauliStrings can be converted to Jax-operators, this now allows to convert arbitrary operators to Jax-compatible ones #1515.
  • The constructor of {meth}~netket.optimizer.qgt.QGTOnTheFly now takes an optional boolean argument holomorphic : Optional[bool] in line with the other geometric tensor implementations. This flag does not affect the computation algorithm, but will be used to raise an error if the user attempts to call {meth}~netket.optimizer.qgt.QGTOnTheFly.to_dense() with a non-holomorphic ansatz. While this might break past code, the numerical results were incorrect.

Breaking Changes

  • The first two axes in the output of the samplers have been swapped, samples are now of shape (n_chains, n_samples_per_chain, ...) consistent with netket.stats.statistics. Custom samplers need to be updated to return arrays of shape (n_chains, n_samples_per_chain, ...) instead of (n_samples_per_chain, n_chains, ...). #1502
  • The tolerance arguments of {class}~netket.experimental.dynamics.TDVPSchmitt have all been renamed to more understandable quantities without inspecting the source code. In particular, num_tol has been renamed to rcond, svd_tol to rcond_smooth and noise_tol to noise_atol.

Deprecations

  • netket.vqs.ExactState has been renamed to {class}netket.vqs.FullSumState to better reflect what it does. Using the old name will now raise a warning #1477.

Known Issues

  • The new Jax-friendly operators do not work with {class}netket.vqs.FullSumState because they are not hashable. This will be fixed in a minor patch (coming soon).

- Python
Published by PhilipVinc almost 3 years ago

netket - NetKet 3.8 (8 May 2023)

This is the last NetKet release to support Python 3.7 and Jax 0.3. Starting with NetKet 3.9 we will require Jax 0.4, which in turns requires Python 3.8 (and soon 3.9).

New features

  • {class}netket.hilbert.TensorHilbert has been generalised and now works with both discrete, continuous or a combination of discrete and continuous hilbert spaces #1437.
  • NetKet is now compatible with Numba 0.57 and therefore with Python 3.11 #1462.
  • The new Metropolis sampling transition proposal rules {func}netket.sampler.rules.MultipleRules has been added, which can be used to pick from different transition proposals according to a certain probability distribution.
  • The new Metropolis sampling transition proposal rules {func}netket.sampler.rules.TensorRule has been added, which can be used to combine different transition proposals acting on different subspaces of the Hilbert space together.
  • The new Metropolis sampling transition proposal rules {func}netket.sampler.rules.FixedRule has been added, which does not change the configuration.

Deprecations

  • The non-public API function to select the default QGT mode for QGTJacobian, located at nk.optimizer.qgt.qgt_jacobian_common.choose_jacobian_mode has been renamed and made part of the public API of as nk.jax.jacobian_default_mode. If you were using this function, please update your codes #1473.

Bug Fixes

  • Fix issue #1435, where a 0-tangent originating from integer samples was not correctly handled by {func}nk.jax.vjp #1436.
  • Fixed a bug in {class}netket.sampler.rules.LangevinRule when setting chunk_size #1465.

Improvements

  • {class}netket.operator.ContinuousOperator has been improved and now they correctly test for equality and generate a consistent hash. Moreover, the internal logic of {class}netket.operator.SumOperator and {class}netket.operator.Potential has been improved, and they lead to less recompilations when constructed again but identical. A few new attributes for those operators have also been exposed #1440.
  • {func}nk.nn.to_array accepts an optional keyword argument chunk_size, and related methods on variational states now use the chunking specified in the variational state when generating the dense array #1470.

- Python
Published by PhilipVinc about 3 years ago

netket - NetKet 3.7 (💘 edition)

New features

  • Input and hidden layer masks can now be specified for {class}netket.models.GCNN #1387.
  • Support for Jax 0.4 added #1416.
  • Added a continuous space langevin-dynamics transition rule {class}netket.sampler.rules.LangevinRule and its corresponding shorthand for constructing the MCMC sampler {func}netket.sampler.MetropolisAdjustedLangevin #1413.
  • Added an experimental Quantum State Reconstruction driver at {class}netket.experimental.QSR to reconstruct states from data coming from quantum computers or simulators #1427.
  • Added netket.nn.blocks.SymmExpSum flax module that symmetrizes a bare neural network module by summing the wave-function over all possible symmetry-permutations given by a certain symmetry group #1433.

Breaking Changes

  • Parameters of models {class}netket.models.GCNN and layers {class}netket.nn.DenseSymm and {class}netket.nn.DenseEquivariant are stored as an array of shape '[features,infeatures,masksize]'. Masked parameters are now excluded from the model instead of multiplied by zero #1387.

Improvements

  • The underlying extension API for Autoregressive models that can be used with Ancestral/Autoregressive samplers has been simplified and stabilized and will be documented as part of the public API. For most models, you should now inherit from {class}netket.models.AbstractARNN and define the method {meth}~netket.models.AbstractARNN.conditionals_log_psi. For additional performance, implementers can also redefine {meth}~netket.models.AbstractARNN.__call__ and {meth}~netket.models.AbstractARNN.conditional but this should not be needed in general. This will cause some breaking changes if you were relying on the old undocumented interface #1361.
  • {class}netket.operator.PauliStrings now works with non-homogeneous Hilbert spaces, such as those obtained by taking the tensor product of multiple Hilbert spaces #1411.
  • The {class}netket.operator.LocalOperator now keep sparse matrices sparse, leading to faster algebraic manipulations of those objects. The overall computational and memory cost is, however, equivalent, when running VMC calculations. All pre-constructed operators such as {func}netket.operator.spin.sigmax and {func}netket.operator.boson.create now build sparse-operators #1422.
  • When multiplying an operator by it's conjugate transpose NetKet does not return anymore a lazy {class}~netket.operator.Squared object if the operator is hermitian. This avoids checking if the object is hermitian which greatly speeds up algebric manipulations of operators, and returns more unbiased epectation values #1423.

Bug Fixes

  • Fixed a bug where {meth}nk.hilbert.Particle.random_state could not be jit-compiled, and therefore could not be used in the sampling #1401.
  • Fixed bug #1405 where {meth}nk.nn.DenseSymm and {meth}nk.models.GCNN did not work or correctly consider masks #1428.

Deprecations

  • {meth}netket.models.AbstractARNN._conditional has been removed from the API, and its use will throw a deprecation warning. Update your ARNN models accordingly! #1361.
  • Several undocumented internal methods from {class}netket.models.AbstractARNN have been removed #1361.

- Python
Published by PhilipVinc over 3 years ago

netket - NetKet 3.6 (🏔️ edition)

New features

  • Added a new 'Full statevector' model netket.models.LogStateVector that stores the exponentially large state and can be used as an exact ansatz #1324.
  • Added a new experimental ~netket.experimental.driver.TDVPSchmitt driver, implementing the signal-to-noise ratio TDVP regularisation by Schmitt and Heyl #1306.
  • QGT classes accept a chunk_size parameter that overrides the chunk_size set by the variational state object #1347.
  • ~netket.optimizer.qgt.QGTJacobianPyTree and ~netket.optimizer.qgt.QGTJacobianDense support diagonal entry regularisation with constant and scale-invariant contributions. They accept a new diag_scale argument to pass the scale-invariant component #1352.
  • ~netket.optimizer.SR preconditioner now supports scheduling of the diagonal shift and scale regularisations #1364.

Improvements

  • ~netket.vqs.ExactState.expect_and_grad now returns a nk.stats.Stats object that also contains the variance, as MCState does #1325.
  • Experimental RK solvers now store the error of the last timestep in the integrator state #1328.
  • ~netket.operator.PauliStrings can now be constructed by passing a single string, instead of the previous requirement of a list of strings #1331.
  • ~flax.core.frozen_dict.FrozenDict can now be logged to netket's loggers, meaning that one does no longer need to unfreeze the parameters before logging them #1338.
  • Fermion operators are much more efficient and generate fewer connected elements #1279.
  • NetKet now is completely PEP 621 compliant and does not have anymore a setup.py in favour of a pyproject.toml based on hatchling. To install NetKet you should use a recent version of pip or a compatible tool such as poetry/hatch/flint #1365.
  • ~netket.optimizer.qgt.QGTJacobianDense can now be used with ~netket.vqs.ExactState #1358.

Bug Fixes

  • netket.vqs.ExactState.expect_and_grad returned a scalar while ~netket.vqs.ExactState.expect returned a nk.stats.Stats object with 0 error. The inconsistency has been addressed and now they both return a Stats object. This changes the format of the files logged when running VMC, which will now store the average under Mean instead of value #1325.

Deprecations

  • The rescale_shift argument of ~netket.optimizer.qgt.QGTJacobianPyTree and ~netket.optimizer.qgt.QGTJacobianDense is deprecated inf avour the more flexible syntax with diag_scale. rescale_shift=False should be removed. rescale_shift=True should be replaced with diag_scale=old_diag_shift. #1352.
  • The call signature of preconditioners passed to netket.driver.VMC and other drivers has changed as a consequence of scheduling, and preconditioners should now accept an extra optional argument step. The old signature is still supported but is deprecated and will eventually be removed #1364.

- Python
Published by PhilipVinc over 3 years ago

netket - NetKet 3.5.2 (bug fixes)

This release addresses a major performance degradation of LocalOperator that arose in NetKet v3.4. We encourage everyone to upgrade as soon as possible.

- Python
Published by PhilipVinc over 3 years ago

netket - NetKet 3.5.1 (bugfixes)

New features

  • Added a new configuration option nk.config.netket_experimental_disable_ode_jit to disable jitting of the ODE solvers. This can be useful to avoid hangs that might happen when working on GPUs with some particular systems #1304.

Bug Fixes

  • Continuous operatorors now work correctly when chunk_size != None. This was broken in v3.5 #1316.
  • Fixed a bug (#1101) that crashed NetKet when trying to take the product of two different Hilber spaces. It happened because the logic to build a TensorHilbert was ending in an endless loop. #1321.

- Python
Published by PhilipVinc over 3 years ago

netket - NetKet 3.5 (☀️ edition)

GitHub commits.

This release adds support and needed functions to run TDVP for neural networks with real/non-holomorphic parameters, an experimental HDF5 logger, and an MCState method to compute the local estimators of an observable for a set of samples.

This release also drops support for older version of flax, while adopting the new interface which completely supports complex-valued neural networks. Deprecation warnings might be raised if you were using some layers from netket.nn that are now avaiable in flax.

A new, more accurate, estimation of the autocorrelation time has been introduced, but it is disabled by default. We welcome feedback.

New features

  • The method nk.vqs.MCState.local_estimators has been added, which returns the local estimators O_loc(s) = 〈s|O|ψ〉 / 〈s|ψ〉 (which are known as local energies if O is the Hamiltonian). #1179
  • The permutation equivariant nk.models.DeepSetRelDistance for use with particles in periodic potentials has been added together with an example. #1199
  • The class HDF5Log has been added to the experimental submodule. This logger writes log data and variational state variables into a single HDF5 file. #1200
  • Added a new method nk.logging.RuntimeLog.serialize to store the content of the logger to disk #1255.
  • New nk.callbacks.InvalidLossStopping which stops optimisation if the loss function reaches a NaN value. An optional patience argument can be set. #1259
  • Added a new method nk.graph.SpaceGroupBuilder.one_arm_irreps to construct GCNN projection coefficients to project on single-wave-vector components of irreducible representations. #1260.
  • New method nk.vqs.MCState.expect_and_forces has been added, which can be used to compute the variational forces generated by an operator, instead of only the (real-valued) gradient of an expectation value. This in general is needed to write the TDVP equation or other similar equations. #1261
  • TDVP now works for real-parametrized wavefunctions as well as non-holomorphic ones because it makes use of nk.vqs.MCState.expect_and_forces. #1261
  • New method nk.utils.group.Permutation.apply_to_id can be used to apply a permutation (or a permutation group) to one or more lattice indices. #1293
  • It is now possible to disable MPI by setting the environment variable NETKET_MPI. This is useful in cases where mpi4py crashes upon load #1254.
  • The new function nk.nn.binary_encoding can be used to encode a set of samples according to the binary shape defined by an Hilbert space. It should be used similarly to {func}flax.linen.one_hot and works with non homogeneous Hilbert spaces #1209.
  • A new method to estimate the correlation time in Markov chain Monte Carlo (MCMC) sampling has been added to the nk.stats.statistics function, which uses the full FFT transform of the input data. The new method is not enabled by default, but can be turned on by setting the NETKET_EXPERIMENTAL_FFT_AUTOCORRELATION environment variable to 1. In the future we might turn this on by default #1150.

Dependencies

  • NetKet now requires at least Flax v0.5

Deprecations

  • nk.nn.Module and nk.nn.compact have been deprecated. Please use the flax.linen.Module and flax.linen.compact instead.
  • nk.nn.Dense(dtype=mydtype) and related Modules (Conv, DenseGeneral and ConvGeneral) are deprecated. Please use flax.linen.***(param_dtype=mydtype) instead. Before flax v0.5 they did not support complex numbers properly within their modules, but starting with flax 0.5 they now do so we have removed our linear module wrappers and encourage you to use them. Please notice that the dtype argument previously used by netket should be changed to param_dtype to maintain the same effect. #...

Bug Fixes

  • Fixed bug where a nk.operator.LocalOperator representing the identity would lead to a crash. #1197
  • Fix a bug where Fermionic operators nkx.operator.FermionOperator2nd would not result hermitian even if they were. #1233
  • Fix serialization of some arrays with complex dtype in RuntimeLog and JsonLog #1258
  • Fixed bug where the nk.callbacks.EarlyStopping callback would not work as intended when hitting a local minima. #1238
  • chunk_size and the random seed of Monte Carlo variational states are now serialised. States serialised previous to this change can no longer be unserialised #1247
  • Continuous-space hamiltonians now work correctly with neural networks with complex parameters #1273.
  • NetKet now works under MPI with recent versions of jax (>=0.3.15) #1291.

- Python
Published by PhilipVinc almost 4 years ago

netket - v3.4.3: Bugfixes

  • Fixes some bugs with continuous hilbert spaces
  • Fixes a bug that was preventing the creation of an identity local operator

- Python
Published by PhilipVinc about 4 years ago

netket - v3.4.2: Critical bugfix

GitHub commits.

This release fixes a critical bug affecting operators acting on non homogeneous hilbert spaces.

Internal Changes

  • Several deprecation warnings related to jax.experimental.loops being deprecated have been resolved by changing those calls to jax.lax.fori_loop. Jax should feel more tranquillo now. #1172

Bug Fixes

  • Several type promotion bugs that would end up promoting single-precision models to double-precision have been squashed. Those involved nk.operator.Ising and nk.operator.BoseHubbard#1180, nkx.TDVP #1186 and continuous-space samplers and operators #1187.
  • nk.operator.Ising, nk.operator.BoseHubbard and nk.operator.LocalLiouvillian now return connected samples with the same precision (dtype) as the input samples. This allows to preserve low precision along the computation when using those operators.#1180
  • nkx.TDVP now updates the expectation value displayed in the progress bar at every time step. #1182
  • Fixed bug #1192 that affected most operators (nk.operator.LocalOperator) constructed on non-homogeneous hilbert spaces. This bug was first introduced in version 3.3.4 and affects all subsequent versions until 3.4.2. #1193
  • It is now possible to add an operator and its lazy transpose/hermitian conjugate #1194

- Python
Published by PhilipVinc about 4 years ago

netket - v3.4.1 Bug fixes

Internal Changes

  • Several deprecation warnings related to jax.treeutil.treemultimap being deprecated have been resolved by changing those calls to jax.treeutil.treemap. Jax should feel more tranquillo now. #1156

Bug Fixes

  • TDVP now supports model with real parameters such as RBMModPhase. #1139
  • An error is now raised when user attempts to construct a LocalOperator with a matrix of the wrong size (bug #1157). #1158
  • A bug where QGTJacobian could not be used with models in single precision has been addressed (bug #1153). #1155

- Python
Published by PhilipVinc about 4 years ago

netket - NetKet 3.4 🧱 (Special Toulouse edition)

GitHub commits.

This should be the first version easily installable on MacOs M1 following the instructions on the get started part of our website.

New features

  • Lattice supports specifying arbitrary edge content for each unit cell via the kwarg custom_edges. A generator for hexagonal lattices with coloured edges is implemented as nk.graph.KitaevHoneycomb. nk.graph.Grid again supports colouring edges by direction. #1074
  • Fermionic hilbert space (nkx.hilbert.SpinOrbitalFermions) and fermionic operators (nkx.operator.fermion) to treat systems with a finite number of Orbitals have been added to the experimental submodule. The operators are also integrated with OpenFermion. Those functionalities are still in development and we would welcome feedback. #1090
  • It is now possible to change the integrator of a TDVP object without reconstructing it. #1123
  • Easy install on MacOs M1

Breaking Changes

  • The gradient for models with real-parameter is now multiplied by 2. If your model had real parameters you might need to change the learning rate and halve it. Conceptually this is a bug-fix, as the value returned before was wrong (see Bug Fixes section below for additional details) #1069
  • In the statistics returned by netket.stats.statistics, the .R_hat diagnostic has been updated to be able to detect non-stationary chains via the split-Rhat diagnostic (see, e.g., Gelman et al., Bayesian Data Analysis, 3rd edition). This changes (generally increases) the numerical values of R_hat for existing simulations, but should strictly improve its capabilities to detect MCMC convergence failure. #1138

Bug Fixes

  • The gradient obtained with VarState.expect_and_grad for models with real-parameters was off by a factor of $ 1/2 $ from the correct value. This has now been corrected. As a consequence, the correct gradient for real-parameter models is equal to the old times 2. If your model had real parameters you might need to change the learning rate and halve it. #1069
  • Support for coloured edges in nk.graph.Grid, removed in #724, is now restored. #1074
  • Fixed bug that prevented calling .quantum_geometric_tensor on netket.vqs.ExactState. #1108
  • Fixed bug where the gradient of C->C models (complex parameters, complex output) was computed incorrectly with nk.vqs.ExactState. #1110
  • Fixed bug where QGTJacobianDense.state and QGTJacobianPyTree.state would not correctly transform the starting point x0 if holomorphic=False. #1115
  • The gradient of the expectation value obtained with VarState.expect_and_grad for SquaredOperators was off by a factor of 2 in some cases, and wrong in others. This has now been fixed. #1065.

- Python
Published by PhilipVinc about 4 years ago

netket - v3.3.4 : Work on macOS M1

- Python
Published by PhilipVinc about 4 years ago

netket - v3.3.3 Bugfix release

  • Don't check for Haiku if Haiku is not installed #1132
  • Support Jax 0.3.3 #1141
  • Support pyres as diag_shift in QGT #1135

- Python
Published by PhilipVinc about 4 years ago

netket - v3.3.2 (🐛 more bug fixes)

GitHub commits.

Internal Changes

  • Support for Python 3.10 #952.
  • The minimum optax version is now 0.1.1, which finally correctly supports complex numbers. The internal implementation of Adam which was introduced in 3.3 (#1069) has been removed. If an older version of optax is detected, an import error is thrown to avoid providing wrong numerical results. Please update your optax version! #1097

Bug Fixes

  • Allow LazyOperator@densevector for operators such as lazy Adjoint, Transpose and Squared. #1068
  • The logic to update the progress bar in nk.experimental.TDVP has been improved, and it should now display updates even if there are very sparse save_steps. #1084
  • The nk.logging.TensorBoardLog is now lazily initialized to better work in an MPI environment. #1086
  • Converting a nk.operator.BoseHubbard to a nk.operator.LocalOperator multiplied by 2 the nonlinearity U. This has now been fixed. #1102

Notes:

  • .post1: support for python 3.10 and jax 0.3
  • .post2: remove spurious print statement

- Python
Published by PhilipVinc over 4 years ago

netket - v3.3.1 (🐛 Bug Fixes)

GitHub commits.

  • Initialisation of all implementations of DenseSymm, DenseEquivariant, GCNN now defaults to truncated normals with Lecun variance scaling. For layers without masking, there should be no noticeable change in behaviour. For masked layers, the same variance scaling now works correctly. #1045
  • Fix bug that prevented gradients of non-hermitian operators to be computed. The feature is still marked as experimental but will now run (we do not guarantee that results are correct). #1053
  • Common lattice constructors such as Honeycomb now accepts the same keyword arguments as Lattice. #1046
  • Multiplying a QGTOnTheFly representing the real part of the QGT (showing up when the ansatz has real parameters) with a complex vector now throws an error. Previously the result would be wrong, as the imaginary part was casted away. #885

- Python
Published by PhilipVinc over 4 years ago

netket - v3.3

GitHub commits.

New features

  • The interface to define expectation and gradient function of arbitrary custom operators is now stable. If you want to define it for a standard operator that can be written as an average of local expectation terms, you can now define a dispatch rule for {ref}netket.vqs.get_local_kernel_arguments and {ref}netket.vqs.get_local_kernel. The old mechanism is still supported, but we encourage to use the new mechanism as it is more terse. #954
  • nk.optimizer.Adam now supports complex parameters, and you can use nk.optimizer.split_complex to make optimizers process complex parameters as if they are pairs of real parameters. #1009
  • Chunking of MCState.expect and MCState.expect_and_grad computations is now supported, which allows to bound the memory cost in exchange of a minor increase in computation time. #1006 (and discussions in #918 and #830)
  • A new variational state that performs exact summation over the whole Hilbert space has been added. It can be constructed with {ref}nk.vqs.ExactState and supports the same Jax neural networks as {ref}nk.vqs.MCState. #953
  • DenseSymm allows multiple input features. #1030
  • [Experimental] A new time-evolution driver {ref}nk.experimental.TDVP using the time-dependent variational principle (TDVP) has been added. It works with time-independent and time-dependent Hamiltonians and Liouvillians. #1012
  • [Experimental] A set of JAX-compatible Runge-Kutta ODE integrators has been added for use together with the new TDVP driver. #1012

Breaking Changes

  • The method sample_next in Sampler and exact samplers (ExactSampler and ARDirectSampler) is removed, and it is only defined in MetropolisSampler. The module function nk.sampler.sample_next also only works with MetropolisSampler. For exact samplers, please use the method sample instead. #1016
  • The default value of n_chains_per_rank in Sampler and exact samplers is changed to 1, and specifying n_chains or n_chains_per_rank when constructing them is deprecated. Please change chain_length when calling sample. For MetropolisSampler, the default value is changed from n_chains = 16 (across all ranks) to n_chains_per_rank = 16. #1017
  • GCNN_Parity allowed biasing both the parity-preserving and the parity-flip equivariant layers. These enter into the network output the same way, so having both is redundant and makes QGTs unstable. The biases of the parity-flip layers are now removed. The previous behaviour can be restored using the deprecated extra_bias switch; we only recommend this for loading previously saved parameters. Such parameters can be transformed to work with the new default using nk.models.update_GCNN_parity. #1030
  • Kernels of DenseSymm are now three-dimensional, not two-dimensional. Parameters saved from earlier implementations can be transformed to the new convention using nk.nn.update_dense_symm. #1030

Deprecations

  • The method Sampler.samples is added to return a generator of samples. The module functions nk.sampler.sampler_state, reset, sample, samples, and sample_next are deprecated in favor of the corresponding class methods. #1025
  • Kwarg in_features of DenseEquivariant is deprecated; the number of input features are inferred from the input. #1030
  • Kwarg out_features of DenseEquivariant is deprecated in favour of features. #1030

Internal Changes

  • The definitions of MCState and MCMixedState have been moved to an internal module, nk.vqs.mc that is hidden by default. #954
  • Custom deepcopy for LocalOperator to avoid building LocalOperator from scratch each time it is copied #964

Bug Fixes

  • The constructor of TensorHilbert (which is used by the product operator * for inhomogeneous spaces) no longer fails when one of the component spaces is non-indexable. #1004
  • The {ref}nk.hilbert.random.flip_state method used by MetropolisLocal now throws an error when called on a {ref}nk.hilbert.ContinuousHilbert hilbert space instead of entering an endless loop. #1014
  • Fixed bug in conversion to qutip for MCMixedState, where the resulting shape (hilbert space size) was wrong. #1020
  • Setting MCState.sampler now recomputes MCState.chain_length according to MCState.n_samples and the new sampler.n_chains. #1028
  • GCNN_Parity allowed biasing both the parity-preserving and the parity-flip equivariant layers. These enter into the network output the same way, so having both is redundant and makes QGTs unstable. The biases of the parity-flip layers are now removed. #1030

- Python
Published by PhilipVinc over 4 years ago

netket - v3.2

GitHub commits.

New features

  • GraphOperator (and Heisenberg) now support passing a custom mapping of graph nodes to Hilbert space sites via the new acting_on_subspace argument. This makes it possible to create GraphOperators that act on a subset of sites, which is useful in composite Hilbert spaces. #924
  • PauliString now supports any Hilbert space with local size 2. The Hilbert space is now the optional first argument of the constructor. #960
  • PauliString now can be multiplied and summed together, performing some simple algebraic simplifications on the strings they contain. They also lazily initialize their internal data structures, making them faster to construct but slightly slower the first time that their matrix elements are accessed. #955
  • PauliStrings can now be constructed starting from an OpenFermion operator. #956
  • In addition to nearest-neighbor edges, Lattice can now generate edges between next-nearest and, more generally, k-nearest neighbors via the constructor argument max_neighbor_order. The edges can be distinguished by their color property (which is used, e.g., by GraphOperator to apply different bond operators). #970
  • Two continuous-space operators (KineticEnergy and PotentialEnergy) have been implemented. #971
  • Heisenberg Hamiltonians support different coupling strengths on Graph edges with different colors. #972.
  • The little_group and space_group_irreps methods of SpaceGroupBuilder take the wave vector as either varargs or iterables. #975
  • A new netket.experimental submodule has been created and all experimental features have been moved there. Note that in contrast to the other netket submodules, netket.experimental is not imported by default. #976

Breaking Changes

  • Moved nk.vqs.variables_from_*** to nk.experimental.vqs module. Also moved the experimental samplers to nk.sampler.MetropolisPt and nk.sampler.MetropolisPmap to nk.experimental.sampler. #976
  • operator.size, has been deprecated. If you were using this function, please transition to operator.hilbert.size. #985

Bug Fixes

  • A bug where LocalOperator.get_conn_flattened would read out-of-bounds memory has been fixed. It is unlikely that the bug was causing problems, but it triggered warnings when running Numba with boundscheck activated. #966
  • The dependency python-igraph has been updated to igraph following the rename of the upstream project in order to work on conda. #986
  • {attr}~netket.vqs.MCState.n_samples_per_rank was returning wrong values and has now been fixed. #987
  • The DenseSymm layer now also accepts objects of type HashableArray as symmetries argument. #989
  • A bug where VMC.info() was erroring has been fixed. #984

- Python
Published by PhilipVinc over 4 years ago

netket - v3.1.2

Bump optax version cap to <0.2

- Python
Published by PhilipVinc over 4 years ago

netket - v3.1.1

Bump Jax version compatibility to 0.2.25

- Python
Published by PhilipVinc over 4 years ago

netket - NetKet 3.1 (20 October 2021)

GitHub commits.

New features

  • Added Conversion methods to_qobj() to operators and variational states, that produce QuTiP's qobjects.
  • A function nk.nn.activation.reim has been added that transforms a nonlinearity to act seperately on the real and imaginary parts
  • Nonlinearities reim_selu and reim_relu have been added
  • Autoregressive Neural Networks (ARNN) now have a machine_pow field (defaults to 2) used to change the exponent used for the normalization of the wavefunction. #940.

Breaking Changes

  • The default initializer for netket.models.GCNN has been changed to from jax.nn.selu to netket.nn.reim_selu #892
  • netket.nn.initializers has been deprecated in favor of jax.nn.initializers #935.
  • Subclasses of AbstractARNN must define the field machine_pow #940
  • nk.hilbert.HilbertIndex and nk.operator.spin.DType are now unexported (they where never intended to be visible). #904
  • AbstractOperators have been renamed DiscreteOperators. AbstractOperators still exist, but have almost no functionality and they are intended as the base class for more arbitrary (eg. continuous space) operators. If you have defined a custom operator inheriting from AbstractOperator you should change it to derive from DiscreteOperator. #929

Internal Changes

  • PermutationGroup.product_table now consumes less memory and is more performant. This is helpfull when working with large symmetry groups. #884 #891
  • Added size check to DiscreteOperator.get_conn and throw helpful error messages if those do not match. #927
  • The internal numba4jax module has been factored out into a standalone library, named (how original) numba4jax. This library was never intended to be used by external users, but if for any reason you were using it, you should switch to the external library. #934
  • netket.jax now includes several batching utilities like batched_vmap and batched_vjp. Those can be used to build memory efficient batched code, but are considered internal, experimental and might change without warning. #925.

Bug Fixes

  • Autoregressive networks now work with Qubit hilbert spaces. #937

- Python
Published by PhilipVinc over 4 years ago

netket - NetKet 3.0.4

Bump jax version bound to include 0.2.21

- Python
Published by PhilipVinc over 4 years ago

netket - NetKet 3.0.3

Same as 3.0.2 (which did not include qutip improvements).

- Python
Published by PhilipVinc over 4 years ago

netket - NetKet 3.0.2

Add more conversion methods to qutip, fix default activation function for complex valued GCNN.

- Python
Published by PhilipVinc over 4 years ago

netket - Netket 3.0.1

Minor improvements to group utilities, throw errors on wrong graph creation input, and methods to convert to qutip.

- Python
Published by PhilipVinc almost 5 years ago

netket - NetKet 3.0

NetKet 3.0 (23 august 2021)

GitHub commits.

Complete changelog of beta versions available at https://www.netket.org/docs/changelog.html Below only changes from the last beta release are reported

Breaking Changes

  • The default initializer for netket.nn.Dense layers now matches the same default as flax.linen, and it is lecun_normal instead of normal(0.01) #869
  • The default initializer for netket.nn.DenseSymm layers is now chosen in order to give variance 1 to every output channel, therefore defaulting to lecun_normal #870

- Python
Published by PhilipVinc almost 5 years ago

netket - Version 3.0 Beta 4

GitHub commits.

New features

  • DenseSymm now accepts a mode argument to specify whever the symmetries should be computed with a full dense matrix or FFT. The latter method is much faster for sufficiently large systems. Other kwargs have been added to satisfy the interface. The api changes are also reflected in RBMSymm and GCNN. #792

Breaking Changes

  • The so-called legacy netket in netket.legacy has been removed. #773

Internal Changes

  • The methods expect and expect_and_grad of MCState now use dispatch to select the relevant implementation of the algorithm. They can therefore be expanded and overridden without editing NetKet's source code. #804
  • netket.utils.mpi_available has been moved to netket.utils.mpi.available to have a more consistent api interface (all mpi-related properties in the same submodule). #827
  • netket.logging.TBLog has been renamed to netket.logging.TensorBoardLog for better readability. A deprecation warning is now issued if the older name is used #827
  • When MCState initializes a model by calling model.init, the call is now jitted. This should speed it up for non-trivial models but might break non-jit invariant models. #832
  • operator.get_conn_padded now supports arbitrarily-dimensioned bitstrings as input and reshapes the output accordingly. #834
  • NetKet's implementation of dataclasses now support pytree_node=True/False on cached properties. #835
  • Plum version has been bumped to 1.5.1 to avoid broken versions (1.4, 1.5). #856.
  • Numba version 0.54 is now allowed #857.

Bug Fixes

  • Fix Progress bar bug. #810
  • Make the repr/printing of history objects nicer in the REPL. #819
  • The field MCState.model is now read-only, to prevent user errors. #822
  • The order of the operators in PauliString does no longer influences the estimate of the number of non-zero connected elements. #836

- Python
Published by PhilipVinc almost 5 years ago

netket - Version 3.0 Beta 3 post2

Fix minor bug in VMC.reset() and prettier repr of history objects

- Python
Published by PhilipVinc almost 5 years ago

netket - Version 3.0 Beta 3

NetKet 3.0b3 (published on July 9 2021)

GitHub commits.

New features

  • The {ref}utils.group submodule provides utilities for geometrical and permutation groups. Lattice (and its specialisations like Grid) use these to automatically construct the space groups of lattices, as well as their character tables for generating wave functions with broken symmetry. #724
  • Autoregressive neural networks, sampler, and masked linear layers have been added to models, sampler and nn #705.

Breaking Changes

  • The graph.Grid class has been removed. {ref}graph.Grid will now return an instance of {ref}graph.Lattice supporting the same API but with new functionalities related to spatial symmetries. The color_edges optional keyword argument has been removed without deprecation. #724
  • MCState.n_discard has been renamed MCState.n_discard_per_chain and the old binding has been deprecated #739.
  • nk.optimizer.qgt.QGTOnTheFly option centered=True has been removed because we are now convinced the two options yielded equivalent results. QGTOnTheFly now always behaves as if centered=False #706.

Internal Changes

  • networkX has been replaced by igraph, yielding a considerable speedup for some graph-related operations #729.
  • netket.hilbert.random module now uses plum-dispatch (through netket.utils.dispatch) to select the correct implementation of random_state and flip_state. This makes it easy to define new hilbert states and extend their functionality easily. #734.
  • The AbstractHilbert interface is now much smaller in order to also support continuous Hilbert spaces. Any functionality specific to discrete hilbert spaces (what was previously supported) has been moved to a new abstract type nk.hilbert.DiscreteHilbert. Any Hilbert space previously subclassing {ref}nk.hilbert.AbstractHilbert should be modified to subclass {ref}nk.hilbert.DiscreteHilbert #800.

Bug Fixes

  • nn.to_array and MCState.to_array, if normalize=False, do not subtract the logarithm of the maximum value from the state #705.
  • Autoregressive networks now work with Fock space and give correct errors if the hilbert space is not supported #806.
  • Autoregressive networks are now much (x10-x100) faster #705.
  • Do not throw errors when calling operator.get_conn_flattened(states) with a jax array #764.
  • Fix bug with the driver progress bar when step_size != 1 #747.

- Python
Published by gcarleo almost 5 years ago

netket - Version 3.0 Beta 2

NetKet 3.0b2 (published on 31 May 2021)

GitHub commits.

New features

  • Group Equivariant Neural Networks have been added to models #620
  • Permutation invariant RBM and Permutation invariant dense layer have been added to models and nn.linear #573
  • Add the property acceptance to MetropolisSampler's SamplerState, computing the MPI-enabled acceptance ratio. #592.
  • Add StateLog, a new logger that stores the parameters of the model during the optimization in a folder or in a tar file. #645
  • A warning is now issued if NetKet detects to be running under mpirun but MPI dependencies are not installed #631
  • operator.LocalOperators now do not return a zero matrix element on the diagonal if the whole diagonal is zero. #623.
  • logger.JSONLog now automatically flushes at every iteration if it does not consume significant CPU cycles. #599
  • The interface of Stochastic Reconfiguration has been overhauled and made more modular. You can now specify the solver you wish to use, NetKet provides some dense solvers out of the box, and there are 3 different ways to compute the Quantum Geometric Tensor. Read the documentation to learn more about it. #674
  • Unless you specify the QGT implementation you wish to use with SR, we use an automatic heuristic based on your model and the solver to pick one. This might affect SR performance. #674

Breaking Changes

  • For all samplers, n_chains now sets the total number of chains across all MPI ranks. This is a breaking change compared to the old API, where n_chains would set the number of chains on a single MPI rank. It is still possible to set the number of chains per MPI rank by specifying n_chains_per_rank instead of n_chains. This change, while breaking allows us to be consistent with the interface of {ref}variational.MCState, where n_samples is the total number of samples across MPI nodes.
  • MetropolisSampler.reset_chain has been renamed to MetropolisSampler.reset_chains. Likewise in the constructor of all samplers.
  • Briefly during development releases MetropolisSamplerState.acceptance_ratio returned the percentage (not ratio) of acceptance. acceptance_ratio is now deprecated in favour of the correct acceptance.
  • models.Jastrow now internally symmetrizes the matrix before computing its value #644
  • MCState.evaluate has been renamed to MCState.log_value #632
  • nk.optimizer.SR no longer accepts keyword argument relative to the sparse solver. Those should be passed inside the closure or functools.partial passed as solver argument.
  • nk.optimizer.sr.SRLazyCG and nk.optimizer.sr.SRLazyGMRES have been deprecated and will soon be removed.
  • Parts of the Lattice API have been overhauled, with deprecations of several methods in favor of a consistent usage of Lattice.position for real-space location of sites and Lattice.basis_coords for location of sites in terms of basis vectors. Lattice.sites has been added, which provides a sequence of LatticeSite objects combining all site properties. Furthermore, Lattice now provides lookup of sites from their position via id_from_position using a hashing scheme that works across periodic boundaries. #703 #715
  • nk.variational has been renamed to nk.vqs and will be removed in a future release.

Bug Fixes

  • Fix operator.BoseHubbard usage under jax Hamiltonian Sampling #662
  • Fix SROnTheFly for R->C models with non homogeneous parameters #661
  • Fix MPI Compilation deadlock when computing expectation values #655
  • Fix bug preventing the creation of a hilbert.Spin Hilbert space with odd sites and even S. #641
  • Fix bug #635 preventing the usage of NumpyMetropolisSampler with MCState.expect #635
  • Fix bug #635 where the graph.Lattice was not correctly computing neighbours because of floating point issues. #633
  • Fix bug the Y Pauli matrix, which was stored as its conjugate. #618 #617 #615

- Python
Published by PhilipVinc about 5 years ago

netket - Version 3.0 Beta 1 post9

- Python
Published by gcarleo about 5 years ago

netket - Version 3.0 Beta 1 post8

- Python
Published by gcarleo about 5 years ago

netket - Version 3.0 Beta 1 post7

- Python
Published by gcarleo about 5 years ago

netket - Version 3.0 Beta 1 post6

- Python
Published by gcarleo about 5 years ago

netket - Version 3.0 Beta 1 post5

- Python
Published by gcarleo about 5 years ago

netket - Version 3.0 Beta 1 post4

Bug fix addressing, among others, a few critical issues with the non-standard definition of Pauli Y #618 and transposes of super-operators #617

- Python
Published by gcarleo about 5 years ago

netket - Version 3.0 Beta 1 post3

- Python
Published by gcarleo about 5 years ago

netket - Version 3.0 Beta 1

First beta release of Netket 3.

An overview of the long list of changes is available here.

- Python
Published by gcarleo about 5 years ago

netket - Netket v2.1.1

This release contains a few minor updates, mainly addressing some deprecation issues in Numba.

- Python
Published by gcarleo about 6 years ago

netket - NetKet v2.1

Summary for version 2.1

This version is a direct follow-up of version 2.0, refining and improving several aspects of the transition undergone when shifting to being a python library built on c++ primitives. This version also includes several new functionalities and improves installation on common platforms (including conda).

New functionalities

  1. Support for open quantum systems, including various density matrix ansatz states, and solvers for the stationary Lindblad equation @PhilipVinc.
  2. Add support for PyTorch machines @nikita-astronaut @twesterhout
  3. Progress bar for VMC drive @orialb
  4. Separate the SR driver as a standalone optimizer @femtobit
  5. Make J and use of sign rule configurable for Heisenberg Hamiltonian @femtobit
  6. Add batched samplers @twesterhout @gcarleo @femtobit

Library changes

  1. Introduce python abstract classes for Machines and Samplers @gcarleo
  2. Added a few numba kernels for performance @gcarleo
  3. Support for conda installs
  4. Move to a simpler solution for documentation @gcarleo
  5. Write most high-level drivers in pure python @femtobit @gcarleo @PhilipVinc
  6. Add some code documentation for RBMs @amitkumarj441
  7. Expose a to_array method for Python machines @tvieijra
  8. Start removing look-up table logic in machines @twesterhout

C++ core, future end of life

In all likelihood, this is the last version built on the C++ core. There is ongoing work to release version 3.0, purely written in python and accelerated with numba. If your work depends on the C++ backend, please consider fully migrating to the python APIs as soon as possible.

Known issues

  • Windows is not supported

- Python
Published by gcarleo about 6 years ago

netket - NetKet v2.0

Summary for version 2.0

This version marks a drastic change in the user interface, shifting from the JSON input logic of version 1.0, to a full-fledged Python library in 2.0. Several new functionalities have been added, mostly thanks to the generous contributions resulting from those who have embraced the NetKet challenges.

NetKet version 2.0 provides a greater deal of flexibility, and several new functionalities. All users are strongly encouraged to transition as soon as possible from 1.x.

Library changes

  1. NetKet now fully exposes its internal types and classes, thus becoming a full-fledged python library built on a monolithic c++ core. Python Bindings are provided using pybind11.
  2. NetKet can be installed as a regular Python library, doing pip install netket

New functionalities

  1. Supervised learning of wave-functions from wave functions with known amplitudes
  2. Quantum State Tomography to reconstruct wave functions from arbitrary local measurement basis
  3. Exact Diagonalization for small systems
  4. Exact Sampler for small systems
  5. Matrix Product States wave functions
  6. Lattice graphs to define arbitrary lattices from unit cells
  7. Operator, which generalizes and replaces Hamiltonian,Observable etc.
  8. LocalOperator, for arbitrary k-local quantum operators and all associated overloaded operations
  9. New PyNotebook tutorials in /Tutorials/
  10. Several example codes showcasing specific applications are contained in /Examples
  11. Convenient to_array(), to_matrix() etc methods to convert Machine and Operator, respectively, to numpy arrays and matrices, for small Hilbert spaces
  12. Add experimental support for neural density matrices

Known issues

  • Conda installs are not yet supported
  • Windows is not supported

- Python
Published by gcarleo almost 7 years ago

netket - NetKet v2.0-beta3

NetKet v2.0-beta3

This is a maintenance release, approaching the end of the beta phase for version 2.0.

Two bugs have been fixed:

  1. Fix an issue when reassigning LocalOperator, see #207
  2. Fix MPI initialization issues appearing on some machines, see #209

Other major changes:

  1. Improving quantum state reconstruction, see #186
  2. Add neural density matrices, see #189
  3. Add convenient to_array(), to_matrix() etc methods to convert Machine and Operator, respectively, to numpy arrays and matrices, for small Hilbert spaces
  4. Several under-the-hood changes

- Python
Published by gcarleo almost 7 years ago

netket - NetKet v2.0-beta.2

Beta release

This is the first public beta release of NetKet version 2.0. 2.0 provides provides a greater deal of flexibility, and several new functionalities. All users are strongly encouraged to transition as soon as possible from 1.x. We have done our best to make this beta release as stable and reliable as possible, but if you encounter any issue, please report it immediately.

Summary for version 2.0

This version marks a drastic change in the user interface, shifting from the JSON input logic of version 1.0, to a full-fledged Python library in 2.0. Several new functionalities have been added, mostly thanks to the generous contributions resulting from those who have embraced the NetKet challenges.

Interface changes

  1. NetKet now fully exposes its internal types and classes, thus becoming a full-fledged python library built on a monolithic c++ core
  2. NetKet can be installed as a regular Python library, doing pip install netket
  3. Python Bindings are provided using pybind11, thus fully addressing issue #8
  4. Bindings are provided for the great majority of NetKet classes, with the exception of some internals, that don't need python exposure
  5. As a result of this transformation, JSON input is not accepted anymore and the netket executable does not exist anymore

New functionalities

  1. Supervised learning of wave-functions from wave functions with known amplitudes
  2. Quantum State Tomography to reconstruct wave functions from arbitrary local measurement basis
  3. Exact Diagonalization for small systems
  4. Exact Sampler for small systems
  5. Matrix Product States wave functions
  6. Lattice graphs to define arbitrary lattices from unit cells
  7. Operator, which generalizes and replaces Hamiltonian,Observable etc.
  8. LocalOperator, for arbitrary k-local quantum operators and all associated overloaded operations
  9. New PyNotebook tutorials in /Tutorials/
  10. Several example codes showcasing specific applications are contained in /Examples

Known issues

  • Conda installs are not yet supported
  • Windows is not supported

- Python
Published by gcarleo over 7 years ago

netket - NetKet v1.0.5

NetKet v1.0.5

This is a maintenance release correcting a critical bug in MetropolisHamiltonian and MetropolisHamiltonianPt

- Python
Published by gcarleo over 7 years ago

netket - NetKet v1.0.4

NetKet v1.0.4

Several new features have been added with this release:

New Machines

  • Added generic support for Feed-Forward Network, by @kchoo1118
  • Fully-connected, Convolutional (on arbitrary graphs), and other layers, by @kchoo1118
  • Two-body jastrow wave-functions, by @gugli17

New Sampling Capabilities

  • Support for custom sampling based on generic local stochastic operators, by @fabienalet and @theveniaut
  • Added Monte Carlo sweeps for equilibration before making measurements, by @wuyukai

More Ways to Input Hamiltonians

  • Added support for generic local Hamiltonian living on Graphs, particularly convenient for lattice hamiltonians, by @jamesETsmith

Better Graphs

  • Improvements in the Graph library, including support for coloured graphs, by @jamesETsmith and @femtobit

More Options in Optimizers

  • Add gradient clipping, based either on per component basis or total modulus of the gradient, by @kchoo1118

Notice that some of those features are still not fully documented.

Please visit our website for further information about NetKet.

- Python
Published by gcarleo almost 8 years ago

netket - NetKet v1.0.3

NetKet v1.0.3

This is a maintenance release mainly correcting two bugs:

  • Bug #22 , reported by @wuyukai , fixed by @twesterhout with the help of @everthemore and @femtobit
  • Bug #24 , reported and fixed by @artemborin

New Experimental Features

  • More steppers, by @emilyjd
  • Full exact diagonalization, by @femtobit and @gcarleo

Notice that those are still undocumented and will evolve in the next few weeks.

Please visit our website for further information about NetKet.

- Python
Published by gcarleo about 8 years ago

netket - NetKet v1.0.2

NetKet v1.0.2

This release features a consistent refactoring of the C++ code, and the addition of a few new features.
Starting from this version, it will be easier for external collaborators to submit their pull requests and integrate contributions in NetKet. All contributors (and those getting involved in the Challenges), will need to fork from this version or higher. See also our brand-new guidelines for contributions.

New Features

  • Custom graphs can be created from an Edgelist
  • Custom graphs can feature Isomorphisms (useful to automatically discover lattice symmetries )

Under the hood

  • CMake is used for building, installing and testing
  • Cleaner structure for include files
  • Unit tests framework based on Catch 2
  • Deterministic and stochastic unit tests for graph, samplers, machines, hamiltonians, observables and more
  • Continuous integration support through Travis
  • Automatic control of memory leaks at CI stage
  • Automatic code review with Codacy
  • Contributing guidelines and code of conduct
  • Utils directory, containing Json, Parallel and Random utilities

Please visit our website for further information about NetKet.

- Python
Published by gcarleo about 8 years ago

netket - NetKet v1.0.1

NetKet v1.0.1

This is a maintenance release containing a few improvements over the initial release, following suggestions from a few users.

Interface Improvements

  • Tutorials are now compatible with Python 3

Under the hood

  • Removed bare new assigments, now using std::unique_ptr for a safer use of memory

Please visit our website for further information about NetKet.

- Python
Published by gcarleo about 8 years ago

netket - NetKet v1.0

NetKet v1.0

Please visit our website for further information.

Major Features

  • Graphs

    • Built-in Graphs
    • Hypercube
    • Custom Graphs
    • Any Graph With Given Adjacency Matrix [from input file]
  • Hamiltonians

    • Built-in Hamiltonians
    • Transverse-field Ising
    • Heisenberg
    • Bose-Hubbard
    • Custom Hamiltonians
    • Any k-local Hamiltonian [from input file]
  • Learning

    • Steppers
    • Stochastic Gradient Descent
    • AdaMax
    • Ground-state Learning
    • Gradient Descent
    • Stochastic Reconfiguration Method
      • Direct Solver
      • Iterative Solver for Large Number of Parameters
  • Machines

    • Restricted Boltzmann Machines
    • Standard
    • For Custom Local Hilbert Spaces
    • With Permutation Symmetry
    • Custom Machines
    • Any Machine Satisfying Prototype of Abstract Machine [extending C++ code]
  • Observables

    • Custom Observables
    • Any k-local Operator [from input file]
  • Sampling

    • Local Metropolis Moves
    • Local Hilbert Space Sampling
    • Parallel Tempering Versions
    • Hamiltonian Moves
    • Automatic Moves with Hamiltonian Symmetry
    • Parallel Tempering Versions
  • Statistics

    • Automatic Estimate of Correlation Times
  • I/O

    • Python/JSON Interface

- Python
Published by gcarleo about 8 years ago