I would like the dashed line to extend to the right of the last Hadamard gate on the top register. Everything is, more or less, happening in the top 3 registers

        & & & & &  & & & &\lstick{$\ket{0}$}&\qw         &\gate{H}\gategroup[wires = 3,steps = 1, style={dashed, rounded corners, inner sep=4pt}]{\textsc{swap} test}              &\ctrl{2}    &\gate{H} &\qw     &\meter{}\\
        & & & & &  & & & &\lstick{$\ket{0}$}&\qwbundle{t}&\gate{\mathcal{D}[W]} &\targX{}    &\qw&\qw        \rstick{$\frac{1}{\Delta}\sum_j\ket{\omega_j}$} \\
        \lstick{$\ket{0}$}     &\qwbundle{t}        &\gate[2, label style={rotate=90}]{\textsc{qpe}} &\qw\push{\ket{\lambda_0}}       & \qw          &\qw   &\qw                   &\qw &\qw&\qw&\gate[4, label style={rotate=90}]{\textsc{sub}}&\qw &\targX{}    &\qw&\qw        \rstick{$\sum_k d_{0,k}\ket{\omega_{0,k}}$}\\
        \lstick{$\ket{\psi_0}$}&\qwbundle{n}        &              &\qw\push{\ket{\psi_0}}    &\gate[2]{U_D} &\qw     &\push{\sum_k d_{0,k}\ket{\psi_k}} &\gate[3, label style={rotate=90}]{\textsc{qpe}}&\qw\push{\sum_k d_{0,k}\ket{\psi_k}}\\
        \lstick{$\ket{0}$}     &\qwbundle{k}        &\qw           &\qw                                      &\qw     &\push{\ket{0}^{\otimes k}}\hspace{-.33cm}\vcw{-1} \\
        \lstick{$\ket{0}$}     &\qwbundle{t}        &\qw           &\qw                        &\qw          &\qw     &\qw                  &\qw                                     &\push{\sum_k d_{0,k}\ket{\lambda_k}}         &\qw &\qw &\push{\sum_k d_{0,k}\ket{\lambda_{k}}}   

Generates: 1 step size

However, when I change the step size to any number > 1, I get this:

Step = 2

I've been trying to get this to go for a few hours now and I feel like there must be something silly happening here I can't get sorted.


  • 1
    Welcome to tex.sx. Sep 18 at 20:37
  • Welcome. // Please make it a habbit for posted code to: a) always start with \documentclass AND end with end{document}, b) include all relevant packages to compile when we copy it. Thank you
    – MS-SPO
    Sep 19 at 16:17


You must log in to answer this question.

Browse other questions tagged .