lambeq
lambeq copied to clipboard
[unitaryHACK 2024] Add frames in lambeq
Description
The purpose of this task is to add a Frame
class to lambeq.backend
^1, representing a higher-order box that contains diagrams inside it:
A core implementation must include a lambeq.backend.grammar.Frame
class that can be used in a grammar
diagram. It should also have the following features:
- the ability to hold multiple diagrams (like in the image), including diagrams that themselves contain frames
- work with functors
- be drawable, in the sense that
Diagram.draw()
method is able to render all frames properly, as in the figure above.
Notes
- It may be helpful to refer to the implementation of frames in DisCoPy [^2].