\documentclass[preview,convert={indir={aux/}, outdir={aux/}, outputdir={aux/}},border=40px]{standalone}
\usepackage{quantikz}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

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