Enables Visualization (Issue: #10 ) of Pauli Polynomials and latex export.
from pauliopt.pauli.pauli_polynomial import PauliPolynomial
from pauliopt.pauli.pauli_gadget import PPhase
from pauliopt.utils import Angle, pi
from pauliopt.pauli.utils import I, X, Y, Z
pp = PauliPolynomial(5)
pp >>= PPhase(Angle(pi)) @ [I, I, X, Z, Y]
pp >>= PPhase(Angle(pi)) @ [I, I, X, Z, Y]
pp >>= PPhase(Angle(pi / 2)) @ [I, I, X, Z, Y]
display(pp)
# shows the Pauli Polynomial in jupyter notebooks
pp.to_svg(svg_code_only=True)
# provides the SVG code of the Pauli Polynomial
pp.to_latex()
# provides the latex code representing the PP
pp.to_latex(file_name="test")
# stores the Pauli Polynomial in 'text.tex'
Enables Visualization (Issue: #10 ) of Pauli Polynomials and latex export.