答案1
\documentclass{article}
\usepackage{quantikz}
\begin{document}
\begin{quantikz}[row sep={5mm,between origins}]
&\ctrl{1} & \qw \\
&\ctrl{1} & \qw \\
&\gate{U} & \qw
\end{quantikz}
\hspace{0.7em}=
\begin{quantikz}[row sep={5mm,between origins}]
&\qw & \ctrl{1} & \qw & \ctrl{1} & \ctrl{2} & \qw \\
&\ctrl{1} & \targ{} & \ctrl{1} & \targ{} & \qw & \qw \\
&\gate{V} & \qw & \gate{V^\dagger} & \qw & \gate{V} & \qw
\end{quantikz}
\end{document}