Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex Renderer #206

Closed
jsenellart opened this issue May 23, 2023 · 4 comments · Fixed by #215
Closed

Latex Renderer #206

jsenellart opened this issue May 23, 2023 · 4 comments · Fixed by #215
Assignees

Comments

@jsenellart
Copy link
Contributor

jsenellart commented May 23, 2023

To include Perceval circuits in latex paper, we only have the option to generate svg through svg renderer (perceval/rendering/canvas/svg_canvas.py) or png through mplot renderer (perceval/rendering/canvas/mplot_canvas.py). The renderer are automatically selected or can be specified with output_format=Format.TEXT|LATEX|HTML option. For circuit, LATEX format is not supported:

in perceval/rendering/circuit/renderer.py:

    if output_format == Format.LATEX:
        raise NotImplementedError("Latex format is not supported for circuit rendering")

Describe the solution you'd like
Having a LaTeX renderer would enable integration of higher quality circuits in scientific papers - we can integrate svg inside LaTeX using Inkscape, but it does not give the control of the generated graph for further LaTeX editing.
A solution could be to generate TikZ code that will then be fully editable within latex - for instance changing font size, adding formula, etc...

@ewan-lister
Copy link

I will give this one a shot. Thanks!

@jsenellart
Copy link
Contributor Author

Hello @ewan-lister, thanks for your interest ! let us know if you need help or guidance !

@king-p3nguin
Copy link
Contributor

Hi, I am working on this issue as part of the Unitary Hack, and I would like to be assigned to this issue after successfully merging the PR.
Thank you!

ericbrts pushed a commit that referenced this issue Jun 13, 2023
@ericbrts
Copy link
Contributor

This issue was solved by @king-p3nguin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants