\documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{physics} \usepackage{yquant} \begin{document} \section{Spacer} \yquantdefinebox{dots}[inner sep=0pt]{$\vdots$} \begin{tikzpicture} \begin{yquant}[operator/separation=5mm, register/separation=0mm] qubit {$\ket{0}_1$} a1; qubit {$\ket{0}_2$} a2; nobit adots; qubit {$\ket{0}_{n\!}$} aN; nobit sep; qubit {$\ket{0}_1$} b1; qubit {$\ket{0}_2$} b2; nobit bdots; qubit {$\ket{0}_{n\!}$} bN; h a1; h a2; dots adots; h aN; dots bdots; box {$U_f$} (a1, a2, adots, aN, sep, b1, b2, bdots, bN); h a1; h a2; dots adots; h aN; dots bdots; align a1, a2, adots, aN, b1, b2, bdots, bN; measure a1; measure a2; dots adots; measure aN; measure b1; measure b2; dots bdots; measure bN; \end{yquant} \end{tikzpicture} \end{document}