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

circuit_to_latex_using_qcircuit produces a diagram with bad margins #1487

Closed
dlyongemallo opened this issue Apr 1, 2019 · 5 comments
Closed
Labels
area/latex area/qcircuit kind/bug-report Something doesn't seem to work. triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add

Comments

@dlyongemallo
Copy link
Contributor

dlyongemallo commented Apr 1, 2019

I'm not actually sure whether this is a Cirq problem or a qcircuit problem or a jupyter notebook problem. I'm trying to plot a graphical representation of a Cirq circuit in a jupyter notebook using circuit_to_latex_using_qcircuit. However, the produced output has effectively negative margins, so that parts of the image are outside the borders (and thus are not displayed).

Different circuits can have different parts cut off, but for a simple circuit the input and output labels are not visible. This is true whether the output is pdf or png.

Here is a repro case (if you take out the work-around of border=25pt which forces it to work for the particular example):
https://gitlab.com/qosf/qml-mooc/merge_requests/14/diffs#9fb6ab7d0ea5d69d872cb08c4ff1e68861b7c397_173_193

@Strilanc
Copy link
Contributor

Strilanc commented Apr 1, 2019

This is a qcircuit bug. That being said, I don't think it's going to be fixed there and we probably should work around it somehow..

@dlyongemallo
Copy link
Contributor Author

Where can I report (or fix) qcircuit bugs?

(Also: Filed https://gitlab.com/qosf/qml-mooc/issues/2 to remember to update the notebook where I found the problem once it's fixed or worked around.)

@Strilanc
Copy link
Contributor

Strilanc commented Apr 3, 2019

I don't actually know if there's anyone maintaining it...

@dabacon
Copy link
Collaborator

dabacon commented May 3, 2020

This is probably another vote fore #1290 especially if qcircuit isn't being updated.

@maffoo maffoo added area/latex kind/bug-report Something doesn't seem to work. labels Sep 22, 2020
@balopat balopat added area/qcircuit triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add labels Sep 25, 2020
@tanujkhattar
Copy link
Collaborator

qcircuit should be deprecated in favour of using qpic, which is being tracked in #5895

@tanujkhattar tanujkhattar closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/latex area/qcircuit kind/bug-report Something doesn't seem to work. triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add
Projects
None yet
Development

No branches or pull requests

8 participants