Coder Social home page Coder Social logo

stjordanis / hafnian Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xanaduai/thewalrus

0.0 4.0 0.0 5.04 MB

The fastest exact hafnian library for real and complex matrices.

Home Page: https://hafnian.readthedocs.io

License: Apache License 2.0

Makefile 3.34% Python 44.36% MATLAB 3.82% C 48.48%

hafnian's Introduction

Hafnian

Travis

Codecov coverage

Codacy grade

Read the Docs

PyPI - Python Version

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:

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.

Authors

Nicolás Quesada, Brajesh Gupt, and Josh Izaac.

If you are doing research using Hafnian, please cite our paper:

Andreas Björklund, Brajesh Gupt, and Nicolás Quesada. A faster hafnian formula for complex matrices and its benchmarking on the Titan supercomputer arXiv, 2018. arxiv:1805.12498

Support

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.

hafnian's People

Contributors

josh146 avatar nquesada avatar emaballarin avatar

Watchers

James Cloos avatar STYLIANOS IORDANIS avatar  avatar paper2code - bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.