CQCL / lambeq

A high-level Python library for Quantum Natural Language Processing
https://docs.quantinuum.com/lambeq/
Apache License 2.0
455 stars 110 forks source link

Implement ASCII drawing for all lambeq diagrams #140

Open nikhilkhatri opened 6 months ago

nikhilkhatri commented 6 months ago

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 the DiagramTextPrinter class which can draw arbitrary string diagrams.

Notes

References

intel-eth commented 3 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

dimkart commented 3 months ago

@intel-eth Thanks for your message, however unitaryhack is unfortunately over for this year, so no bounties anymore.