Requirements

NetKet is a light-weight framework with minimal dependencies on external libraries. Dependencies are discussed below, together with common strategies to install them on your machine. In a nutshell, the only strict requirements are a working MPI C++ compiler, CMake, and a modern Python interpreter.

MPI and CMake

In order to install NetKet you need to have a working C++11 compiler installed on your computer. NetKet relies on MPI to provide seamless parallelism on multiples computing cores.

Below you can find more detailed, platform-dependent steps to install those requirements.

Mac

On Mac Os, one of the simplest strategy to get MPI and CMake is to first get https://brew.sh and then either do:

brew install cmake open-mpi

to get Open MPI, or if you prefer MPICH :

brew install cmake mpich

Ubuntu

On Ubuntu you can get Open MPI and the needed development headers doing:

sudo apt-get install cmake libopenmpi-dev openmpi-bin openmpi-doc

Alternatively, you can have MPICH:

sudo apt-get install cmake libmpich-dev mpich

Other platforms

On other platforms/Linux distributions, it is fairly easy to find pre-compiled packages, for example you can have a look at these installation guidelines: CMake, MPICH.

Optional Python Libraries

For some functionalities, NetKet relies on numpy. It is also suggested to have [IPython][https://ipython.readthedocs.io/en/stable/], and matplotlib installed, to fully enjoy our Tutorials and Examples.

pip install numpy matplotlib jupyter

Other Dependencies

NetKet also relies on a few header-only external libraries:

  1. Eigen, one of the best modern C++ library for linear algebra and matrix manipulation
  2. Pybind11, a great library to create Python bindings of existing C++ code
  3. JSON for modern C++, an excellent light-weight library to handle JSON input/output and serialization/deserialization
  4. Catch 2, a great library for unit testing

For your convenience, those three libraries are already included in NetKet, and you don’t need to take further action to download/install them. If you wanted to use another version of the external libraries, you can always link them to your project when manually compiling NetKet. To do so, please have a look at the variables defined in CMakelists.txt.