Closed amirebrahimi closed 1 year ago
You are right, we should reset all the special commands as soon as a grouped circuit is entered, as they don't make any sense in there. This commit should fix it.
Thank you!
Hmm...I'm still getting an error:
Use of \yquantgroup@linebreak@i doesn't match its definition.
I downloaded the latest and copied it to Overleaf directly and used the local one.
Can you give your full code? The following works without any error for me:
\documentclass{article}
\usepackage[compat=newest]{yquant}
\usepackage{amsmath}
\useyquantlanguage{groups}
\begin{document}
\begin{tikzpicture}[scale=1]
\begin{yquantgroup}[
register/minimum height=5mm,
]
\registers{
qubit {} q[2];
}
\circuit{
box {U} q[1] | q[0];
}
\equals
\circuit{
box {C} q[1];
cnot q[1] | q[0];
box {B} q[1];
cnot q[0] | q[1];
box {$\begin{bmatrix} 1 & 0 \\ 0 & e^{ia}\end{bmatrix}$} q[0];
box {A} q[1];
}
\end{yquantgroup}
\end{tikzpicture}
\end{document}
I created a new project to test: https://www.overleaf.com/read/nppvykmhpqdm
Looking at the log files it looks like it is picking up the individual .tex
files from the 2022 texlive distribution for each \input
command in the local file yquant.sty. I'm trying now to override it to use the local files, but I'm not that well versed in LaTeX.
Figured it out thanks to this: https://tex.stackexchange.com/questions/505271/override-package-with-local-package-overleaf
Describe the bug The
\\
line break gets interpreted byyquantgroup
instead ofbmatrix
To Reproduce
Expected output I'd expect that I can create the same boxes with matrices that I can in
yquant
.Screenshots This is an example of it being in![image](https://user-images.githubusercontent.com/904110/222981276-2b47dfa9-c900-4696-b672-232a28ee69f8.png)
yquant
, but ultimately I'd like to set this as being equal to another circuit on the left side.Environment Overleaf