Skip to content

Latest commit

 

History

History
146 lines (108 loc) · 4.05 KB

INSTALL.md

File metadata and controls

146 lines (108 loc) · 4.05 KB

Installation of QmeQ

For now QmeQ can be installed by building it from source. To be able to use and build QmeQ you need to have:

The indicated versions are the minimal required versions. Optionally, such packages are used:

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

QmeQ is installed 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.

C compiler

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.

The 32-bit gcc compiler can be used on Windows with 32-bit Python 2.7. This can be achieved by using the gcc compiler in MinGW suite by adding

[build]
compiler = mingw32

to 'path to python'\Lib\distutils\distutils.cfg. If the file does not exist then simply create it. We note that instead of using the actual MinGW it is possible to use Python package Mingwpy, which can be obtained using

$ pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy

NumPy and ATLAS/OpenBLAS/MKL

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.

Tests

To run the tests included with QmeQ we use

To install it run

$ pip install pytest

Then the tests can be performed by calling

$ cd 'path to qmeq source'/qmeq
$ pytest tests

Documentation

For now QmeQ contains just the documentation generated from docstrings in the source code. The QmeQ documentation can be generated in html, latex, and other formats using

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