graphix icon indicating copy to clipboard operation
graphix copied to clipboard

Printing `Pattern` in LaTeX format

Open king-p3nguin opened this issue 1 year ago • 0 comments

Add a method to print Pattern in LaTeX format like

$$ X_7^{3} M_3^{0} E_{37} N_7 X_6^5 Z_6^4 Z_3^4 M_5^0 M_4^0 E_{56} E_{45} E_{35} N_6 N_5 X_4^1 M_1^0 E_{14} N_4 Z_3^0 X_3^2 M_2^0 M_0^{-\theta} E_{23} E_{02} N_3 N_2 $$

or

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

There should be an option to

  • omit measurement plane when all the measurement commands have the same measurement plane
  • show Clifford commands in "C" (like $C_6^{12}$)
  • display in LaTeX format (when running in jupyter notebook) or print the LaTeX source code

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

king-p3nguin avatar Nov 15 '23 17:11 king-p3nguin