What's a good package for typesetting quantum circuits?
The image you link to was a diagram I did in TikZ a few years ago. It's not a particularly efficient way of doing it either. These days I'd typeset that using a TikZ matrix environment. The only real option specific to quantum circuits were qasm2circ and q-circuit. I don't like the output they generate though, and TikZ is really the way to go in my opinion. Sure, it may require a few more key strokes, but I think the effort pays off. One important point to make is that TikZ can be slow, but if you get it to externalise TikZ images then it becomes as fast as a normal \includegraphics
after a single slow compilation per diagram.
A revised version of the example you link to which may be more inspirational follows:
\documentclass[10pt]{standalone}
\usepackage{tikz}
% TikZ libraries `calc` needed now to tweak bracket.
\usetikzlibrary{backgrounds,fit,decorations.pathreplacing,calc}
% Dirac Kets
\newcommand{\ket}[1]{\ensuremath{\left|#1\right\rangle}}
\begin{document}
\begin{tikzpicture}[thick]
% `operator' will only be used by Hadamard (H) gates here.
% `phase' is used for controlled phase gates (dots).
% `surround' is used for the background box.
\tikzstyle{operator} = [draw,fill=white,minimum size=1.5em]
\tikzstyle{phase} = [draw,fill,shape=circle,minimum size=5pt,inner sep=0pt]
\tikzstyle{surround} = [fill=blue!10,thick,draw=black,rounded corners=2mm]
%
\matrix[row sep=0.4cm, column sep=0.8cm] (circuit) {
% First row.
\node (q1) {\ket{0}}; &[-0.5cm]
\node[operator] (H11) {H}; &
\node[phase] (P12) {}; &
\node[phase] (P13) {}; &
&[-0.3cm]
\coordinate (end1); \\
% Second row.
\node (q2) {\ket{0}}; &
\node[operator] (H21) {H}; &
\node[phase] (P22) {}; &
&
\node[operator] (H24) {H}; &
\coordinate (end2);\\
% Third row.
\node (q3) {\ket{0}}; &
\node[operator] (H31) {H}; &
&
\node[phase] (P33) {}; &
\node[operator] (H34) {H}; &
\coordinate (end3); \\
};
% Draw bracket on right with resultant state.
\draw[decorate,decoration={brace},thick]
($(circuit.north east)-(0cm,0.3cm)$)
to node[midway,right] (bracket) {$\displaystyle\frac{\ket{000}+\ket{111}}{\sqrt{2}}$}
($(circuit.south east)+(0cm,0.3cm)$);
\begin{pgfonlayer}{background}
% Draw background box.
\node[surround] (background) [fit = (q1) (H31) (bracket)] {};
% Draw lines.
\draw[thick] (q1) -- (end1) (q2) -- (end2) (q3) -- (end3) (P12) -- (P22) (P13) -- (P33);
\end{pgfonlayer}
%
\end{tikzpicture}
\end{document}
Apparently Nielsen and Chuang used qasm2circ to produce the figures in Quantum Computation and Quantum Information.
You might also want to look at the qcircuit package: https://www.ctan.org/pkg/qcircuit