Open source library for hafnian calculation
Project description
The fastest exact hafnian library for real and complex full rank matrices. For more information, please see the documentation.
Features
Provides the fastest calculation of the hafnian and loop hafnian.
The algorithms in this library are what Ryser’s formula is to the permanent.
Dependencies
Hafnian depends on the following Python packages:
These can be installed using pip, or, if on linux, using your package manager (i.e. apt if on a Debian-based system.)
Note that the C extension may need to be compiled; you will need the following libraries:
BLAS
LAPACKe
OpenMP
On Debian-based systems, this can be done via apt before installation:
$ sudo apt install liblapacke-dev
Installation
Installation of Hafnian, as well as all required Python packages mentioned above, can be done using pip:
$ python -m pip install hafnian
Software tests
To ensure that the Hafnian library is working correctly after installation, the test suite can be run by navigating to the source code folder and running
make test
Documentation
The Hafnian documentation is built automatically and hosted at Read the Docs. To build it locally, you need to have the following packages installed:
Sphinx >=1.5
sphinxcontrib-bibtex >=0.3.6
They can be installed via a combination of pip and apt if on a Debian-based system:
$ sudo apt install pandoc $ pip3 install sphinx sphinxcontrib-bibtex nbsphinx --user
To build the HTML documentation, go to the top-level directory and run the command
$ make doc
The documentation can then be found in the docs/_build/html/ directory.
Support
Source Code: https://github.com/XanaduAI/hafnian
Issue Tracker: https://github.com/XanaduAI/hafnian/issues
If you are having issues, please let us know by posting the issue on our Github issue tracker.
License
Hafnian is free and open source, released under the Apache License, Version 2.0.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Hafnian-0.1.1.tar.gz
.
File metadata
- Download URL: Hafnian-0.1.1.tar.gz
- Upload date:
- Size: 43.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3defc02e4343307a11e8946baf52d5c57f01c730218d655dd1e0120987a57ada |
|
MD5 | 501aaeb048d9aa7496efcc9f35541ba6 |
|
BLAKE2b-256 | aa56037310f162a45f2318f3103e6cca967e405de9366c15cc5fd4929d9a57b2 |