Installation of the HQS Spin Mapper

Several packages need to be installed in a given environment as dependencies of the HQS Spin Mapper. If the HQS Spin Mapper is installed inside a conda environment, this preceding installation of dependencies is facilitated with the command:

conda install -y cxx-compiler boost cmake make hdf5 unzip mkl

The HQS Spin Mapper package is available on the HQS pypi server. To install it, use:

pip install --extra-index-url http://pypiserver.office.quantumsimulations.de/ --trusted-host pypiserver.office.quantumsimulations.de hqs_spin_mapper

Building from source code (for development purposes only!)

To build the package from source code inside a conda environment, the dependencies can be installed via:

conda install -y cxx-compiler boost cmake make hdf5 unzip mkl

If you are not installing the package inside a conda environment, check whether the corresponding packages have been installed on your system, including a sufficiently recent C++ compiler, i.e. g++ >= 10.

Building lattice_solver and lattice_functions (not required)

With the external dependencies installed, one needs to build the lattice_solver and lattice_functions packages. The lattice_solver and lattice_functions packages are dependencies required for the Schrieffer-Wolff transformation / Spin-bath model derivation functionality of Spin Mapper.

The lattice_solver contains the Krylov SVD solver needed for the Schrieffer-Wolff transformation functionality. The repository can be obtained from gitlab and installed via:

git clone https://gitlab.office.quantumsimulations.de/hqs-software/solver/lattice_solver
cd lattice_solver/
make pip_install

The lattice_functions contains the core functionality for handling the fermionic operator algebras used in the Schrieffer-Wolff transformation. The lattice_functions repository is available from gitlab via:

git clone git@gitlab.office.quantumsimulations.de:pschmitteckert/lattice_functions.git

Then enter the lattice_functions directory and verify that the CmakeLists.txt file contains the command set(HDF5_PREFER_PARALLEL TRUE) and add it otherwise.

Then perform:

pip install --extra-index-url http://pypiserver.office.quantumsimulations.de/ --trusted-host pypiserver.office.quantumsimulations.de .

Alternatively, there is a lattice_functions binary on the HQS pypi-server:

pip install --extra-index-url http://pypiserver.office.quantumsimulations.de/ --trusted-host pypiserver.office.quantumsimulations.de lattice_functions

Clone the lattice_2_spin repository and perform:

git clone https://gitlab.office.quantumsimulations.de/hqs-software/lattice/hqs_spin_mapper
cd hqs_spin_mapper/
make pip_install