arXiv · 2610.25315
Exact quantum Hamming-weight computation at optimal depth and minimum width
Abstract
Hamming-weight computation and symmetric Boolean functions are basic primitives for quantum arithmetic and state preparation, where circuit depth and qubit overhead matter. We construct an exact circuit computing the Hamming weight of an $n$-qubit register with depth $O(\log n)$ and size $O(n\log n)$, using only the $n$ input qubits and $m=\lceil\log_2(n+1)\rceil$ binary output qubits. The circuit uses arbitrary one-qubit gates and CNOTs with all-to-all connectivity. Both depth and total width are optimal. Our constructions combine tree structures and pipelining, temporarily using input qubits as workspace. We also give exact circuits for every symmetric Boolean function with the same depth and size bounds, using only $m$ ancillary qubits returned to zero. Finally, we apply the counter to exact preparation of balanced Dicke states for even $n$. With only $O(\log n)$ ancillary qubits, we obtain expected depth $O(\log^2 n)$ using measurements and classical feedforward, and depth $O(n^{1/4}\log n)$ using unitary gates alone.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Wei Zi, Pei Yuan, Junhong Nie. 2026-10-18. Exact quantum Hamming-weight computation at optimal depth and minimum width. https://arxiv.org/abs/2610.25315
Cite the original work for its findings. Save a collection to share your selection of sources.