Preparation of Hamming-Weight-Preserving Quantum States with Log-Depth Quantum Circuits

Yu Li, Guojing Tian, Xiaoyu He, Xiaoming SunarXiv 2025 · DOI

Quantum computers are only as good as the states we can feed into them. However, "Quantum State Preparation" (QSP)—the process of turning a blank slate of $|0\rangle$ qubits into a complex target state—is a notorious bottleneck. While we know how to prepare arbitrary states in logarithmic depth, doing so usually requires an exponential number of extra "ancillary" qubits. For practical near-term devices, that’s a dealbreaker.

In this paper, researchers from the Chinese Academy of Sciences and Huawei Taylor Lab tackle this problem for a specific but highly useful class of states: Hamming-Weight-Preserving (HWP) states.

TL;DR

The authors present new algorithms to prepare Hamming-Weight-Preserving quantum states in $O(\log n)$ depth using only a polynomial number of ancillary qubits. They further demonstrate that for specific structures like trees and grids, these states can be prepared in log-depth with zero ancillary qubits, achieving near-optimal efficiency in both circuit depth and size.

What Problem Does This Paper Address?

In quantum computing, "depth" is time. The deeper the circuit, the more likely the quantum state will succumb to noise and decoherence. Ideally, we want "log-depth" circuits, where the time taken only grows with the logarithm of the number of qubits ($n$).

The challenge is that for a general quantum state, you can only get log-depth if you have an astronomical number of extra qubits to help "spread" the information. While "sparse" states (those with few non-zero coefficients) are easier, we still lacked efficient, log-depth recipes for many non-uniform states used in Quantum Machine Learning (QML) and Hamiltonian simulations.

This paper focuses on HWP states—states where every bitstring in the superposition has exactly $k$ ones (a Hamming weight of $k$). These are vital for QML because they enforce "conservation laws" that make training variational circuits more stable.

Methods

The authors break the problem down into three main stages:

  1. Graph-Structured States ($k=2$): They first look at the case where each basis state has exactly two '1's. This maps perfectly to edges in a graph. They use a technique called Unary Encoding to prepare the coefficients in an ancillary register, then use CNOT gates to "map" those edges onto the actual working qubits.
  2. Ancilla-Free Optimization: For states that follow a tree or grid structure, the authors show you don't need extra qubits at all.
  3. For trees, they exploit the hierarchical parent-child structure to apply CNOTs in a specific order.
  4. For grids, they use a divide-and-conquer approach, recursively cutting the grid into smaller pieces using controlled-RBS (Reconfigurable Beam Splitter) gates.
  5. General HWP States ($k \ge 3$): For higher Hamming weights, the complexity increases. The authors propose a sophisticated algorithm that divides the basis states into parts, uses Hamming Weight Counters (HWC) to verify the state, and employs a "copying stage" to parallelize operations, maintaining log-depth.

Datasets

As this is a theoretical paper focused on quantum circuit complexity and algorithm design, no classical datasets were used for training or empirical evaluation. The "data" consists of the mathematical structures of the graphs (general, tree, and grid) and the parameters $n$ (qubits) and $k$ (Hamming weight).

Key Insights and Ideas

  • Ancillas as Information Dispersers: The paper reinforces the idea that ancillary qubits aren't just "extra space"—they act as a communication layer that allows the circuit to perform many operations in parallel, which is the key to achieving logarithmic depth.
  • Structure Matters: The "aha moment" is that physical or logical symmetry in the state (like being a tree or a grid) can be directly traded for space. If your state has a clear hierarchy, you can ditch the ancillas entirely without losing speed.
  • The $k=2$ Foundation: By proving that graph-structured states are the building blocks for more complex HWP states, the authors provide a modular framework for QSP.
  • Near-Optimality: The authors didn't just find an algorithm; they proved lower bounds using "light cone" arguments, showing that their depth of $O(\log \binom{n}{k})$ is essentially the best anyone can ever do.

Key Results

The paper establishes a new frontier for QSP efficiency, summarized in their complexity results:

State Type Ancillary Qubits Circuit Depth Circuit Size
General Graph ($k=2$) $O(m)$ $O(\log n)$ $\Theta(m)$
Tree / Grid ($k=2$) 0 $O(\log n)$ $O(n)$
General HWP ($k \ge 3$) $O(\binom{n}{k})$ $O(\log \binom{n}{k})$ $O(\binom{n}{k})$

Note: $m$ is the number of edges in the graph; $n$ is the number of qubits.

Limitations and Future Work

  • Ancilla Count for $k \ge 3$: While the depth is optimal, the number of ancillary qubits for general HWP states ($k \ge 3$) is still quite high ($O(\binom{n}{k})$). The authors explicitly flag "Ancilla Qubit Minimization" as a major open question.
  • Beyond HWP: The techniques used here are tailored to Hamming weight conservation. It remains to be seen if similar log-depth, polynomial-ancilla tricks can be found for other types of non-uniform practical states.
  • Hardware Mapping: The paper assumes a "full connectivity" model (any qubit can talk to any other). In real superconducting or trapped-ion hardware, limited connectivity might add overhead that could turn these $O(\log n)$ depths into something slightly larger.

Summary updated

Abstract

Quantum state preparation is a critical task in quantum computing, particularly in fields such as quantum machine learning, Hamiltonian simulation, and quantum algorithm design. The depth of preparation circuit for the most general state has been optimized to approximately optimal, but the log-depth appears only when the number of ancillary qubits reaches exponential. Actually, few log-depth preparation algorithms assisted by polynomial ancillary qubits have been come up with even for a certain kind of non-uniform state. We focus on the Hamming-Weight-preserving states, defined as $|ψ_{\text{H}}\rangle = \sum_{\text{HW}(x)=k} α_x |x\rangle$, which have leveraged their strength in quantum machine learning. Especially when $k=2$, such Hamming-Weight-preserving states correspond to simple undirected graphs and will be called graph-structured states. Firstly, for the $n$-qubit general graph-structured states with $m$ edges, we propose an algorithm to build the preparation circuit of $O(\log n)$-depth with $O(m)$ ancillary qubits. Specifically for the $n$-qubit tree-structured and grid-structured states, the number of ancillary qubits in the corresponding preparation circuits can be optimized to zero. Next we move to the preparation for the HWP states with $k\geq 3$, and it can be solved in $O(\log{n \choose k})$-depth using $O\left({n \choose k}\right)$ ancillary qubits, while the size keeps $O\big( {n \choose k} \big)$. These depth and size complexities, for any $k \geq 2$, exactly coincide with the lower bounds of $Ω(\log{n \choose k})$-depth and $Ω({n \choose k})$-size that we prove lastly, which confirms the near-optimal efficiency of our algorithms.
BibTeX
@misc{li2025preparation,
  author = {Yu Li and Guojing Tian and Xiaoyu He and Xiaoming Sun},
  title = {{Preparation of Hamming-Weight-Preserving Quantum States with Log-Depth Quantum Circuits}},
  year = {2025},
  eprint = {2508.14470},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.14470},
  howpublished = {arXiv},
}
Figure