betaFeedback

WorksPhysics and Astronomy

Subexponential-Time Classical Sampling of Quantum Circuits from Not ETH

Abstract

The recent subexponential-time algorithm for counting satisfying assignments of a 33-CNF formula, together with the Boolean tensor-contraction theorem underlying its sharper bound, gives classical sampling algorithms for two families of quantum circuits. The first consists of nn-qubit circuits with O(n)O(n) gates from any fixed finiteandr set of bounded-arity algebraic gates. The second consists of circuits over {H,Z,CZ,CCZ}\{H,Z, CZ, CCZ\} with O(n)O(n) Hadamard gates and d≤n 2o(log⁡n)d\leq n\,2^{o(\sqrt{\log n})} diagonal gates. More precisely, for d≤Cn11/10d\leq Cn^{11/10} with fixed CC, we obtain exact worst-case sampling in time nO(1)2O(nlog⁡(2+d/n)/log⁡n)n^{O(1)}2^{O(n\log(2+d/n)/\sqrt{\log n})} and polynomial space. We explain the reductions using Feynman sums over paths. Montanaro's construction gives a cubic polynomial with O(n)O(n) variables and O(n+d)O(n+d) monomials; an explicit density bound for polynomial-system counting yields the stated time. In both cases, each prefix probability is computed as a single circuit amplitude, and the chain rule gives a sample. The second sampler uses exactly as many fair bits as the circuit has Hadamards.

Note. Writeup by ChatGPT Astra, based on ideas and feedback from the authors.

Statements and conventions

Let UU be a circuit on nn qubits, initialized in ∣0n⟩\lvert0^n\rangle and measured in the computational basis. Its output distribution is

pU(z)=∣⟨z∣U∣0n⟩∣2,z∈{0,1}n.p_U(z)=\left|\langle z|U|0^n\rangle\right|^2,\qquad z\in\{0,1\}^n.

We take the recent counting results of [1] as input and derive the following two consequences. Throughout, logarithms are base two, polylog nn means a fixed power of log⁡n\log n, and subexponential time means 2o(n)2^{o(n)} in the number of qubits. All running times count bit operations. Finitely many small input sizes can be handled by exhaustive computation.

Theorem 1 (Linear-size circuits). Fix a finite set G\mathcal{G} of quantum gates, each acting on at most a constant number of qubits and having algebraic matrix entries. For every fixed A>0A>0, the output of any nn-qubit circuit over G\mathcal{G} with at most AnAn gates can be sampled exactly by a classical randomized algorithm in expected time

nO(1)2O(n/log⁡n)=2o(n).(1)n^{O(1)}2^{O(n/\sqrt{\log n})}=2^{o(n)}. \tag*{(1)}

For any 0<ε<10 < \varepsilon< 1, a sample within total variation distance ε\varepsilon can instead be produced in worst-case time

2O(n/log⁡n)poly⁡(n,log⁡(1/ε)).2^{O(n/\sqrt{\log n})}\operatorname{poly}(n,\log(1/\varepsilon)).

The constants depend only on G\mathcal{G} and AA.

The gate-set assumption gives a precise model for exact arithmetic. It includes, for example, the usual gate set {H,T,CNOT⁡}\{H,T,\operatorname{CNOT}\}. The distinction between expected and worst-case time concerns the generation of exact random choices when probabilities are irrational; the probability computations themselves have deterministic time bounds.

Theorem 2 (A linear number of Hadamards and more diagonal gates). Assume Theorem D.1 and Lemmas 5.1–5.2 of [1]. Fix constants A,C>0A,C>0. Let UU be an nn-qubit circuit over {H,Z,CZ⁡,CCZ⁡}\{H,Z,\operatorname{CZ},\operatorname{CCZ}\} with h≤Anh\le An Hadamard gates and d≤Cn11/10d\le Cn^{11/10} diagonal gates. Its output can be sampled exactly by a classical randomized algorithm in worst-case time

nOA,C(1)2OA,C(nlog⁡(2+d/n)/log⁡n)(2)n^{O_{A,C}(1)}2^{O_{A,C}(n\log(2+d/n)/\sqrt{\log n})} \tag*{(2)}

and polynomial space. Its random choices use exactly hh fair bits. The gate description is an explicit list of gate types and wire indices.

The bound is subexponential whenever log⁡(2+d/n)=o(log⁡n)\log(2+d/n)=o(\sqrt{\log n}), equivalently d≤n2o(log⁡n)d\le n2^{o(\sqrt{\log n})}. For d=O(npolylog⁡n)d=O(n\operatorname{polylog}n) it recovers the exponent O(nlog⁡log⁡n/log⁡n)O(n\log\log n/\sqrt{\log n}). It also permits, for example, d=n2(log⁡n)1/3d=n2^{(\log n)^{1/3}}, giving exponent O(n/(log⁡n)1/6)O(n/(\log n)^{1/6}). At the technical endpoint d=Cn11/10d=Cn^{11/10}, (2) gives exponent O(nlog⁡n)O(n\sqrt{\log n}) and does not certify subexponential time.

The proof has three steps: compute a prefix probability as one amplitude, express that amplitude by exact counts, and choose the output bits using conditional probabilities. For the second theorem we retain the monomial density explicitly in the polynomial-system construction of [1], following the strengthened argument in [2]. This requires the full contraction theorem. The fixed polylogarithmic-density counting statement alone does not cover an input-dependent exponent of log⁡n\log n.

The counting results

We use two counting statements. The first is the fixed-density case of [1 Theorem 1.1]. The second extends the incidence construction of [1 Lemma D.2] to an explicit monomial-density parameter. We give its proof in Appendix § 7, using [1 Theorem D.1 and Lemmas 5.1–5.2]. All constants in the hypotheses are fixed independently of the input size; the parameter BB in part (ii) may depend on the input.

Theorem 3 (Counting results).

(i) For each fixed D>0D>0, the number of satisfying assignments of a 3-CNF formula with NN variables and at most DNDN clauses can be computed deterministically in

NO(1)2O(N/log⁡N)N^{O(1)}2^{O(N/\sqrt{\log N})}

time and polynomial space.

(ii) Fix an integer k≥1k\ge1 and constants c,C>0c,C>0. Suppose that P1,…,PaP_1,\ldots,P_a are polynomials over F2\mathbb{F}_2 in N≥20N\ge20 declared Boolean variables, where a≤cNa\le cN. Each PiP_i has degree at most kk and is

specified by at most BB monomials, with 1≤B≤CN1/101 \le B \le CN^{1/10}. Assuming [1 Theorem D.1 and Lemmas 5.1–5.2], their common zeros can be counted deterministically in

NOk,c,C(1)2Ok,c,C(Nlog⁡(B+2)/log⁡N)N^{O_{k,c,C}(1)}2^{O_{k,c,C}(N\log(B+2)/\sqrt{\log N})}

time and polynomial space.

Bounded values of NN can be handled by enumeration. When B=O((log⁡N)c)B = O((\log N)^c) for a fixed cc, part (ii) has exponent O(Nlog⁡N/log⁡N)O(N\log N/\sqrt{\log N}), as in the original sparse-polynomial statement. Its explicit dependence on BB is what permits more diagonal gates in Theorem 2.

From prefix probabilities to samples

For a string a∈{0,1}ℓa \in\{0,1\}^{\ell}, define its prefix probability by

pU(a)=∑b∈{0,1}n−ℓpU(ab).(3)p_U(a) = \sum_{b\in\{0,1\}^{n-\ell}} p_U(ab). \tag*{(3)}

In particular, pU(∅)=1p_U(\varnothing) = 1 and pU(a)=pU(a0)+pU(a1)p_U(a) = p_U(a0) + p_U(a1). Starting from the empty prefix, choose the next bit to be 0 with probability

q(a)=pU(a0)pU(a),(4)q(a) = \frac{p_U(a0)}{p_U(a)}, \tag*{(4)}

and choose 1 otherwise. Every prefix reached with positive probability has a positive denominator. For any output zz of positive probability, the chance that this procedure produces zz is

∏j=1npU(z1⋯zj)pU(z1⋯zj−1)=pU(z).\prod_{j=1}^{n}\frac{p_U(z_1\cdots z_j)}{p_U(z_1\cdots z_{j-1})}=p_U(z).

Zero-probability outputs are never chosen. Since the current value pU(a)p_U(a) can be retained and pU(a1)p_U(a1) obtained by subtraction, only one new prefix-probability computation is needed per output bit.

A prefix probability is one amplitude

The sum in (3) can be represented without enumerating its 2n−ℓ2^{n-\ell} terms. Add ℓ\ell ancilla qubits initialized to zero, and let CℓC_\ell copy the first ℓ\ell computational-basis bits into these ancillas:

Cℓ∣z⟩∣0ℓ⟩=∣z⟩∣z1⋯zℓ⟩.C_\ell|z\rangle|0^\ell\rangle= |z\rangle|z_1\cdots z_\ell\rangle.

This unitary is a product of ℓ\ell CNOT gates. For a∈{0,1}ℓa \in\{0,1\}^{\ell}, let Xa=⨂j=1ℓXajX^a = \bigotimes_{j=1}^{\ell}X^{a_j} and set

Va=(I⊗Xa)(U†⊗I)Cℓ(U⊗I).(5)V_a = (I \otimes X^a)(U^\dagger\otimes I)C_\ell(U \otimes I). \tag*{(5)}

Lemma 4. The circuit VaV_a acts on n+ℓn+\ell qubits and satisfies

⟨0n+ℓ∣Va∣0n+ℓ⟩=pU(a).(6)\langle0^{n+\ell}|V_a|0^{n+\ell}\rangle= p_U(a). \tag*{(6)}

If UU has ss gates, then VaV_a has at most 2s+2ℓ2s+2\ell gates, using the original gates, their adjoints, CNOT, and XX.

Proof. Write αz=⟨z∣U∣0n⟩\alpha_z=\langle z|U|0^n\rangle. Immediately after CℓC_\ell, the state is

∑zαz∣z⟩∣z1⋯zℓ⟩.\sum_z \alpha_z|z\rangle|z_1\cdots z_\ell\rangle.

The final ancilla bra selects exactly the strings with prefix aa, while ⟨0n∣U†∣z⟩=αz‾\langle0^n|U^\dagger|z\rangle=\overline{\alpha_z}. The amplitude in (6) is therefore ∑z:z1:ℓ=a∣αz∣2=pU(a)\sum_{z:z_{1:\ell}=a}|\alpha_z|^2=p_U(a). The gate count follows directly from (5). □\square

Thus sampling reduces to nn amplitude computations for circuits whose size increases only by a constant factor and an additive O(n)O(n) term. Equation (6) is an equality with the probability itself; its right-hand side is already the squared-amplitude sum required by the Born rule.

Linear-size circuits: paths and 3-CNF formulas

Let W=Gs⋯G1W=G_s\cdots G_1 be a circuit on rr qubits. Inserting computational-basis states between successive gates gives its Feynman sum over paths. A path specifies the basis bits on the wires as the circuit is traversed; its weight is the product of the corresponding gate entries. For fixed input xx and output yy,

⟨y∣W∣x⟩=∑π:x→y∏j=1sgj(π),(7)\langle y|W|x\rangle=\sum_{\pi:x\to y}\prod_{j=1}^{s}g_j(\pi), \tag*{(7)}

where gj(π)g_j(\pi) is the local matrix entry of gate GjG_j along the path.

The number of Boolean variables needed to describe a path is O(r+s)O(r+s). To see this, keep the current bit label on every wire and introduce new labels only for the output wires of the next gate. A gate of bounded arity introduces only constantly many labels. Bits on the other wires retain their labels. Input and output conditions fix the labels at the boundary.

Grouping paths with the same weight

For a fixed finite gate set, there are only constantly many distinct nonzero gate entries. List them as β1,…,βR\beta_1,\ldots,\beta_R, where RR is a constant. Discard paths containing a zero entry. If a path uses βj\beta_j exactly mjm_j times, its weight is ∏jβjmj\prod_j\beta_j^{m_j}. Hence

⟨y∣W∣x⟩=∑m∈Z≥0Rm1+⋯+mR=sNm∏j=1Rβjmj,(8)\langle y|W|x\rangle=\sum_{\substack{\mathbf{m}\in\mathbb{Z}_{\ge0}^{R}\\m_1+\cdots+m_R=s}}N_{\mathbf{m}}\prod_{j=1}^{R}\beta_j^{m_j}, \tag*{(8)}

where NmN_{\mathbf{m}} is the number of paths with the indicated multiplicities and boundary conditions. There are at most (s+1)R(s+1)^R vectors to consider.

For each m\mathbf{m}, these conditions can be checked by a Boolean circuit of size O(r+s)O(r+s). Each gate’s local transition and entry type are determined by constantly many path bits. To count how often a given type occurs, add its ss indicator bits using a balanced binary tree of adders. At level jj there are O(s/2j)O(s/2^j) additions of O(j)O(j)-bit numbers, so the total number of Boolean gates is

O(∑j≥1sj2j)=O(s).O\left(\sum_{j\ge1}\frac{sj}{2^j}\right)=O(s).

Comparison with the required multiplicities and checking the boundary conditions also fit within O(r+s)O(r+s) gates.

Preserving the count in the conversion to 3-CNF

Introduce one auxiliary variable for each gate of this Boolean checking circuit, and impose clauses expressing its exact value. For example, w=u∧vw=u\land v is expressed by

(¬w∨u)∧(¬w∨v)∧(w∨¬u∨¬v).(\lnot w\lor u)\land(\lnot w\lor v)\land(w\lor\lnot u\lor\lnot v).

The constraints for OR and NOT are equally small. Finally, require the checking circuit’s output to equal 1.

For every assignment to the path bits, the auxiliary gate values are uniquely determined. Consequently, the number of satisfying assignments of the resulting 3-CNF formula is exactly NmN_m. The formula has O(r+s)O(r+s) variables and clauses, with a constant clause-to-variable ratio. Theorem 3(i) therefore computes each count in

poly⁡(r+s)2O((r+s)/log⁡(r+s))\operatorname{poly}(r+s)2^{O((r+s)/\sqrt{\log(r+s)})}

time. The polynomial number of multiplicity vectors does not change the exponential factor.

All the βj\beta_j lie in a fixed number field. Products of at most ss such entries, and their sums with the integer coefficients Nm≤2O(r+s)N_m\leq2^{O(r+s)}, have exact representations using polynomially many bits. Thus the arithmetic in (8) adds only polynomial time. We have proved the following amplitude bound.

Proposition 5. For a fixed finite set of bounded-arity algebraic gates, an amplitude of an rr-qubit, ss-gate circuit can be computed exactly in

poly⁡(r+s)2O((r+s)/log⁡(r+s))\operatorname{poly}(r+s)2^{O((r+s)/\sqrt{\log(r+s)})}

deterministic time and polynomial space.

For a circuit in Theorem 1, every VaV_a from Lemma 4 has r+s=O(n)r+s=O(n). Enlarging the fixed gate set by adjoints, CNOT, and X preserves the hypotheses of Proposition 5. Every prefix probability is therefore available within (1). The chain rule and the random-choice implementation in § 6 prove Theorem 1.

Few Hadamards: cubic polynomials over F2\mathbb{F}_2

For the gate set {H,Z,CZ,CCZ}\{H,Z,CZ,CCZ\}, the path sum has a simpler form. Diagonal gates preserve the basis labels and contribute signs. Only Hadamards introduce new path variables. This is the reason that the number of Hadamards controls the number of variables even when there are many diagonal gates.

Montanaro’s construction

Use the following form of Montanaro’s circuit-polynomial correspondence [Mon17, Proposition 1]. Suppose an rr-qubit circuit CC starts and ends with H⊗rH^{\otimes r}, and its interior has tt Hadamards and dd diagonal gates. Give a variable to each wire segment between interior Hadamards. There are N=r+tN=r+t variables. Add a term to fCf_C for each interior gate:

H:uv,Z:u,CZ:uv,CCZ:uvw,H:uv,\qquad Z:u,\qquad CZ:uv,\qquad CCZ:uvw,

using the variables on its incident segments. Addition is over F2\mathbb{F}_2. The polynomial has degree at most three and at most t+dt+d monomials. Since

⟨v∣H∣u⟩=2−1/2(−1)uv,(9)\langle v|H|u\rangle=2^{-1/2}(-1)^{uv}, \tag*{(9)}

the path expansion gives

⟨0r∣C∣0r⟩=2−r−t/2gap⁡(fC),gap⁡(f)=∑x∈{0,1}N(−1)f(x).(10)\langle0^r|C|0^r\rangle= 2^{-r-t/2}\operatorname{gap}(f_C), \qquad\operatorname{gap}(f) = \sum_{x\in\{0,1\}^N}(-1)^{f(x)}. \tag*{(10)}

Writing Z(f)=∣{x:f(x)=0}∣Z(f)=|\{x:f(x)=0\}|, we have

gap⁡(f)=2Z(f)−2N.(11)\operatorname{gap}(f)=2Z(f)-2^N. \tag*{(11)}

An arbitrary rr-qubit circuit WW can be put in the required form as H⊗r(H⊗rWH⊗r)H⊗rH^{\otimes r}(H^{\otimes r}WH^{\otimes r})H^{\otimes r}, adding 4r4r Hadamards without changing WW.

For example, H⊗3CCZ⁡H⊗3H^{\otimes3}\operatorname{CCZ}H^{\otimes3} gives f(x)=x1x2x3f(x)=x_1x_2x_3. It has seven zeros and one one, so its all-zero amplitude is (7−1)/8=3/4(7-1)/8=3/4 and its all-zero output probability is 9/169/16.

Counting a cubic polynomial with many monomials

The polynomial in (10) may have many more monomials than variables. We distribute its monomials among linearly many equations, using only O(N)O(N) additional variables. This makes the density in Theorem 3(ii) proportional to the number of monomials per original variable.

Lemma 6. Fix C>0C>0. Under the assumptions of Theorem 3(ii), let ff be a degree-at-most-three polynomial over F2\mathbb{F}_2 on NN Boolean variables, specified by at most M≤CN11/10M\le CN^{11/10} monomials. Its number of zeros and its gap can be computed exactly in

NOC(1)2OC(Nlog⁡(2+M/N)/log⁡N)N^{O_C(1)}2^{O_C(N\log(2+M/N)/\sqrt{\log N})}

time and polynomial space.

Proof. Constant polynomials can be handled directly. Otherwise, set B=max⁡{1,⌈M/N⌉}B=\max\{1,\lceil M/N\rceil\}, partition the monomials into q≤Nq\le N groups of at most BB terms, and write

f(x)=f1(x)+⋯+fq(x)over F2.f(x)=f_1(x)+\cdots+f_q(x)\qquad\text{over }\mathbb{F}_2.

Introduce variables y1,…,yqy_1,\ldots,y_q for the successive partial sums and impose

y1+f1(x)=0,yj+yj−1+fj(x)=0(2≤j≤q),yq=0.(12)\begin{aligned} y_1+f_1(x)&=0,\\ y_j+y_{j-1}+f_j(x)&=0 &&(2\le j\le q),\\ y_q&=0. \tag*{(12)} \end{aligned}

Once xx is fixed, the first qq equations uniquely determine yj=∑i≤jfi(x)y_j=\sum_{i\le j}f_i(x). The last equation holds exactly when f(x)=0f(x)=0. The number of common zeros of (12) is therefore Z(f)Z(f), with no multiplicative correction.

The system has N′=N+q∈[N,2N]N'=N+q\in[N,2N] variables and at most N+1N+1 equations. Every equation has degree at most three and at most B+2B+2 monomials. Moreover,

B+2≤CN1/10+3≤(C+3)(N′)1/10.B+2\le CN^{1/10}+3\le(C+3)(N')^{1/10}.

Theorem 3(ii) applies with fixed constants depending only on CC. Since N′=Θ(N)N'=\Theta(N) and log⁡(B+4)=O(log⁡(2+M/N))\log(B+4)=O(\log(2+M/N)), it gives Z(f)Z(f) in the stated time. Equation (11) then gives gap⁡(f)\operatorname{gap}(f).

The reduction uses one new variable per group. There are at most NN groups even as their size grows with the monomial density.

Applying the construction to prefix probabilities

Let UU have hh Hadamards and dd diagonal gates. All four gates in this gate set are self-adjoint. In the prefix circuit (5), replace each CNOT and each XX by

CNOT⁡u→v=HvCZ⁡u,vHv,X=HZH.\operatorname{CNOT}_{u\to v}=H_v\operatorname{CZ}_{u,v}H_v,\qquad X=HZH.

For a prefix of length ℓ\ell, write wt⁡(a)\operatorname{wt}(a) for its number of ones. The resulting VaV_a acts on r=n+ℓ≤2nr=n+\ell\le2n qubits and has

ha=2h+2ℓ+2wt⁡(a)≤2h+4n,(13)h_a=2h+2\ell+2\operatorname{wt}(a)\le2h+4n, \tag*{(13)}
da=2d+ℓ+wt⁡(a)≤2d+2n.(14)d_a=2d+\ell+\operatorname{wt}(a)\le2d+2n. \tag*{(14)}

Pad it with boundary Hadamards as above. Its number of interior Hadamards is ta=ha+2rt_a=h_a+2r, so Montanaro’s polynomial has

Na=r+ta=ha+3r=2h+3n+5ℓ+2wt⁡(a)(15)N_a=r+t_a=h_a+3r=2h+3n+5\ell+2\operatorname{wt}(a) \tag*{(15)}

variables. In particular, 3n≤Na≤(2A+10)n3n\le N_a\le(2A+10)n. Its number MaM_a of listed monomials satisfies

Ma≤ta+da=Na+2d−n+wt⁡(a)≤Na+2d.M_a\le t_a+d_a=N_a+2d-n+\operatorname{wt}(a)\le N_a+2d.

Thus d≤Cn11/10d\le Cn^{11/10} implies Ma≤(1+2C)Na11/10M_a\le(1+2C)N_a^{11/10}, within the fixed-constant range of Lemma 6. Also

Na=ΘA(n),log⁡(2+Ma/Na)=O(log⁡(2+d/n)).N_a=\Theta_A(n),\qquad\log(2+M_a/N_a)=O(\log(2+d/n)).

Combining Lemma 4 with (10) gives the exact prefix probability

pU(a)=2−r−ta/2(2Z(fa)−2Na).(16)p_U(a)=2^{-r-t_a/2}\left(2Z(f_a)-2^{N_a}\right). \tag*{(16)}

The integer hah_a is even, so tat_a is even and the denominator here is an integer power of two. Lemma 6 computes this probability within (2). Repeating for at most nn prefixes preserves that bound. The exact sampling procedure below completes the proof of Theorem 2.

Implementing the random choices

Algebraic probabilities

For Theorem 1, every prefix probability is a real element of a fixed number field whose coordinates use polynomially many bits. The same is true of a conditional probability q∈[0,1]q\in[0,1] from (4). Arithmetic and order comparisons in this fixed field take polynomial time in the bit length of their inputs.

To generate a Bernoulli random variable with success probability qq, expose independent fair bits of a uniform number R∈[0,1]R\in[0,1]. After bb bits, RR lies in a known half-open dyadic interval Ib=[ub,vb)I_b=[u_b,v_b) of length 2−b2^{-b}. If vb≤qv_b\le q, declare success; if ub≥qu_b\ge q, declare failure. Otherwise expose another bit. The event R=qR=q has probability zero.

The probability of being undecided after bb bits is at most 2−b2^{-b}. Each comparison costs poly⁡(n+b)\operatorname{poly}(n+b) time, so the expected arithmetic overhead is polynomial in nn. The procedure halts with probability one and makes the exact conditional choice. Together with the nn prefix computations, this proves the exact expected-time claim.

For a worst-case bound, stop after L=⌈log⁡2(n/ε)⌉L=\lceil\log_2(n/\varepsilon)\rceil bits for each conditional choice, resolving any remaining ambiguity arbitrarily. Couple this procedure to the exact sampler using the same random bits. At each step the conditional chance of an unresolved comparison is at most 2−L2^{-L}; the chance of any discrepancy is at most n2−L≤εn2^{-L}\le\varepsilon. Consequently the output distribution p~\widetilde{p} satisfies

dTV(pU,p~):=12∑z∣pU(z)−p~(z)∣≤ε.d_{\mathrm{TV}}(p_U,\widetilde{p}) := \frac{1}{2}\sum_z \lvert p_U(z)-\widetilde{p}(z)\rvert\le\varepsilon.

The additional worst-case work is poly⁡(n,log⁡(1/ε))\operatorname{poly}(n,\log(1/\varepsilon)), as stated in Theorem 1.

A finite exact sampler for the second gate set

For a circuit over {H,Z,CZ,CCZ}\{H,Z,\mathrm{CZ},\mathrm{CCZ}\} with hh Hadamards, each path has weight ±2−h/2\pm2^{-h/2}. Every output amplitude is therefore Az2−h/2A_z2^{-h/2} for an integer AzA_z, and

pU(z)=Az22h,W(a):=2hpU(a)∈Z≥0.(17)p_U(z)=\frac{A_z^2}{2^h},\qquad W(a):=2^h p_U(a)\in\mathbb{Z}_{\ge0}. \tag*{(17)}

Although the ratios in (4) need not be dyadic, all prefix weights in (17) are integers with a common denominator. This permits exact sampling with a fixed number of fair bits:

  1. Draw a uniform integer R∈{0,…,2h−1}R\in\{0,\ldots,2^h-1\} using hh fair bits, and start with a=∅a=\varnothing.

  2. Compute W(a0)W(a0). If R<W(a0)R<W(a0), append 0 to aa. Otherwise replace RR by R−W(a0)R-W(a0) and append 1.

  3. Repeat until aa has length nn, then output aa.

Conditioned on the current prefix aa, the integer RR is uniform in {0,…,W(a)−1}\{0,\ldots,W(a)-1\}. Splitting this interval into lengths W(a0)W(a0) and W(a1)W(a1) makes the next choice with exactly the probabilities in (4), and preserves the same invariant at the next step. Intervals of length zero are never selected.

The prefix weights and the random integer have O(h+1)=O(n)O(h+1)=O(n) bits. The sampler makes nn deterministic counting calls and has polynomial additional work and space. Hence its exact worst-case running time is (2), using exactly hh fair bits. This includes h=0h=0, when the initial interval has one element and no random bits are needed.

Concurrent work. The results in this note were publicly announced on 3 November 2026 on the ETH community discussion blog, together with a link to the manuscript [4]. Concurrent work by Vaibhav Tulsyan, posted to Hexagon on 4 November 2026, also derives subexponential-time exact simulation and sampling algorithms for sparse quantum circuits from the recent counting results [5].

Counting with an explicit monomial density

We prove Theorem 3(ii), following the construction of [1 Lemma D.2] with the dependence on BB retained, as in [2]. The main point is that the count can be expressed using incidence monomials of total degree O(N)O(N), even though there may be O(NB)O(NB) incidences. Specifying such a monomial takes O(Nlog⁡(B+2))O(N\log(B+2)) bits. These bits will index the edges of a tensor network.

The contraction input

Here is the form of [1 Theorem D.1] that we use. Fix constants C0,A0,b0>0C_0, A_0, b_0 > 0. Consider a bipartite tensor network whose edge indices are Boolean, with at most C0sC_0s edges, maximum degree at most ⌈s9/10⌉\lceil s^{9/10}\rceil, and polynomially many vertices. Its entries belong to

(Z/2P0Z)[V]/(Vℓ),1≤P0,ℓ≤C0s.(\mathbb{Z}/2^{P_0}\mathbb{Z})[V]/(V^\ell), \qquad1 \le P_0,\ell\le C_0s.

Suppose the network and its entry procedures have total description length LL. Each entry must be computable uniformly in time (s+L)b02A0s9/10(s+L)^{b_0}2^{A_0s^{9/10}} and space (s+L)b0(s+L)^{b_0}. The theorem computes the contraction deterministically in

(s+L)O(1)2O(s/log⁡s)(s+L)^{O(1)}2^{O(s/\sqrt{\log s})}

time and polynomial space. The constants depend on the fixed constants in these hypotheses. In particular, tensors are specified by procedures for evaluating their entries; an explicit table of all entries is not required. A contraction sums, over all assignments to the edge indices, the product of the entries at the vertices.

Controlling variable occurrences

First multilinearize each input polynomial and cancel repeated monomials over F2\mathbb{F}_2. A constant-one equation makes the answer zero. Discard constant-zero equations, returning 2N2^N if none remain. Let IiI_i be the set of variables occurring in PiP_i. Then

∣Ii∣≤kB,E0:=∑i∣Ii∣≤kcNB.|I_i| \le kB,\qquad E_0 := \sum_i |I_i| \le kcNB.

An incidence is a pair (i,v)(i,v) with v∈Iiv \in I_i.

We first fix variables that occur in many equations. Put

λ=⌈log⁡N⌉,D∗=max⁡{1,⌈E0/N⌉}⌈λ⌉.\lambda= \lceil\log N\rceil,\qquad D_* = \max\{1,\lceil E_0/N\rceil\}\lceil\sqrt{\lambda}\rceil.

At most E0/D∗≤N/λE_0/D_* \le N/\sqrt{\lambda} variables occur in more than D∗D_* sets IiI_i. Enumerate their assignments, creating at most 2N/λ2^{N/\sqrt{\lambda}} disjoint branches. On each branch normalize the remaining equations again. A constant-one equation gives branch count zero. Discard constant-zero equations; if none remain, the branch count is two to the power of the number of free variables. Every free variable now occurs in at most

D∗=Ok,c(Blog⁡N)D_* = O_{k,c}(B\sqrt{\log N})

equations, and each remaining equation still involves at most kBkB variables. Free variables absent from every equation remain declared. We retain the original NN in all precision and size bounds, and use a≤cNa \le cN for the number of remaining equations on a branch.

A bounded-degree expression for the count

For one branch, give each incidence (i,v)(i,v) its own formal variable zivz_{iv}. Let Li(zi)L_i(z_i) be the integer polynomial obtained from PiP_i by interpreting its monomials over the integers and replacing xvx_v by zivz_{iv}. The parity lift in [1 Lemmas 5.1–5.2] provides integer polynomials e0,…,eNe_0,\ldots,e_N of degree at most one such that

∑j=0Nej(Y)(Y(Y−1))j≡1{Y even}(mod2N+1)(Y∈Z).(18)\sum_{j=0}^{N} e_j(Y)(Y(Y-1))^j \equiv\mathbf{1}_{\{Y\ \mathrm{even}\}} \pmod{2^{N+1}}\qquad(Y\in\mathbb{Z}). \tag*{(18)}

Their coefficients have polynomial bit length and can be constructed in polynomial time. Work over the ring

R=(Z/2N+1Z)[V]/(VN+1)\mathcal{R} = (\mathbb{Z}/2^{N+1}\mathbb{Z})[V]/(V^{N+1})

and form

Bi(zi,V)=∑j=0Nej(Li(zi))(Li(zi)(Li(zi)−1))jVj(19)B_i(z_i,V)=\sum_{j=0}^{N}e_j(L_i(z_i))(L_i(z_i)(L_i(z_i)-1))^jV^j \tag*{(19)}

Multilinearize each coefficient in the incidence variables. This leaves its values on Boolean inputs unchanged. Variables belonging to different equations are distinct, so

F(z,V)=∏i=1aBi(zi,V)F(z,V)=\prod_{i=1}^{a}B_i(z_i,V)

is multilinear in all incidence variables. The coefficient of VjV^j has total incidence degree at most k(a+2j)k(a+2j): a product using exponents j1,…,jaj_1,\ldots,j_a has degree at most ∑ik(1+2ji)\sum_i k(1+2j_i), and ∑iji=j\sum_i j_i=j. Thus every incidence monomial surviving the truncation has degree at most

K=k(a+2N)=Θk,c(N).K=k(a+2N)=\Theta_{k,c}(N).

Let SN+1S_{N+1} sum the coefficients of 1,V,…,VN1,V,\ldots,V^N in R\mathcal{R}. The branch count, modulo 2N+12^{N+1}, is

SN+1(∑x free BooleanF((ziv=xv)iv,V)).(20)S_{N+1}\left(\sum_{x\ \mathrm{free\ Boolean}}F\left((z_{iv}=x_v)_{iv},V\right)\right). \tag*{(20)}

To see this, first multiply the expressions in (18) with Y=Li(x)Y=L_i(x). Their product is the indicator that all equations hold. Every factor Li(x)(Li(x)−1)L_i(x)(L_i(x)-1) is even. Hence a term of total VV-degree at least N+1N+1 is divisible by 2N+12^{N+1} and can be omitted. Summing the remaining coefficients gives (20). The coefficient-sum map is applied after multiplication.

Encoding the incidence monomials

Partition the equations and the free variables separately into J=⌈N1/4⌉J=\lceil N^{1/4}\rceil groups of sizes differing by at most one. Write TgT_g for an equation group and XhX_h for a variable group. Let EghE_{gh} count the incidences between these two groups, and set E=∑g,hEgh≤E0E=\sum_{g,h}E_{gh}\le E_0.

Enumerate the integer arrays (dgh)(d_{gh}) with 0≤dgh≤Egh0\le d_{gh}\le E_{gh} and ∑g,hdgh≤K\sum_{g,h}d_{gh}\le K. There are at most

(K+1)J2=2Ok,c(Nlog⁡N)(K+1)^{J^2}=2^{O_{k,c}(\sqrt{N}\log N)}

such arrays. For a fixed array, create one vertex for each group and join TgT_g to XhX_h by

⌈log⁡(Eghdgh)⌉\left\lceil\log\binom{E_{gh}}{d_{gh}}\right\rceil

Boolean edges. The bits on these edges index a subset of dghd_{gh} incidences, in a fixed order agreed by both endpoints. An index beyond the number of subsets gives entry zero. If the binomial coefficient is one, no edge is needed. Ranking and unranking these subsets use polynomial-time arithmetic on binomial coefficients of polynomial bit length.

The number of edges is at most

J2+log⁡∏g,h(Eghdgh)≤J2+log⁡(E+KK)≤J2+Klog⁡(e(E+K)K)=Ok,c(Nlog⁡(B+2)).\begin{aligned} J^2+\log\prod_{g,h}\binom{E_{gh}}{d_{gh}} \le J^2+\log\binom{E+K}{K} \\ &\le J^2+K\log\left(\frac{e(E+K)}{K}\right) \\ &=O_{k,c}\bigl(N\log(B+2)\bigr). \end{aligned}

For the first inequality, the indexed choices are subsets of at most KK of the EE incidences. There are at most (E+KK)\binom{E+K}{K} such subsets: encode one by a multiset of size KK from the EE incidences and one extra padding symbol. The final bound uses E=Ok,c(NB)E=O_{k,c}(NB) and K=Θk,c(N)K=\Theta_{k,c}(N). This is the source of the factor log⁡(B+2)\log(B+2).

We next specify the tensor entries. At an equation-group vertex, the incident edge values determine a subset Si⊆IiS_i\subseteq I_i for each i∈Tgi\in T_g. Write zi,Si=∏v∈Sizivz_{i,S_i}=\prod_{v\in S_i}z_{iv}. The entry is the following element of R\mathbb{R}:

∏i∈Tg[zi,Si]Bi(zi,V).\prod_{i\in T_g}[z_{i,S_i}]B_i(z_i,V).

Each coefficient can be found from Boolean evaluations by

[zi,Si]Bi=∑T⊆Si(−1)∣Si∣−∣T∣Bi(1T,V),(21)[z_{i,S_i}]B_i=\sum_{T\subseteq S_i}(-1)^{|S_i|-|T|}B_i(1_T,V), \tag*{(21)}

where 1T1_T sets precisely the variables in TT to one and all other incidence variables of that equation to zero. Expanding a multilinear polynomial in this sum cancels every monomial except zi,Siz_{i,S_i}. Since ∣Si∣≤kB|S_i|\le kB, there are at most 2kB2^{kB} evaluations, each taking polynomial time using (19). Compute and multiply the coefficients for the equations one at a time. An entry therefore takes NO(1)2Ok(B)N^{O(1)}2^{O_k(B)} time and polynomial space.

At a variable-group vertex, let bvb_v be the number of selected incidences involving v∈Xhv\in X_h. Its entry is

∑x∈{0,1}Xh∏v∈Xhxvbv=2∣{v∈Xh:bv=0}∣(mod2N+1).\sum_{x\in\{0,1\}^{X_h}}\prod_{v\in X_h}x_v^{b_v}=2^{|\{v\in X_h:b_v=0\}|}\pmod{2^{N+1}}.

An exponent zero contributes the constant one; a positive exponent requires xv=1x_v=1. This entry is computable in polynomial time and accounts for free variables absent from every equation.

Every incidence monomial of FF belongs to exactly one degree array and has exactly one valid subset index for each pair of groups. The equation-group entries supply its coefficient, and the variable-group entries sum its value over assignments after the incidences of each variable are identified. Summing the contractions over all arrays therefore gives the expression inside SN+1S_{N+1} in (20).

Checking the time and space bounds

An equation group contains Oc(N3/4)O_c(N^{3/4}) equations, each with at most kBkB incidences. A variable group contains O(N3/4)O(N^{3/4}) variables, each in at most D∗D_* equations. Since ⌈log⁡(Eghdgh)⌉≤Egh\lceil\log\binom{E_{gh}}{d_{gh}}\rceil\le E_{gh}, every vertex has degree at most

Ok,c(N3/4Blog⁡N)≤Ok,c,C(N17/20log⁡N).O_{k,c}(N^{3/4}B\sqrt{\log N})\le O_{k,c,C}(N^{17/20}\sqrt{\log N}).

Set s=⌈Nlog⁡(B+2)⌉s=\lceil N\log(B+2)\rceil. For all sufficiently large NN, this degree is at most ⌈s9/10⌉\lceil s^{9/10}\rceil. There are 2J2J vertices and Ok,c(s)O_{k,c}(s) edges. The graph and entry procedures have polynomial-size descriptions, and the precision and truncation order N+1N+1 are O(s)O(s). Finally, the entry cost NO(1)2Ok(B)N^{O(1)}2^{O_k(B)} is within the allowed NO(1)2O(s9/10)N^{O(1)}2^{O(s^{9/10})}, with polynomial space.

The contraction theorem thus applies. Since log⁡s=Θ(log⁡N)\log s=\Theta(\log N) throughout 1≤B≤CN1/101\le B\le CN^{1/10}, each contraction takes

NOk,c,C(1)2Ok,c,C(s/log⁡s)=NOk,c,C(1)2Ok,c,C(Nlog⁡(B+2)/log⁡N)N^{O_{k,c,C}(1)}2^{O_{k,c,C}(s/\sqrt{\log s})}=N^{O_{k,c,C}(1)}2^{O_{k,c,C}(N\log(B+2)/\sqrt{\log N})}

time and polynomial space. Multiplying by the number of branches and degree arrays preserves this bound: their exponents are O(N/log⁡N)O(N/\sqrt{\log N}) and O(Nlog⁡N)O(\sqrt{N}\log N).

Process the branches and arrays sequentially, applying SN+1S_{N+1} and adding branch counts modulo 2N+12^{N+1}. All ring elements and accumulators have polynomial size. The total number of common zeros lies in [0,2N][0,2^N], so its least nonnegative residue modulo 2N+12^{N+1} is the exact answer. This proves Theorem 3(ii).

References

  1. [1]OpenAI. The Exponential Time Hypothesis is False. Manuscript, 17 October 2026; revised 25 October 2026. Manuscript and source. The inputs used here are Theorem 1.1, Theorem D.1, and Lemmas 5.1–5.2. The proof of Lemma D.2 supplies the incidence construction extended in Appendix A.hub.valency.io/works/W_h8uqubsk
  2. [2]Exact Quantum Sampling with More Diagonal Gates: A density extension with explicit hypotheses and parameter bounds. Unpublished note, 30 October 2026. Theorem 1.1, Theorem 2.1, and Corollary 2.2.
  3. [4]Alexandru Gheorghiu. Announcement of joint work with Aparna Gupte. Comment on New Results Related to ETH, ETH: Community Examination and Discussion, 3 November 2026. Online announcement.
  4. [5]Vaibhav Tulsyan. Exact amplitudes of sparse quantum circuits in subexponential time, assuming the new #SAT algorithms. Hexagon preprint 2611.00090v1, 4 November 2026. Manuscript.hub.valency.io/works/W_ah43q84e

Paper details

vlnc:W_whwcprru
Version
v1 · latest
Published
Fresh — published within the last 30 days
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

OpenAI ChatGPT

View statement
Looking for related papers…
Contents