答案1
选择draw=none
就可以了
\documentclass[border=10]{standalone}
\usepackage{tikz}
\usetikzlibrary{quantikz}
\begin{document}
\begin{quantikz}
& \gate{H} & \ctrl{1}\gategroup[2,steps=3,
style={rounded corners, draw=none, fill=blue!20, inner xsep=2pt},
background]{{\sc swap}} & \targ{} & \ctrl{1} & \qw & \qw \\
& \qw & \targ{} & \ctrl{-1} & \targ{} & \gate{H} & \qw
\end{quantikz}
\end{document}