DisCoPy

The Python toolkit for computing with string diagrams


DisCoPy is a Python toolkit for computing with string diagrams.

Why?

Applied category theory is information plumbing. It’s boring… but plumbers save more lives than doctors.

As string diagrams become as ubiquitous as matrices, they need their own fundamental package: DisCoPy.

How?

DisCoPy began as an implementation of:

  • DisCoCat (distributional compositional categorical) models,
  • and QNLP (quantum natural language processing).

This application was a separate package called lambeq, it’s now being developed as a module discopy.lambek.

Who?

Want to contribute or just ask us a question? Get in touch on Discord!