0.4.0
Added:
-
A new integrated backend that replaces
DisCoPy
, which until now was providing the low-level functionality oflambeq
. The new backend offers better performance, increased stability, faster training speeds, and a simplified high-level interface to the user. The new backend consists of the following sub-modules:lambeq.backend.grammar
: Contains the building blocks for creating string diagrams.lambeq.backend.tensor
: Contains the necessary classes to create tensor diagrams.lambeq.backend.quantum
: Adds quantum-specific functionality to the backend and provides a circuit simulator based on the TensorNetwork library.lambeq.backend.pennylane
: Interface with PennyLane.lambeq.backend.tk
: Inteface with Tket.lambeq.backend.numerical_backend
: Common interface for numerical backends (such as Numpy, Jax, PyTorch, TensorFlow)lambeq.backend.drawing
: Contains drawing functionality for diagrams and circuits.
-
lambeq.BobcatParser
: Added a special case for adjectival conjunction in tree translation. -
lambeq.TreeReader
: Diagrams now are created straight from thelambeq.CCGTree
. -
lambeq.CCGRule
apply method: Addedlambeq.CCGRule.apply
method to classlambeq.CCGRule
.
Changed:
- Diagram-level rewriters: Rewrite functions
remove_cups
andremove_swaps
are now refactored as diagram-level rewriters,lambeq.RemoveCupsRewriter
andlambeq.RemoveSwapsRewriter
correspondingly. - Extra whitespace is now ignored in the
lambeq.Tokeniser
.
Fixed:
lambeq.UnknownWordsRewriteRule
: Fixed rewriting of non-word boxes.
Removed:
- Removed
CCGTree.to_biclosed_diagram
and references todiscopy.biclosed
. Now CCG trees are directly converted into string diagrams, without the extra step of storing the derivation in a biclosed form. lambeq.CCGRule
: Removedreplace_cat_result
and addedlambeq.CCGRule.resolve
.