qutip / qutip-qip

The QuTiP quantum information processing package
https://qutip-qip.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
116 stars 63 forks source link

Shifting LaTeX Code and Draw API Refactor #241

Closed gadhvirushiraj closed 2 months ago

gadhvirushiraj commented 2 months ago

Shifting LaTeX Code and Circuit API Refactor

Transferring all LaTeX circuit rendering functionality from circuit.py to a dedicated file named texrenderer.py. Additional renderers such as matplotlib and text will be incorporated into the draw() method as they become available.

gadhvirushiraj commented 2 months ago

@BoxiLi should we move circuit_latex.py as well, or maybe rename it to latex_utils.py ?

BoxiLi commented 2 months ago

I think it would be nice to merge them into texrenderer.py. One file suffice, it is not so big.

BoxiLi commented 2 months ago

I activated the tests but some of them are failing I believe. You can verify by pytest tests locally on your machine.

gadhvirushiraj commented 2 months ago

@BoxiLi All tests are passing, and circuit_latex.py has been moved. Do we need to include any particular deprecation message, considering qc.draw() continues to function as it did before?

BoxiLi commented 2 months ago

I don't think we need any deprecation warning, as the user interface remain valid.