This code
\documentclass{article}
\usepackage{tikz-cd}
% \usetikzlibrary{quantikz2}
\begin{document}
\begin{tikzcd}[ampersand replacement=\&]
A \arrow[rrrr, ""] \& \& \& \& B \arrow[rd, ""] \\
\& \& \& \& \& C \\
D \arrow[rrrr, ""] \& \& \& \& E \arrow[ru]
\end{tikzcd}
\end{document}
produces this:
This code
\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{quantikz2}
\begin{document}
\begin{tikzcd}[ampersand replacement=\&]
A \arrow[rrrr, ""] \& \& \& \& B \arrow[rd, ""] \\
\& \& \& \& \& C \\
D \arrow[rrrr, ""] \& \& \& \& E \arrow[ru]
\end{tikzcd}
\end{document}
produces this:
How do I get the first result if I need to use quantikz in my document? Loading quantikz locally for each diagram seems painful.



quantikznotquantikz2. – Sandy G Mar 21 '24 at 02:43quantikz2actually. – mavzolej Mar 21 '24 at 03:24\usetikclibrary{quantikz2}uses xparse and etoolbox to modify TikZ. making it incompatible with any other use of TikZ, Tikzcd should't cause any problems. – John Kormylo Mar 21 '24 at 17:55