projekter/yquant

[frameless] subcircuit not recognized

Closed this issue · 4 comments

Describe the bug
I'm making a circuit equation, but adding [frameless] above subcircuit gives Package pgfkeys: I do not know the key '/tikz/frameless' and I am going to ignore it. Perhaps you misspelled it.

To Reproduce
I have the following code

\documentclass{article}
\usepackage{yquant}

\begin{document}
	\begin{center}
		\begin{tikzpicture}
			\begin{yquant}
				nobit q[2];
	
				[frameless]
				subcircuit {
					[out]
					qubit {} q[2];
					swap (q[0], q[1]);
				} (q);
				discard -;
	
				[draw=none]
				box {$=$}

                                [frameless]
				subcircuit {
					[out]
					qubit {} q[2];
					box {$S$} q;
					H q[0];
					cnot q[1] | q[0];
					cnot q[0] | q[1];
					H q[1];
				} (q);
				discard -;
			\end{yquant}
		\end{tikzpicture}	
	\end{center}
\end{document}

Expected output
The circuit equation without boxes, as in the examples in https://github.com/projekter/yquant/blob/master/doc/latex/yquant/yquant-doc.pdf.
image

Screenshots
Output without including [frameless]
image
Also note the overlapping gates S, which would also be nice to fix after figuring out how to remove the borders.

Environment

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex 2020.8.26)  2 JUN 2021 
...
Package: yquant 2020/07/11 v0.3.1 Yet another quantum circuit library for LaTeX

You should always consider the manual that corresponds to your version. frameless was added to yquant in version 0.4, so either you update or use the example as it was documented for your version, which is a bit more complicated, but provides an alternative way of drawing the things. And the overlapping gates was an issue with a wrong vertical positioning within subcircuits that was also fixed in 0.4. But please don't report issues unless you are using the most current version.

Got it, thanks! There doesn't seem to be manuals for older versions here, so I'll go ahead and update.

The manual should be in your local TEXMF tree. If you run texdoc yquant or have a a look in doc/latex/yquant in your local tree or search for yquant-doc.pdf, you should be able to find the manual (as for any other TEX package that you have installed).

Oh cool, that'll be useful in the future. I ended up upgrading everything, thanks for the advice!