![Quantikz:添加文本](https://linux22.com/image/470947/Quantikz%EF%BC%9A%E6%B7%BB%E5%8A%A0%E6%96%87%E6%9C%AC.png)
答案1
使用\wireoverride{n}
。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{quantikz2}
\begin{document}
\begin{quantikz}
a &\wireoverride{n}b & \wireoverride{n}c & \wireoverride{n}d & \wireoverride{n}e \\
& \gate{X} & \ctrl{1} & & \\
& & \targ{}\wire[u]{q} & \gate{Z}&\\
& & \gate{X} & &
\end{quantikz}
\end{document}