You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lambeq has a rich interface for drawing diagrams using matplotlib and tikz. it also has an interface for drawing diagrams as ASCII text to a CLI interface. Presently, this text drawing is limited to pregroup diagrams, such as those created by the DisCoCat model.
This task asks for the text drawing feature to be extended to arbitrary diagrams, including the grammar, tensor and quantum diagrams which lambeq provides.
The current implementation assumes that diagrams have a pregroup structure. That is, they consist of a single layer of Word boxes, followed by layers consisting of swaps, identities or cups. In general, lambeq's backend can represent arbitrary string diagrams which do not have this constraint.
Completing this task requires providing an implementation of diagram2str in the DiagramTextPrinter class which can draw arbitrary string diagrams.
Notes
The text drawing feature is expected to work on all 3 diagram backends provided by lambeq:
neiljdo
changed the title
Implement ASCII drawing for all lambeq diagrams
[unitaryHACK 2024] Implement ASCII drawing for all lambeq diagrams
May 28, 2024
dimkart
changed the title
[unitaryHACK 2024] Implement ASCII drawing for all lambeq diagrams
Implement ASCII drawing for all lambeq diagrams
Jul 30, 2024
Hi Nikhil.
I have just entered unitary hackaton and I am confident with my skill.
By the way, I want to know if I can get bounties right now.
Thanks,
Edward
Task description
lambeq has a rich interface for drawing diagrams using matplotlib and tikz. it also has an interface for drawing diagrams as ASCII text to a CLI interface. Presently, this text drawing is limited to pregroup diagrams, such as those created by the DisCoCat model.
This task asks for the text drawing feature to be extended to arbitrary diagrams, including the grammar, tensor and quantum diagrams which lambeq provides.
The current implementation assumes that diagrams have a pregroup structure. That is, they consist of a single layer of
Word
boxes, followed by layers consisting of swaps, identities or cups. In general, lambeq's backend can represent arbitrary string diagrams which do not have this constraint.Completing this task requires providing an implementation of
diagram2str
in theDiagramTextPrinter
class which can draw arbitrary string diagrams.Notes
References
DiagramTextPrinter
class where the implementation should be added.The text was updated successfully, but these errors were encountered: