Table of Contents
Fetching ...

Counting with the quantum alternating operator ansatz

Julien Drapeau, Shreya Banerjee, Stefanos Kourtis

TL;DR

This paper introduces VQCount, a variational quantum counting framework that harnesses the JVV equivalence between approximate counting and random sampling by using GM-QAOA as a uniform solution sampler. It provides a formal integration of the GM-QAOA sampling state with the JVV self-reduction to obtain multiplicative-approximate counts for #P problems, achieving exponential reductions in required samples over naive approaches for large solution spaces. Through tensor-network simulations on positive #NAE3SAT and #1-in-3SAT, the authors reveal a tradeoff between sampling success and uniformity, showing that increasing circuit depth improves counting performance, albeit with practical limits due to nonuniformity and hardware constraints. While still behind state-of-the-art classical solvers in exact counting efficiency, VQCount demonstrates a viable near-term quantum heuristic for approximate counting and outlines clear avenues for improvement via deeper circuits and enhanced post-processing. The work highlights both the potential and current limitations of variational quantum approaches for tackling #P-hard counting problems.

Abstract

We introduce a variational algorithm based on the quantum alternating operator ansatz (QAOA) for the approximate solution of computationally hard counting problems. Our algorithm, dubbed VQCount, is based on the equivalence between random sampling and approximate counting and employs QAOA as a solution sampler. We first prove that VQCount improves upon previous work by reducing exponentially the number of samples needed to obtain an approximation within a multiplicative factor of the exact count. Using tensor network simulations, we then study the typical performance of VQCount with shallow circuits on synthetic instances of two #P-hard problems, positive #NAE3SAT and positive #1-in-3SAT. We employ the original quantum approximate optimization algorithm version of QAOA, as well as the Grover-mixer variant which guarantees a uniform solution probability distribution. We observe a tradeoff between QAOA success probability and sampling uniformity, which we exploit to achieve an exponential gain in efficiency over naive rejection sampling. Our results highlight the potential and limitations of variational algorithms for approximate counting.

Counting with the quantum alternating operator ansatz

TL;DR

This paper introduces VQCount, a variational quantum counting framework that harnesses the JVV equivalence between approximate counting and random sampling by using GM-QAOA as a uniform solution sampler. It provides a formal integration of the GM-QAOA sampling state with the JVV self-reduction to obtain multiplicative-approximate counts for #P problems, achieving exponential reductions in required samples over naive approaches for large solution spaces. Through tensor-network simulations on positive #NAE3SAT and #1-in-3SAT, the authors reveal a tradeoff between sampling success and uniformity, showing that increasing circuit depth improves counting performance, albeit with practical limits due to nonuniformity and hardware constraints. While still behind state-of-the-art classical solvers in exact counting efficiency, VQCount demonstrates a viable near-term quantum heuristic for approximate counting and outlines clear avenues for improvement via deeper circuits and enhanced post-processing. The work highlights both the potential and current limitations of variational quantum approaches for tackling #P-hard counting problems.

Abstract

We introduce a variational algorithm based on the quantum alternating operator ansatz (QAOA) for the approximate solution of computationally hard counting problems. Our algorithm, dubbed VQCount, is based on the equivalence between random sampling and approximate counting and employs QAOA as a solution sampler. We first prove that VQCount improves upon previous work by reducing exponentially the number of samples needed to obtain an approximation within a multiplicative factor of the exact count. Using tensor network simulations, we then study the typical performance of VQCount with shallow circuits on synthetic instances of two #P-hard problems, positive #NAE3SAT and positive #1-in-3SAT. We employ the original quantum approximate optimization algorithm version of QAOA, as well as the Grover-mixer variant which guarantees a uniform solution probability distribution. We observe a tradeoff between QAOA success probability and sampling uniformity, which we exploit to achieve an exponential gain in efficiency over naive rejection sampling. Our results highlight the potential and limitations of variational algorithms for approximate counting.

Paper Structure

This paper contains 10 sections, 1 theorem, 14 equations, 11 figures, 1 algorithm.

Key Result

Theorem 1

(Adapted from Theorem 6.4 in jerrumRandomGenerationCombinatorial1986) If a self-reducible #P problem on $n$ Boolean variables admits a solution generator with nonuniformity $\eta$, then the solution count can be approximated to within a multiplicative factor $O(\eta n)$ with high probability with on

Figures (11)

  • Figure 1: An example of the self-reducibility tree in the JVV algorithm for a CNF formula $\varphi(x_1, x_2)$. Vertices represent literal assignments in $\varphi$, with solutions depicted as blue squares and non-solutions as red rhombuses. Directed edges indicate the assignment of a literal along with its associated probability. Following the path of maximal probabilities, shown with a solid line, the count is obtained as $N = \frac{1}{P_{0}} \cdot \frac{1}{P_{01}}$ = 3.
  • Figure 2: QAOA solution sampler before (a) and after (b) fixing the first qubit to $c$ during the self-reduction procedure. The Hadamard gate $H$ acting on the fixed qubit is replaced by the Pauli-$X$ gate, conditioned classically on $c$. For each layer, the problem operator $U_{P}(\gamma)$ remains unchanged, while the gates of drive operator $U_{D}(\beta)$ acting on the fixed qubit are removed.
  • Figure 3: Example of the mapping to the Ising model for NAE3SAT / 1-in-3SAT formulae. Left panel: factor graph of the formula with variable (blue) and clause (grey) vertices. Right: Ising model corresponding to the formula represented in the left panel. For 1-in-3SAT, a magnetic field term is added to favor configurations in which each clause contains exactly one variable set to 1.
  • Figure 4: VQCount performance with depth $p=3$ QAOA (blue circles) and GM-QAOA (red squares) circuits for NAE3SAT instances at $\alpha=1$ (left panels) and $\alpha=2$ (right panels). Solid and dotted lines represent the mean and median, respectively. Shaded regions show the standard error of the mean. (a,b) Maximal nonuniformity throughout the self-reduction. The JVV algorithm requires the nonuniformity to be at most $O(n^{-1})$ for $n$ variables, as illustrated (dotted-dashed black lines) with the function $f(n) = O(1/n)$. (c,d) Minimal success rate throughout the self-reduction. (e,f) Numbers of samples needed to achieve an approximate count with error tolerance $\varepsilon = 1/3$. An exponential fit extrapolated from the last five points of the median gives $O(1.45^n)$ (QAOA) and $O(1.44^n)$ (GM-QAOA) for (e), and $O(1.34^n)$ (QAOA) and $O(1.88^n)$ (GM-QAOA) for (f).
  • Figure 5: Number of post-selected samples needed to achieve an approximate count with error tolerance $\varepsilon=1/3$ with depth $p=3$ QAOA (blue circles) and GM-QAOA (red squares) circuits for NAE3SAT instances at $\alpha=1$. Solid and dotted lines represent the mean and median, respectively. Shaded regions show the standard error of the mean. A polynomial fit of the median gives $O(n^{5.12})$ (QAOA) and $O(n^{3.42})$ (GM-QAOA). The inset panel shows the scaling behavior with the inverse of the error tolerance $\varepsilon$ for $n=12$ variables. An polynomial fit of the mean gives $O(\varepsilon^{-1.13})$ (QAOA) and $O(\varepsilon^{-1.07})$ (GM-QAOA).
  • ...and 6 more figures

Theorems & Definitions (1)

  • Theorem 1