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

Fix Circuit Plotting for non-reversed states #137

Merged
merged 2 commits into from
Apr 17, 2022

Conversation

christian512
Copy link
Contributor

The plotting of circuits had an error for setting reversed=False. This was already discussed in a PR for the QuTiP repository.
See: qutip/qutip#1847

@BoxiLi
Copy link
Member

BoxiLi commented Apr 11, 2022

Thank you very much @christian512 ! There is a small deviation here. In qutip-qip, qc.latex_code() gives the full executable LaTeX code rather than just the circuit part. The intention is to make the output directly usable. So one gets here

\documentclass{standalone}
\usepackage[braket]{qcircuit}
\renewcommand{\qswap}{*=<0em>{\times}}
\begin{document}
\Qcircuit @C=1cm @R=1cm {
&  &  \meter & \qw \\ 
&  &  \qw \cwx[-1]  & \qw \\ 
}
\end{document}

@christian512
Copy link
Contributor Author

@BoxiLi , thanks for the comment :) I will change the two tests for this function.

@BoxiLi BoxiLi added this to the qutip-qip-0.2.2 milestone Apr 12, 2022
@BoxiLi BoxiLi merged commit 474089d into qutip:master Apr 17, 2022
@BoxiLi
Copy link
Member

BoxiLi commented Apr 17, 2022

Tests pass! Many thanks @christian512 !

BoxiLi pushed a commit to BoxiLi/qutip-qip that referenced this pull request Jun 18, 2022
* fix circuit plotting when states are non reversed

* Include latex_template in expectation
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 this pull request may close these issues.

2 participants