Pith. Sign in

REVIEW

Exact quantum Hamming-weight computation at optimal depth and minimum width

Quantum Physics · Submitted 18 Oct 2026 · 25 references

Pith's verdict: This paper resolves a clean open problem: exact Hamming-weight computation with optimal depth and minimal width. The constructions are rigorous and the pipelined Fourier addition is genuinely new. The main caveat is the reliance on all-to-all connectivity, which is standard in complexity theory but limits direct application on near-term devices.

T0 · AI review

How this review was made: An AI referee (deepseek/deepseek-v4-flash) read the paper on October 20, 2026 and answered a fixed list of questions about it. T0 is the starting level every paper gets. The levels describe how deeply Pith has checked the paper, never the authors.

  1. T0 AI review An AI read the paper and answered a fixed list of questions.
  2. T1 Audit Automatic checks that the references and files the paper relies on exist and match.
  3. T2 Compute The paper's code or calculations re-run with the same results.
  4. T3 Formal statement The claims written out in a formal math language a computer can read.
  5. T4 Proof Those claims proved, and the proof checked by computer.

How Pith checks papers →

· 2 minor · Ask about this paper · The compiled record · Read the full review →
Challenge this review Comment (0) Read on arXiv ↗
Cite ▾
arXiv ID2610.25315 (version 1)
Pith IDQQ5MI7Y6, Pith's permanent record of this paper and its review
CitationJunhong Nie, Pei Yuan, Wei Zi. "Exact quantum Hamming-weight computation at optimal depth and minimum width." arXiv:2610.25315 (2026). https://pith.science/paper/QQ5MI7Y6
Cite this reviewBibTeX for Pith's review of this paper
Claim paper

Why Pith says this

Highlight any text to comment on it.

Referee report
The paper

The paper claims

This paper proves that an exact quantum circuit can compute the Hamming weight of n bits using only n input qubits and log n output qubits, with depth O(log n) and size O(n log n), both optimal.

The reading

This paper establishes that an exact quantum circuit can compute the Hamming weight of an n-bit string using only the n input qubits and ⌈log₂(n+1)⌉ output qubits, with depth O(log n) and size O(n log n). Both the depth and the total width are optimal, matching fundamental information-theoretic and computational lower bounds. The construction avoids any additional clean or dirty workspace by temporarily borrowing input qubits and restoring them via a cancellation technique. The same idea yields exact circuits for all symmetric Boolean functions with identical resource bounds. If correct, these results settle the resource requirements for a fundamental quantum primitive and improve the asymptotic depth of downstream tasks such as Dicke-state preparation.

What carries the argument

The central mechanism is the simultaneous modular addition (Lemma 1), which uses a binary tree of m-qubit registers. The construction first applies bottom-up subtractions to cancel the initial values of target registers, then top-down additions to propagate the source value to all targets. This is implemented via a pipelined Fourier schedule (Lemma 4) that decodes bits sequentially while supplying phase gates to children, overlapping operations across tree levels so that total depth is O(m + log r) rather than O(m log r). The schedule alternates Hadamards between neighboring non-root levels and uses a two-round spacing between successive decoded bits, ensuring constant-depth logical rounds.

Extended reading notes

Core claim

The paper proves Theorem 1: for any n, there exists an exact unitary circuit mapping |x⟩_X |0^m⟩_W to |x⟩_X | |x| ⟩_W, where m = ⌈log₂(n+1)⌉, using depth O(log n), size O(n log n), and no qubits beyond the n input qubits and the m output qubits. The depth is optimal because the least significant output bit computes parity, which requires at least ⌈log₂ n⌉ depth. The width is optimal because the output register must distinguish n+1 values. The circuit uses all-to-all connectivity and arbitrary one-qubit gates and CNOTs. The key technical ingredient is a simultaneous modular addition primitive (Lemma 1) implemented by a pipelined Fourier schedule on a binary tree, which overlaps addition and decoding across tree levels to achieve depth O(log n) without additional workspace.

Load-bearing premise

The pipeline schedule for the path-sum permutation assumes that controlled-phase gates between any pair of qubits can be executed in constant depth, which requires all-to-all connectivity and constant-duration gates; any deviation from this gate model would break the depth bound.

Editorial extensions

If this is right

  • Exact circuits for every symmetric Boolean function are obtained with depth O(log n) and size O(n log n) using only m clean ancillary qubits, which is optimal in the worst case.
  • The counter enables Hamming-weight measurements with only m ancillary qubits, improving the expected depth of measurement-assisted balanced Dicke-state preparation from O(log³ n) to O(log² n).
  • Unitary Dicke-state preparation for any fixed classical weight k (1 ≤ k ≤ n-1) becomes possible in depth O(r^{1/4} log n) with r = min(k, n-k), using m ancillary qubits, through exact weight-selective reflections.
  • The construction proves that the depth–space trade-off for exact Hamming-weight computation is fully characterized, with both depth and width achieving lower bounds.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The pipelined tree technique may generalize to other reversible computations that require accumulating contributions from disjoint blocks using borrowed workspace, offering a template for space-optimal shallow circuits beyond counting.
  • The size O(n log n) may not be optimal; achieving size O(n) while retaining depth O(log n) and minimum width is an open problem that the authors explicitly identify.
  • All-to-all connectivity is assumed; applying these results to restricted architectures (e.g., nearest-neighbor) would likely require additional routing overhead, potentially increasing depth by a connectivity-dependent factor.
  • The same construction could be adapted to compute weighted sums or other linear functions with similar resource bounds, provided the Fourier phases are adjusted accordingly.
Original 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.

The compiled record

The paper's own sentences, arranged, kept beside the review and separate from it. Each label is drawn from a closed vocabulary; the number beside it is the probability the classifier gave that label. Numbers in the tables are the authors', checked by code. No sentence in this record was written by a model.

Compiled by classifier-1.13.0 via TypeSafe API, question bank abstract-p1-20260923, 2026-10-20: 1 request, 6,258 input tokens.

What the abstract itself states, as probabilities: claims first 0.06 · states limitation 0.36 · human participants 0.01 · controlled comparison 0.02 · randomized assignment 0.01 · states quantitative result 0.98 · compares with prior results 0.18 · mentions code or data availability 0.02.

The abstract, sentence by sentence

arXiv listing abstract v1. Results and the main claim are underlined; .

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.

background contribution method result interpretation main claim

What the classifier reports for each sentence. The number is the probability it gave the label.
#sentencerolethe authors' own workstates the main conclusionstrength
s0 Hamming-weight computation and symmetric Boolean functions are basic primitives for quantum arithmetic and state preparation, where circuit depth and qubit overhead matter. background 1.00 0.05 0.04 asserted 1.00
s1 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. contribution 0.86 0.96 0.73 asserted 1.00
s2 The circuit uses arbitrary one-qubit gates and CNOTs with all-to-all connectivity. method 0.95 0.79 0.05 asserted 1.00
s3 Both depth and total width are optimal. result 0.87 0.87 0.49 asserted 1.00
s4 Our constructions combine tree structures and pipelining, temporarily using input qubits as workspace. method 1.00 0.94 0.06 asserted 1.00
s5 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. contribution 0.89 0.95 0.14 asserted 1.00
s6 Finally, we apply the counter to exact preparation of balanced Dicke states for even $n$. contribution 0.83 0.93 0.05 asserted 1.00
s7 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. result 0.62 0.90 0.09 asserted 1.00

What kind of paper the classifier reports this is: method or tool 0.71 · evidence from proof or derivation 1.00.

What was examined, and what was not

sources read
  • arXiv listing abstract v1
not examined
  • full text
  • figures and tables
  • references and citing sentences
  • relations to other papers
levels run
  • P abstract
not run
  • S sections
  • T body sentences
  • C citations
  • R cross-paper relations

Every quoted sentence on this record is the authors'. Every label is from Pith's closed vocabulary, with the probability shown beside it. Every number in the measurements table is the authors', checked by code. Record as JSON

Figures
Figure 1. FIG. 1. Coherent counting using the input as temporary workspace. (a) A Hadamard layer prepares the output, three batches
Figure 2. FIG. 2. Tree construction of simultaneous addition, illustrated with six target words. Each box shows the current integer label
Figure 3. FIG. 3. The tree pipeline after logical round
Figure 4. FIG. 4. Boolean evaluation by routing with dirty workspace. (a) The input (

Figures reproduced from arXiv:2610.25315 by the authors.

References

Discussion

Disagree with the review, or know something it missed? Leave a comment, highlight any passage above to comment on it, or challenge this review formally.