QmeQ can be installed through pip or by building it from source. To be able to use and build QmeQ you need to have:
- Python 3 with setuptools installed,
- Cython and a C compiler compatible with it,
- NumPy package,
- SciPy package.
The indicated versions are the minimal required versions. Optionally, such packages are used:
- Matplotlib for plotting,
- Jupyter for the tutorials.
An easy way to obtain the above packages is by using Python package manager pip. After setting up pip the above packages can be obtained by using the following command
$ pip install cython numpy scipy matplotlib jupyter
To install QmeQ through pip run
$ pip install qmeq
or by going into the downloaded source directory and running
$ python setup.py install
We note that the binaries pip and python have to be in the system path.
For Linux and Mac we recommend to use the C compiler in the conventional gcc suite, which will be recognized by Cython. For Windows the Visual Studio or Windows SDK C/C++ compiler can be used and more instructions how to setup these compilers to work with Cython are available here.
For a good performance of the calculations NumPy needs to be linked to so-called ATLAS, OpenBLAS, or MKL libraries. To check if NumPy is linked go to Python interpreter and write
import numpy
numpy.show_config()
If all of the entries like atlas_info, openblas_info, or mkl_info says NOT AVAILABLE then it is likely that your NumPy does not perform well.
For Windows the NumPy and SciPy libraries linked to MKL can be obtained from Unofficial Windows Binaries for Python Extension Packages by Christoph Gohlke.
To run the tests included with QmeQ we use
- py.test testing framework.
To install it run
$ pip install pytest
Then the tests can be performed by calling
$ cd 'path to qmeq source'/qmeq
$ pytest tests
QmeQ contains the documentation generated from docstrings in the source code. This documentation can be generated in html, latex, and other formats using
- Sphinx package,
- sphinx-rtd-theme Read the Docs Sphinx theme.
To install the above packages run
$ pip install sphinx sphinx-rtd-theme
For example, to generate the documentation in html format run
$ cd 'path to qmeq source'/docs
$ make html
The generated documentation should be in 'path to qmeq source'/docs/build/index.html