这是一个量子电路的小例子(用 quantikz 绘制),它有 3 个gategroup
s。我怎样才能将 Charlie 的门组(蓝色)移到前面,以便它也位于 Bob 的门组的顶部,就像 Alice 的一样?
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{quantikz2}
\begin{document}
\begin{quantikz}
\lstick{$\ket{\psi}$} & \gate{X} \gategroup[1,steps=2,style={dashed,rounded corners,fill=gray!20,inner ysep=1pt},background,label style={label position=above,anchor=mid}]{{Alice}} & \gate{Y} \gategroup[2,steps=1,style={dashed,rounded corners,fill=blue!20,inner ysep=-2pt},background,label style={label position=right,anchor=mid,xshift=10pt,yshift=-4pt,rotate=-90}]{{Charlie}} \\
\lstick{$\ket{\phi}$} & \gate{Z} \gategroup[1,steps=2,style={dashed,rounded corners,fill=gray!20,inner ysep=1pt},background,label style={label position=below,anchor=north,yshift=-4pt}]{{Bob}} & \gate{Y}
\end{quantikz}
\end{document}