I am a long-time consumer of the discussions in this great forum. This is my first question, so please correct me if I do not follow some protocols.
In my attempt to use both the packages zx-calculus and quantikz I run into two (maybe related) problems. Please note that compilation works just fine when I compile with TeXShop (which I commonly use) but the problems occur when compiling with pdflatex or latex from console (originally discovered while trying to upload an article to arxiv with their AutoTeX). Also note that I need quantikz in the same document but did not include it in the MWEs because quantikz' functions are not affected.
- When loading zx-calculus first and quantikz second, the ZX-diagrams have overlying horizontal lines along all rows of the diagram. This is clearly some redefinition of a command in tikzcd by quantikz. However, I cannot pin it down and fix it.
MWE 1:
\documentclass{standalone}
\usepackage{quantikz}
\usepackage{zx-calculus}
\begin{document}
\begin{ZX}
\leftManyDots{} \zxZ{}
\end{ZX}
\end{document}
Results in:
- When loading quantikz first and zx-calculus second, zx-calculus/tikzcd/pgf fails on the command
\leftManyDots{}and gives the error
! Package pgf Error: Sorry, the requested layer 'edgelayer' is not part of the
layer list. Please verify that you provided \pgfsetlayers and that 'edgelayer'
is part of this list.
See the pgf package documentation for explanation.
Type H <return> for immediate help
...
l.10 I think the culprit is a tikzcd arrow in cell 1-1.
\errmessage ...currentrow -\tikzcd@currentcolumn }
l.11 \end{ZX}
I pinned the error down to the command \leftManyDots{} which automatically creates a new cell and separator & within tikzcd. I have played around with the code in the package but have not found any solution.
MWE 2:
\documentclass{standalone}
\usepackage{zx-calculus}
\usepackage{quantikz}
\begin{document}
\begin{ZX}
\leftManyDots{} \zxZ{}
\end{ZX}
\end{document}
The following shows how the MWE should look like.
Expected:
I would be happy if you could point me to a direction or even find a solution.



\pdfoutput=1in the first five lines of the preamble) does not solve the problem for me whilst trying to submit to arxiv. – Max Schwetz Jun 23 '23 at 06:28