Machine learning algorithms for many-body quantum systems
NetKet is an open-source project delivering cutting-edge methods for the study of many-body quantum systems with artificial neural networks and machine learning techniques. It is a Python library built on C++ primitives.
Netket supports MacOS and Linux. The reccomended way to install it in a non-conda python environment is:
pip install netket[all]The
[all]after netket will install all extra dependencies of netket. We reccomend to install netket with all it's extra dependencies, which are documented below. However, if you do not have a working MPI compiler in your PATH this installation will most likely fail because it will attempt to install
mpi4py, which enables MPI support in netket. If you are only starting to discover netket and won't be running extended simulations, you can forego MPI by installing netket with the command
pip install netket # or pip install netket[jax]
Netket is also available on conda-forge. To install netket in a conda-environment you can use:
conda install conda-forge::netketConda by default ships pre-built binaries for recent versions of python. The default blas library is openblas, but mkl can be enforced. The conda library is linked to anaconda's
mpi4py, therefore we do not reccomend to use this installation method on computer clusters with a custom MPI distribution.
When installing netket with pip, you can pass the following extra variants as square brakets. You can install several of them by separating them with a comma. - '[dev]': installs development-related dependencies such as black, pytest and testing dependencies - '[mpi]': Installs
mpi4pyto enable multi-process parallelism. Requires a working MPI compiler in your path - '[jax]': Installs
jaxto enable jax-based neural networks - '[all]': Installs
mpi4jaxwhich is required to use mpi with jax machines.
Depending on the library you use to define your machines, distributed computing through MPI might or might not be supported. Please see below: - netket : distributed computing through MPI support can be enabled by installing the package
mpi4pythrough pip or conda. - jax : distributed computing through MPI is supported natively only if you don't use Stochastic Reconfiguration (SR). If you need SR, you must install mpi4jax. Please note that we advise to install mpi4jax with the same tool (conda or pip) with which you installed netket. - pytorch : distributed computing through MPI is enabled if the package
mpi4pyis isntalled. Stochastic Reconfiguration (SR) cannot be used when MPI is enabled.
To check whever MPI support is enabled, check the flags ```python
## Major Features
Variational Monte Carlo
Neural-Network Quantum State Tomography
AbstractLayer[extending C++ code]
AbstractMachine[extending C++ code]