\documentclass[preview,convert={indir={aux/}, outdir={aux/}, outputdir={aux/}},border=40px]{standalone}
\usepackage{quantikz}

\begin{document}
\begin{quantikz}
\lstick{$\ket{0}$}  &           & \gate{H} & \gate{X} & \ctrl{1}    & \qw{}     & \qw{}     &   \qw{}    & \ctrl{1}    & \gate{X}  & \gate{H} & \meter{}\\
\lstick{$\ket{0}$}  &           & \gate{H} & \qw{}    & \targ{}     & \qw{}     & \ctrl{1}  &   \qw{}    & \targ{}     & \qw{}     & \gate{H} & \meter{}\\
\lstick{$\ket{0}$}  &           & \gate{H} & \qw{}    & \qw{}       & \qw{}     & \ctrl{1}  &   \qw{}    & \qw{}       & \qw{}     & \gate{H} & \meter{}\\
\lstick{$\ket{0}$}  & \gate{X}  & \gate{H} & \qw{}    & \qw{}       & \qw{}     & \targ{}   &   \qw{}    &
\end{quantikz}
\end{document}
