Skip to content

toumix/discopy

 
 

Repository files navigation

snake equation

DisCoPy

build readthedocs PyPI version DOI: 10.4204/EPTCS.333.13

DisCoPy is a Python toolkit for computing with string diagrams.

DisCoPy began as an implementation of DisCoCat and QNLP. This has now become its own library: lambeq.

Features

Architecture

Software dependencies between modules go top-to-bottom, left-to-right and forgetful functors between categories go the other way.

hierarchy

Install

pip install discopy

Test

If you want the bleeding edge, you can install DisCoPy locally:

git clone https://github.com/discopy/discopy.git
cd discopy
pip install .

You should check you haven't broken anything by running the test suite:

pip install ".[test]" .
coverage run -m pytest --doctest-modules --pycodestyle
coverage report -m discopy/*.py discopy/*/*.py

The documentation is built using sphinx. You can build it locally with:

pip install ".[docs]" .
sphinx-build docs docs/_build/html

Contribute

Contributions are welcome, please get in touch or open an issue.

How to cite

If you wish to cite DisCoPy in an academic publication, we suggest you cite:

  • G. de Felice, A. Toumi & B. Coecke, DisCoPy: Monoidal Categories in Python, EPTCS 333, 2021, pp. 183-197, DOI: 10.4204/EPTCS.333.13

If furthermore your work is related to quantum computing, you can also cite:

  • A. Toumi, G. de Felice & R. Yeung, DisCoPy for the quantum computer scientist, arXiv:2205.05190

About

The Python toolkit for computing with string diagrams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%