I recommend using virtual environments and pip. The main instructions how to build a virtual environment and install this package and its requirements are listed below, given that Python 3 and pip are installed.
- Open a terminal and navigate into this project's directory (.../analog-rb).
- Create a virtual environment (type
python
orpython3
):
python -m venv analogrbvenv
- Activate this virtual environment in the terminal with
source analogrbvenv/bin/activate
- Install this package by running the command
pip install .
Only needed if non-interactive systems are benchmarked. If only the demo protocols are run, it is also not needed since the projectors are pre-saved.
The ClebschGordan.cpp code which calculates the needed Clebsch-Gordan coefficients for the projector was taken from Ref. Alex, 2021.
It has to be transformed into an executable script, how to do that depends on the operating system in use.
The C++ engine has to be installed first in order to make it executable, I suggest using g++
and installing it via conda
for Linux, something like MinGW-W64
for windows and for mac using homebrew
.
Once this is installed the package lapack
has to be installed.
Then run the following in the analog-rb
directory in a terminal:
g++ -o clebschgordan.out ClebschGordan.cpp -llapack
which should produce a file on the same level as the README.md
called clebschgordan.out
.
The data might be not stored in the right directory. Then you have to set the path by hand.
For that open file src/analogrb/save_load
and comment out the function MODULE_DIR()
.
Instead, comment in the function below that and enter the absolute path to the directory of your analog-rb:
Should then look like this (of course add your path here):
Then, after saving, again type pip install .
in your terminal.