The Walrus

The Walrus: a library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling - Published in JOSS (2019)

https://github.com/xanaduai/thewalrus

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    1 of 34 committers (2.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

algorithm combinatorics graphs matrix optimization physics quantum quantum-computing

Keywords from Contributors

autodiff automatic-differentiation jax jit llvm mlir pennylane qir quantum-compiler mesh

Scientific Fields

Mathematics Computer Science - 34% confidence
Last synced: 6 months ago · JSON representation

Repository

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.

Basic Info
Statistics
  • Stars: 104
  • Watchers: 9
  • Forks: 58
  • Open Issues: 22
  • Releases: 26
Topics
algorithm combinatorics graphs matrix optimization physics quantum quantum-computing
Created almost 8 years ago · Last pushed 9 months ago
Metadata Files
Readme License Code of conduct

README.rst

The Walrus
##########

.. image:: https://github.com/XanaduAI/thewalrus/actions/workflows/tests.yml/badge.svg
    :alt: Tests
    :target: https://github.com/XanaduAI/thewalrus/actions/workflows/tests.yml

.. image:: https://img.shields.io/codecov/c/github/xanaduai/thewalrus/master.svg?style=flat
    :alt: Codecov coverage
    :target: https://codecov.io/gh/XanaduAI/thewalrus

.. image:: https://img.shields.io/codefactor/grade/github/XanaduAI/thewalrus/master?style=flat
    :alt: CodeFactor Grade
    :target: https://www.codefactor.io/repository/github/xanaduai/thewalrus

.. image:: https://img.shields.io/readthedocs/the-walrus.svg?style=flat
    :alt: Read the Docs
    :target: https://the-walrus.readthedocs.io

.. image:: https://img.shields.io/pypi/pyversions/thewalrus.svg?style=flat
    :alt: PyPI - Python Version
    :target: https://pypi.org/project/thewalrus

.. image:: https://joss.theoj.org/papers/10.21105/joss.01705/status.svg
    :alt: JOSS - The Journal of Open Source Software
    :target: https://doi.org/10.21105/joss.01705

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.10, 3.11, or 3.12. Installation of The Walrus, as
well as all dependencies, can be done using pip:

.. code-block:: bash

    pip install thewalrus


Compiling from source
=====================

The Walrus has the following dependencies:

* `Python `_ >= 3.10
* `NumPy `_  >= 2.2.5
* `Numba `_ >= 0.61.2
* `SciPy `_ >=1.15.3
* `SymPy `_ >=1.14.0
* `Dask[delayed] `_ >=2025.4.1

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

.. code-block:: console

    $ 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``:

.. code-block:: console

    $ pip install -r requirements-dev.txt

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

.. code-block:: console

    $ 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:

.. code-block:: console

    $ 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

.. code-block:: console

    $ 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
=======

- **Source Code:** https://github.com/XanaduAI/thewalrus
- **Issue Tracker:** https://github.com/XanaduAI/thewalrus/issues

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.

Owner

  • Name: Xanadu
  • Login: XanaduAI
  • Kind: organization
  • Email: hello@xanadu.ai
  • Location: Toronto, ON

Quantum Computing Powered by Light

JOSS Publication

The Walrus: a library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling
Published
December 19, 2019
Volume 4, Issue 44, Page 1705
Authors
Brajesh Gupt ORCID
Xanadu, Toronto, Canada
Josh Izaac ORCID
Xanadu, Toronto, Canada
Nicolás Quesada ORCID
Xanadu, Toronto, Canada
Editor
Kathryn Huff ORCID
Tags
quantum computing quantum optics graph theory

GitHub Events

Total
  • Release event: 1
  • Watch event: 4
  • Delete event: 5
  • Issue comment event: 7
  • Push event: 41
  • Pull request review event: 28
  • Pull request review comment event: 28
  • Pull request event: 10
  • Fork event: 3
  • Create event: 6
Last Year
  • Release event: 1
  • Watch event: 4
  • Delete event: 5
  • Issue comment event: 7
  • Push event: 41
  • Pull request review event: 28
  • Pull request review comment event: 28
  • Pull request event: 10
  • Fork event: 3
  • Create event: 6

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 984
  • Total Committers: 34
  • Avg Commits per committer: 28.941
  • Development Distribution Score (DDS): 0.368
Past Year
  • Commits: 4
  • Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Nicolas Quesada n****s@x****i 622
Josh Izaac j****6@g****m 133
Theodor Isacsson t****n@g****m 88
ziofil m****o@g****m 26
Brajesh Gupt b****t@g****m 24
Sebastián Duque Mesa 6****a 21
Trevor Vincent t****r@x****i 13
Trevor Vincent t****t 8
Kieran Wilkinson k****1@g****m 5
Luke Helt 3****e 5
Jake Bulmer 5****r 5
Gregory Morse g****e@l****m 4
Soran s****h@y****m 4
Jack Brown j****k@x****i 2
Mikhail Andrenkov M****v 2
Ryosuke Noro 6****O 2
ilan-tz 5****z 2
timjank 4****k 2
Alberto Fumagalli a****o@x****i 1
Theodor Isacsson t****i@k****e 1
Brajesh Gupt b****t@B****l 1
Ali Asadi m****2@g****m 1
Antonín Hoskovec a****c@g****m 1
Bastian Zimmermann 1****m 1
Benjamin Lanthier 9****r 1
Daniel Nagaj d****j@g****m 1
Dominic Leclerc 9****3 1
Emanuele Ballarin e****e@b****c 1
Javier Martínez 9****c 1
MHoude2 9****2 1
and 4 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 22
  • Total pull requests: 116
  • Average time to close issues: 7 months
  • Average time to close pull requests: 18 days
  • Total issue authors: 14
  • Total pull request authors: 29
  • Average comments per issue: 2.95
  • Average comments per pull request: 2.18
  • Merged pull requests: 95
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 0
  • Pull requests: 7
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Issue authors: 0
  • Pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 1.57
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • nquesada (6)
  • josh146 (3)
  • thisac (2)
  • sduquemesa (2)
  • jacobhilton (1)
  • ziofil (1)
  • sylviemonet (1)
  • hsgyc (1)
  • minseok1999 (1)
  • yurivict (1)
  • GregoryMorse (1)
  • ggardet (1)
  • changhun0218 (1)
  • amanuelanteneh (1)
Pull Request Authors
  • nquesada (42)
  • sduquemesa (23)
  • thisac (14)
  • heltluke (11)
  • rachelchadwick (6)
  • RyosukeNORO (5)
  • GregoryMorse (4)
  • ziofil (3)
  • dependabot[bot] (3)
  • smokingroosters (2)
  • dleclerc33 (2)
  • Mandrenkov (2)
  • aleksey-uvarov (2)
  • benjaminlanthier (2)
  • dorakingx (2)
Top Labels
Issue Labels
bug (9) enhancement (6) documentation (3) python (2) dependencies (2) C++ (2) tests (1) unitaryhack (1) good first issue (1)
Pull Request Labels
dependencies (5) enhancement (4) review-ready (3) python (3) documentation (2) C++ (2) merge-ready (2) WIP (1) code quality (1) tests (1)

Packages

  • Total packages: 5
  • Total downloads:
    • pypi 22,632 last-month
  • Total dependent packages: 6
    (may contain duplicates)
  • Total dependent repositories: 18
    (may contain duplicates)
  • Total versions: 72
  • Total maintainers: 3
pypi.org: thewalrus

Open source library for hafnian calculation

  • Versions: 20
  • Dependent Packages: 4
  • Dependent Repositories: 18
  • Downloads: 22,632 Last month
  • Docker Downloads: 0
Rankings
Dependent packages count: 3.3%
Dependent repos count: 3.5%
Docker downloads count: 3.8%
Downloads: 4.4%
Average: 4.7%
Forks count: 5.7%
Stargazers count: 7.4%
Maintainers (2)
Last synced: 6 months ago
proxy.golang.org: github.com/xanaduai/thewalrus
  • Versions: 24
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 6 months ago
proxy.golang.org: github.com/xanaduAI/thewalrus
  • Versions: 24
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 6 months ago
spack.io: py-thewalrus

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.

  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 15.1%
Average: 15.6%
Stargazers count: 19.1%
Dependent packages count: 28.1%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: thewalrus
  • Versions: 3
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Forks count: 22.9%
Dependent packages count: 28.8%
Average: 29.5%
Stargazers count: 32.2%
Dependent repos count: 34.0%
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • Jinja2 ==2.11.3
  • dask *
  • docutils ==0.16
  • ipykernel *
  • markupsafe ==2.0.1
  • nbsphinx ==0.7
  • numba >=0.49.1
  • numpy >=1.9
  • scipy >=1.8.0
  • sphinx ==3.5.3
  • sphinx-copybutton *
  • sphinxcontrib-bibtex *
  • sympy >=1.5.1
  • version_information *
  • xanadu-sphinx-theme ==0.1.0
requirements-dev.txt pypi
  • flaky ==3.7.0 development
  • pytest ==7.1.0 development
  • pytest-randomly ==3.11.0 development
requirements.txt pypi
  • dask ==2022.2.1
  • numba ==0.55.1
  • numpy ==1.21.5
  • scipy ==1.8.0
  • sympy ==1.10
.github/workflows/format.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • styfle/cancel-workflow-action 0.4.1 composite
.github/workflows/tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v3 composite
  • styfle/cancel-workflow-action 0.4.1 composite
setup.py pypi