arXiv:2608.23929quant-phAug 2026

Manuscript Offprint

arXiv:2608.23929

Quantum Algorithms and Hardness for Point-Count Approximation over Finite Fields

Yota Maeda, Hiroshi Yano

Abstract

We study the approximation of the number of solutions of Laurent polynomials over finite fields. For a Laurent polynomial

f(x)=∑j=1sajxuj∈Fq[x1±1,…,xn±1],f(x)=\sum_{j=1}^{s}a_{j}x^{u_{j}}\in\mathbb{F}_{q}[x_{1}^{\pm1},\ldots,x_{n}^{\pm1}],

let UU be its augmented support matrix whose columns are (1,uj)(1, u_j) with rank ρ\rho and N(f):=#{x∈(Fq×)n∣f(x)=0}N(f) := \#\{x \in (\mathbb{F}_q^\times)^n \mid f(x) = 0\} be its torus point count. Our first main result is a quantum algorithm that outputs N^(f)\widehat{N}(f) satisfying

∣N^(f)−N(f)∣≤εqn+s/2−ρ|\widehat{N}(f)-N(f)|\leq\varepsilon q^{n+s/2-\rho}

with success probability 1−δ1 - \delta. Provided that ρ\rho and ∥U∥∞\|U\|_\infty are bounded, the algorithm runs in both classical bit and quantum gate complexity poly(n,s,log⁡q,1/ε,log⁡(1/δ))\text{poly}(n, s, \log q, 1/\varepsilon, \log(1/\delta)). It provides finer resolution than relative-error approximations in general settings. To the best of our knowledge, in the explicit finite-field input model considered here, no previous algorithm achieves this additive accuracy with running time polynomial in log⁡q\log q. Van Dam (arXiv:quant-ph/0405081) conjectured the existence of such an algorithm under the assumption of an oracle reflecting the algebraic properties of the polynomial. In contrast, by exploiting a point-counting formula derived from character sums over finite fields, we develop an alternative approach that efficiently approximates the number of points without assuming the existence of such an oracle. As a second main result, we prove that the same approximation problem becomes #P\#P-hard under randomized polynomial-time Turing reductions when the support matrix UU varies freely as part of the input. Thus, taken together, our results clarify how the effectiveness of the quantum approach depends on the tradeoff between the accuracy scale and the support parameters of the input polynomial.

{yota.maeda, hyano}@mosk.tytlabs.co.jp, * denotes equal contribution

1 Introduction

Let q=prq = p^r be a prime power and let Fq\mathbb{F}_q be the finite field of qq elements. A classical geometric baseline of the number of solutions of a polynomial is the Lang–Weil estimate [36]; if XX is a geometrically integral projective variety of dimension n−1n - 1, then the number of Fq\mathbb{F}_q-points #X(Fq)\#X(\mathbb{F}_q) on XX satisfies

#X(Fq)=qn−1+O(qn−3/2).(1.1)\#X(\mathbb{F}_{q})=q^{n-1}+O(q^{n-3/2}). \tag{1.1}

Based on this observation, algorithmic research has advanced to extract more detailed information. Wan asked for algorithms computing the number of points of smooth projective hypersurfaces with complexity polynomial for log⁡q\log q [56, Problem 4.2]. Except for the case where the number of variables is small, most notably, the case of curves [32, 45], no algorithm is currently known that counts the number of solutions of polynomials over FqF_q with bit complexity of a polynomial in log⁡q\log q. Complexity-theoretic studies have shown that counting the number of solutions to polynomial equations over finite fields is #P\#P-complete [40, 55], suggesting that exact point counting is computationally intractable in general structure-free settings.

Our results. In this paper, we investigate both the potential of quantum algorithms and the hardness of problems in approximate point counting over finite fields. From an algorithmic viewpoint, we present a quantum algorithm that approximates the number of torus points with bit and gate complexity poly( log⁡q\log q) for a bounded family of polynomials. From the complexity-theoretic viewpoint, we show that even this approximation problem is #P\#P-hard under randomized polynomial-time Turing reductions in general for a uniform input.

To this end, we introduce the approximation problem in Problem 1.1, which can be viewed as an intermediate problem between (1.1) and Wan's benchmark problem [56, Problem 4.2]. Let n≥1n \geq 1. A Laurent polynomial on the n-dimensional torus is

f(x)=∑j=1sajxuj∈Fq[x1±1,…,xn±1],aj∈Fq×,uj∈Zn.f(x)=\sum_{j=1}^{s}a_{j}x^{u_{j}}\in\mathbb{F}_{q}[x_{1}^{\pm1},\ldots,x_{n}^{\pm1}],\qquad a_{j}\in\mathbb{F}_{q}^{\times},u_{j}\in\mathbb{Z}^{n}.

Let UU be the augmented support matrix whose columns are (1,uj)(1, u_j), and let ρ=rank(U)\rho = \mathrm{rank}(U). We write

N(f):=#{x∈(Fq×)n∣f(x)=0}.N(f):=\#\{x\in(\mathbb{F}_{q}^{\times})^{n}\mid f(x)=0\}.

As the character expansion formula (Proposition 3.1) shows that the fluctuation term of N(f)N(f), that is the second term of (3.1), is of order qn+s/2−ρq^{n+s/2-\rho}, the following problem arises naturally.

Problem 1.1. Given a finite field Fq\mathbb{F}_q, integers n,s≥1n, s \geq 1, a list (u1,a1),…,(us,as)(u_1, a_1), \ldots, (u_s, a_s) where uj∈Znu_j \in \mathbb{Z}^n and aj∈Fq×a_j \in \mathbb{F}_q^\times, which defines a Laurent polynomial ff, and parameters 0<ε,δ<10 < \varepsilon, \delta < 1, output a number N^(f)∈Q\widehat{N}(f) \in \mathbb{Q} such that

Pr⁡[∣N^(f)−N(f)∣≤εqn+s/2−ρ]≥1−δ.\Pr\Big[\Big|\widehat{N}(f)-N(f)\Big|\leq\varepsilon q^{n+s/2-\rho}\Big]\geq1-\delta.

Our first main result is the following.

Theorem 1.2. Fix constants r0,C0>0r_0, C_0 > 0. On the promise class of inputs satisfying ρ≤r0\rho \leq r_0, ∥U∥∞≤C0\|U\|_\infty \leq C_0, Problem 1.1 can be solved by a quantum algorithm with a classical bit and quantum gate complexity of polyr0,C0(n,s,log⁡q,1/ε,log⁡1/δ)\text{poly}_{r_0, C_0}(n, s, \log q, 1/\varepsilon, \log 1/\delta).

Corollary 1.3. For every fixed augmented support matrix U, Problem 1.1 can be solved by a quantum algorithm with a classical bit and quantum gate complexity of polyU(log⁡q,1/ε,log⁡1/δ)\text{poly}_U(\log q, 1/\varepsilon, \log 1/\delta).

The precise complexity is proved later in Section 3.3. As discussed below, existing point-counting algorithms do not appear to achieve this error scale with poly(log⁡q)\text{poly}(\log q) bit complexity.

We also prove that this approximation problem becomes #P-hard under randomized polynomial-time Turing reductions when the support matrix U is treated as part of the input.

Theorem 1.4. Fix a constant 0<ε<1/40 < \varepsilon < 1/4. Then Problem 1.1 with δ=1/3\delta = 1/3 is #P-hard under randomized polynomial-time Turing reductions.

The proof of Theorem 1.4 is given in Section 4. This highlights a support-parameter tradeoff in the approximation problem: bounded support structure enables efficient quantum approximation, while unrestricted support variation already yields #P-hardness at the same additive accuracy scale. Related work. We study torus point counting for Laurent polynomials. On the one hand, this problem is considered important for studying mirror symmetry in mathematical physics and algebraic geometry [31, 34]. It has been studied primarily using geometric methods such as cohomology; see the item C below. On the other hand, algorithmic research has focused on root counting for ordinary polynomials (items A and B below). This distinction is important because the torus restriction allows us to use multiplicative characters, while ordinary affine root counting has a different algorithmic structure; we discuss the difference between these two problem settings in Section 5.

A. Approximation algorithms over finite fields. In the typical hypersurface regime, the point count N(f)N(f) is of order qn−1q^{n-1}. There are several studies on relative approximation [20, 29, 30] with polynomial-time dependence on q. Over prime fields, some works [24, 25, 57] provide a relative approximation that runs in poly(log⁡p,1/ε)\text{poly}(\log p, 1/\varepsilon).

B. Algorithms for polynomial systems over finite fields. A related line of work studies ordinary polynomial systems over finite fields with the number of variables as the main asymptotic parameter. For bounded-degree systems, faster-than-exhaustive algorithms are known for solving and exact counting, together with reductions and fine-grained lower bounds for low-degree root counting [13, 39, 57]. Over F2F_2, further improvements use parity-counting based self-reductions [6, 14]. These aim to improve over the qnq^n exhaustive-search baseline and generally retain a power dependence on q.

C. Geometric methods. The Lang–Weil estimate and its effective refinements imply an estimation as (1.1) [7, 17, 36, 47]. Point counting for Laurent polynomials and toric hypersurfaces has also been studied through p-adic cohomology [2, 3, 12, 22, 37, 48]. In computational directions, these compute the full zeta function, which is stronger than a single point count, and require polynomial complexity in q. For curves and abelian varieties, exact point counts can be computed with polynomial dependence on log⁡q\log q [32, 42, 44, 45].

D. Quantum algorithms. Quantum algorithms for Gauss-sum estimation provide the main primitive used in our algorithm; for a multiplicative character over Fq\mathbb{F}_q, the phase of the normalized Gauss sum can be estimated with poly(log⁡q)\text{poly}(\log q) gates [53]. Under the assumption of the existence of an efficiently implementable unitary access, trace estimation yields an additive approximation to the point count, and this program can be carried out explicitly for Fermat-type hypersurfaces [52]. However, the construction of such a spectral unitary is not known in general. For curves, there are quantum algorithms that compute the full zeta function, and hence the exact point count, with poly(log⁡q)\text{poly}(\log q) gates [33].

E. Computational hardness. Exact counting over finite fields remains computationally intractable, at least to the extent of #P-completeness, even when the input is restricted to sparse polynomials [9, 40, 55]. These results show that sparsity alone is not a tractability assumption once the monomial support is part of the input. However, the #P-completeness of exact counting does not by itself imply hardness of approximation. Indeed, for several standard counting problems, such as counting satisfying assignments of DNF formulas [28] and computing the permanent of a matrix [26, 51], the exact version is #P-complete whereas randomized approximation is known to be tractable. This distinction is particularly important over finite fields. Although counting the zeros of polynomial systems can be #P-complete even for low-degree instances, relative-error approximation algorithms are known in several restricted regimes such as fixed or small finite fields [20, 25, 30]. Therefore, establishing approximation hardness requires an argument that explicitly exploits the prescribed approximation guarantee, rather than relying solely on the #P-hardness of a related exact counting problem.

Approximate counting has been extensively studied in computational complexity theory. One standard framework is that of approximation-preserving reductions, which compare approximation problems while preserving the existence of an FPRAS [15, 16]. Another line of work establishes hardness by treating the approximation algorithm as an oracle and proving that such an oracle suffices to recover exact counting or other discrete #P-hard information [18, 19, 35]. In these results, the assumed approximation oracle is shown to be powerful enough to compute #P-hard information.

Techniques. The starting point of this paper is to avoid treating point counting as enumeration over the torus. A naive approximation strategy would estimate N(f)N(f), whose typical order is qn−1q^{n-1}, by relative error. While most previous studies achieve approximations of this accuracy, to obtain a more accurate approximation, we derive a character-based formula (Proposition 3.1) to clarify the contribution of fluctuation terms. Using the character orthogonality for finite abelian groups, we express this fluctuation as a finite Gauss-sum expansion. The natural size of this fluctuation is qn+s/2−ρq^{n+s/2-\rho}. In this expansion, the contributing multiplicative characters must satisfy the relations AU(q)\mathcal{A}_U(q) imposed by the augmented support matrix UU.

In general, however, the number of character tuples satisfying these relations #AU(q)\# \mathcal{A}_U(q) can still grow exponentially in log⁡q\log q. Therefore, even if one could evaluate each summand efficiently, summing all terms would not give a poly( log⁡q\log q)-complexity algorithm. We overcome this difficulty by giving an explicit parametrization based on the theory of Smith normal forms, which enables us to sample characters uniformly. This yields the normalized formula N(f)=(q−1)n/q+qs/2−1(q−1)n+1−ρBU(q)ΞfN(f) = (q - 1)^n / q + q^{s/2 - 1}(q - 1)^{n + 1 - \rho} B_U(q) \Xi_f, where Ξf\Xi_f is a normalized average over KU(q)K_U(q) of bounded summands T(k)T(k) satisfying ∣T(k)∣≤1|T(k)| \leq 1. Here KU(q)K_U(q) is the congruence kernel parametrizing the admissible character tuples, BU(q)B_U(q) is the Smith-normal-form factor controlling the size of this kernel, and T(k)T(k) is the normalized Gauss-sum product associated with kk. The formal definitions are given in Section 3.1. Thus the original point-counting problem over a huge torus is converted into the estimation of the mean of a bounded random variable.

To evaluate the normalized average Ξf\Xi_f with poly( log⁡q\log q) complexity, we leverage quantum algorithms for estimating Gauss sums and multiplicative characters [52, 53]. For each sample k∈KU(q)k \in K_U(q), the corresponding summand is composed of a product of Gauss sums and the multiplicative characters evaluated at the polynomial coefficients aja_j. Following the quantum framework of van Dam [52, 53], these phases can be estimated to polynomial precision using poly( log⁡q\log q) quantum gates via the quantum Fourier transform. Crucially, this polynomial-precision estimation task is believed to be classically intractable, as the discrete logarithm problem reduces to it. We implement this kk-dependent quantum primitive within a Hadamard test to manifest each T(k)T(k) as a measurable random variable. Finally, the algorithm classically draws uniform samples of kk from KU(q)K_U(q) using our parametrization via Smith normal forms, applies a Monte Carlo averaging over the outcomes, and the affine conversion above gives the desired additive approximation to N(f)N(f).

A further technical contribution is the explicit accounting of all error sources in our algorithm. To achieve this, we systematically decouple the algorithmic inaccuracies into two distinct categories: approximation errors and failure probabilities. The approximation error stems from the approximate implementation of the quantum Fourier transforms over Z/NZ for arbitrary N and the statistical estimation error of Monte Carlo sampling. Conversely, the overall failure probability is distributed across three independent probabilistic subroutines: finding a generator in Fq×\mathbb{F}_q^\times, preparing the multiplicative character (chi) states, and the Monte Carlo sampling over KU(q)K_U(q). By rigorously allocating the precision parameters and failure probabilities across these components, we ensure the combined estimator meets the desired global guarantee.

Finally, the same transformation explains the complexity boundary proved in this paper. When U is allowed to vary as part of the input, the same additive accuracy is fine enough to recover an embedded #P-hard exact count by rounding (Theorem 4.2). In the proof, the order qn/2q^{n/2} is critical; worse approximation like qnq^{n} does not give a similar proof. Although exact counting and decision problems over finite fields have been extensively studied, to the best of our knowledge there has been no previous result showing that approximating point counting over finite fields is itself #P-hard under some reductions.

References (38)