Open nikhilkhatri opened 6 months ago
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
@intel-eth Thanks for your message, however unitaryhack is unfortunately over for this year, so no bounties anymore.
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.