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

Swap gates are incorrectly rendered in LaTeX #166

Closed
hodgestar opened this issue Sep 2, 2022 · 0 comments · Fixed by #170
Closed

Swap gates are incorrectly rendered in LaTeX #166

hodgestar opened this issue Sep 2, 2022 · 0 comments · Fixed by #170

Comments

@hodgestar
Copy link
Contributor

The function latex_code() in circuit.py does:

col.append(r" \qswap \qwx[%d] \qw" % distance)

but the qcircuit package expects this to be \qwx[-%d] -- note the minus sign. This causes the pdflatex compilation to fail if the swap goes below the circuit (at least recent enough versions of qcircuit throw an error).

See https://mirrors.evoluso.com/CTAN/graphics/qcircuit/qcircuit.pdf for the qcircuit documentation.

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.

1 participant