lambeq icon indicating copy to clipboard operation
lambeq copied to clipboard

[unitaryHACK 2024] Add frames in lambeq

Open dimkart opened this issue 9 months ago • 1 comments

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:

image

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].

References

[^2]: Vertical frames, horizontal frames, extension

dimkart avatar May 07 '24 12:05 dimkart