TeamGraphix / graphix

measurement-based quantum computing (MBQC) compiler and simulator
https://graphix.readthedocs.io
Apache License 2.0
55 stars 20 forks source link

Printing `Pattern` in LaTeX format #101

Open king-p3nguin opened 7 months ago

king-p3nguin commented 7 months ago

Add a method to print Pattern in LaTeX format like

$$ X_7^{3} M3^{0} E{37} N_7 X_6^5 Z_6^4 Z_3^4 M_5^0 M4^0 E{56} E{45} E{35} N_6 N_5 X_4^1 M1^0 E{14} N_4 Z_3^0 X_3^2 M_2^0 M0^{-\theta} E{23} E_{02} N_3 N_2 $$

or

$$ X_7^0 C_6^6 M0^{-\theta} E{07} E_{06} N_7 $$

There should be an option to

See the document to check the definition of each command https://graphix.readthedocs.io/en/latest/intro.html#measurement-calculus