Giter VIP home page Giter VIP logo

thewalrus's Introduction

The Walrus

Tests Codecov coverage CodeFactor Grade Read the Docs PyPI - Python Version JOSS - The Journal of Open Source Software

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling. For more information, please see the documentation.

Features

  • Fast calculation of hafnians, loop hafnians, and torontonians of general and certain structured matrices.
  • An easy to use interface to use the loop hafnian for Gaussian quantum state calculations.
  • Sampling algorithms for hafnian and torontonians of graphs.
  • Efficient classical methods for approximating the hafnian of non-negative matrices.
  • Easy to use implementations of the multidimensional Hermite polynomials, which can also be used to calculate hafnians of all reductions of a given matrix.

Installation

The Walrus requires Python version 3.7, 3.8, 3.9, or 3.10. Installation of The Walrus, as well as all dependencies, can be done using pip:

pip install thewalrus

Compiling from source

The Walrus has the following dependencies:

You can compile the latest development version by cloning the git repository, and installing using pip in development mode.

$ git clone https://github.com/XanaduAI/thewalrus.git
$ cd thewalrus && python -m pip install -e .

Software tests

To ensure that The Walrus library is working correctly after installation, the test suite can be run locally using pytest.

Additional packages are required to run the tests. These dependencies can be found in requirements-dev.txt and can be installed using pip:

$ pip install -r requirements-dev.txt

To run the tests, navigate to the source code folder and run the command

$ make test

Documentation

The Walrus documentation is available online on Read the Docs.

Additional packages are required to build the documentation locally as specified in doc/requirements.txt. These packages can be installed using:

$ sudo apt install pandoc
$ pip install -r docs/requirements.txt

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.

Contributing to The Walrus

We welcome contributions - simply fork The Walrus repository, and then make a pull request containing your contribution. All contributors to The Walrus will be listed as authors on the releases.

We also encourage bug reports, suggestions for new features and enhancements, and even links to projects, applications or scientific publications that use The Walrus.

Authors

The Walrus is the work of many contributors.

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

Brajesh Gupt, Josh Izaac and Nicolas Quesada. The Walrus: a library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling. Journal of Open Source Software, 4(44), 1705 (2019)

Support

If you are having issues, please let us know by posting the issue on our Github issue tracker.

License

The Walrus is free and open source, released under the Apache License, Version 2.0.

thewalrus's People

Contributors

nquesada avatar josh146 avatar thisac avatar bgupt avatar ziofil avatar sduquemesa avatar trevor-vincent avatar knw500 avatar jakeffbulmer avatar soranjh avatar gregorymorse avatar timjank avatar ilan-tz avatar mandrenkov avatar brownj85 avatar maliasadi avatar thonic avatar bastianzim avatar nagaj avatar dleclerc33 avatar emaballarin avatar heltluke avatar mhoude2 avatar co9olguy avatar dependabot[bot] avatar fab1an-q avatar rachelchadwick 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.