NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Rethinking Parity Check Enhanced Symmetry-Preserving Ansatz

Ge Yan, Mengfei Ran, Ruocheng Wang, Kaisen Pan, Junchi Yan

Overview

This paper introduces a novel framework for Variational Quantum Algorithms (VQAs) that seamlessly enforces "hard constraints" and mitigates errors. By combining a Hamming Weight Preserving (HWP) ansatz with mid-circuit parity checks and mapping problem constraints directly to the physical topology of quantum processors, the authors achieve state-of-the-art results on both quantum chemistry simulations and NP-hard combinatorial optimization problems like the Quadratic Assignment Problem (QAP).

The Challenge of Constraints in NISQ Devices

In the current Noisy Intermediate-Scale Quantum (NISQ) era, VQAs like the Quantum Approximate Optimization Algorithm (QAOA) are the standard approach for solving complex optimization and chemistry problems. However, real-world problems often come with strict rules—such as "a molecule must conserve its total number of electrons" or "a delivery truck can only visit a location exactly once."

Traditionally, quantum algorithms handle these rules using soft constraints: they add a penalty term to the objective function if a rule is broken. This is highly inefficient because it forces the quantum computer to search through a massive, mostly invalid solution space (size $2^n$), hoping the penalty guides it to a valid answer. Enforcing hard constraints—restricting the quantum circuit so it only explores valid solutions—is notoriously difficult. Furthermore, NISQ devices are noisy, meaning unexpected bit-flips can easily knock a quantum state out of a valid configuration.

A Novel Framework: HWP + Parity Checks

The authors tackle these challenges by combining two powerful concepts:

  1. Hamming Weight Preserving (HWP) Ansatz: They utilize parameterized quantum gates that inherently preserve the "Hamming weight" (the number of 1s in a quantum state). To improve upon existing methods, they propose a new, highly expressive two-qubit HWP gate called the NBS gate, which is universal for the HWP subspace and requires no truncation.
  2. Topological-Aware Parity Checks: To handle more complex constraints and mitigate noise, they insert parity checks directly into the circuit.
Quantum circuit combining an HWP layer with mid-circuit parity checks.
  • For Error Mitigation (Chemistry): Instead of just checking if the final state has the right number of electrons (a standard technique called Symmetry Verification), they use continuous parity checks throughout the circuit to catch and correct bit-flip errors as they happen.
  • For Hard Constraints (Optimization): To solve the Quadratic Assignment Problem (QAP), they map the problem's permutation matrix directly to a 2D grid of physical qubits. They apply HWP layers to the rows (ensuring exactly one 1 per row) and use parity checks as projective measurements on the columns (ensuring exactly one 1 per column). This collapses the quantum state strictly into the valid problem subspace without destroying the ongoing computation.
Mapping the Quadratic Assignment Problem to a 2D qubit grid with HWP layers and parity checks.

Experimental Setup

  • Quantum Chemistry: Standard molecular ground-state energy estimation for Hydrogen ($H_2$), Lithium Hydride ($LiH$), and Water ($H_2O$) using the STO-3G basis set.
  • Combinatorial Optimization: Randomly generated instances of the Quadratic Assignment Problem (QAP) and the Traveling Salesman Problem (TSP) for grid sizes $m \in \{3, 4, 5, 6\}$.

Key Insights

  • Hard constraints drastically shrink the search space: By using HWP and parity checks for QAP, the algorithm reduces the search space from $2^n$ (all possible bit strings) to exactly $m!$ (only valid permutations). This makes finding the optimal solution vastly more probable.
  • Mid-circuit checks beat post-selection: Traditional Symmetry Verification is practically useless for deep, noisy circuits because the final state becomes too corrupted. Interleaving parity checks during the computation is a much more robust way to protect the HWP subspace from hardware noise.
  • Hardware-aware design is crucial: The authors specifically designed their QAP mapping to match the 2D nearest-neighbor grid topology of modern superconducting quantum processors. This eliminates the need for noisy, expensive SWAP gates during compilation.

Experimental Results

  • Quantum Chemistry: On noiseless simulators, the proposed NBS gate achieved chemical accuracy (error $< 10^{-10}$ Hartree) without the truncation required by standard Unitary Coupled Cluster (UCC) methods. It also required significantly shallower circuits (e.g., 84 gates vs. 107 for UCCSD on $H_2$).
  • QAP on Simulators: For $m=4$ (16 qubits), the hard-constraint method (NBS-HARD) found the optimal solution with a 94.48% probability. In stark contrast, soft-constraint baselines like QAOA and Hardware Efficient Ansatz (HEA) completely failed, yielding a 0.00% probability of finding the optimal valid state.
  • QAP on Real Hardware: When tested on a 12-qubit superconducting quantum processor ($m=3$), the hard-constraint approach consistently outperformed soft-constraint methods in both the approximation ratio and the probability of measuring a valid solution, proving its resilience to actual quantum noise.

Limitations and Future Directions

Like all NISQ-era algorithms, the approach is bottlenecked by hardware noise and limited coherence times, restricting physical experiments to very small problem sizes (e.g., 12 qubits). Additionally, the probability of the parity check successfully projecting the state into a feasible solution decreases exponentially as the problem size $m$ grows.

In the future, the authors plan to extend their hard-constraint framework to handle inequality constraints, which would open the door to solving an even broader class of complex combinatorial optimization problems.

Summary updated

BibTeX
@inproceedings{yan2024rethinking,
  author = {Ge Yan and Mengfei Ran and Ruocheng Wang and Kaisen Pan and Junchi Yan},
  title = {{Rethinking Parity Check Enhanced Symmetry-Preserving Ansatz}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=aIuByRyHhV},
}
Figure