Introduction
The dihedral coset problem D C P q m \mathrm{DCP}_{q}^{m} DCP q m asks to recover a secret s ∈ Z q s \in\mathbb{Z}_{q} s ∈ Z q from m m m independent quantum samples of the form
1 2 ( ∣ 0 ⟩ ∣ x i ⟩ + ∣ 1 ⟩ ∣ x i + s ⟩ ) , x i ← Z q , i ∈ [ m ] , \frac{1}{\sqrt{2}}\left(\lvert0\rangle\lvert x_i\rangle+\lvert1\rangle\lvert x_i+s\rangle\right), \qquad x_i \leftarrow\mathbb{Z}_{q},\ i \in[m], 2 1 ( ∣ 0 ⟩ ∣ x i ⟩ + ∣ 1 ⟩ ∣ x i + s ⟩ ) , x i ← Z q , i ∈ [ m ] ,
where the offsets x i x_i x i are uniformly random and unknown to the solver. States of this form naturally appear in the “standard approach” for the dihedral hidden subgroup problem and for the hidden shift problem over Z q \mathbb{Z}_{q} Z q [16 , 20 ] ; solving DCP in polynomial time would imply polynomial-time quantum algorithms for both these problems. The best algorithm we know for all three of these problems is due to Kuperberg [16 ] , and has subexponential time and sample complexity 2 O ( log q ) 2^{O(\sqrt{\log q})} 2 O ( l o g q ) .
Interestingly, DCP upper-bounds the hardness of the computational problems underlying several of our candidate post-quantum cryptographic assumptions. Key recovery for a cryptographic abelian group action is an instance of the hidden shift problem [7 ] , and Kuperberg-style DCP algorithms give the best known attacks for group action-based cryptography [5 , 18 ] . Similarly, DCP is closely related to Learning With Errors (LWE), a central problem at the heart of lattice-based cryptography. Regev [19 ] showed that poly ( n ) \operatorname{poly}(n) poly ( n ) -uSVP (and therefore also LWE) is no harder than DCP, by giving a polynomial-time quantum reduction to D C P q m \mathrm{DCP}_{q}^{m} DCP q m . Crucially, this reduction produces only polynomially many noiseless DCP samples, rendering Kuperberg’s subexponential algorithm irrelevant. Information-theoretically, however, m = O ( log q ) m=O(\log q) m = O ( log q ) samples already determine s s s [11 ] , and an algorithm with polynomial time- and sample-complexity for DCP would give a polynomial-time attack on lattice-based cryptography. The reduction, however, runs in one direction only: LWE might potentially be a lot easier than DCP.
To close this potential gap in hardness, Brakerski, Kirshanova, Stehlé and Wen [3 ] introduced the extrapolated dihedral coset problem E D C P n , q , f m \mathrm{EDCP}_{n,q,f}^{m} EDCP n , q , f m . It is parameterized additionally by a dimension n ∈ N n \in\mathbb{N} n ∈ N and an amplitude function f : Z → C f:\mathbb{Z}\to\mathbb{C} f : Z → C with ∑ k ∈ Z ∣ f ( k ) ∣ 2 = 1 \sum_{k\in\mathbb{Z}}|f(k)|^{2}=1 ∑ k ∈ Z ∣ f ( k ) ∣ 2 = 1 , and asks to recover a secret vector s ∈ Z q n \mathbf{s}\in\mathbb{Z}_{q}^{n} s ∈ Z q n from m m m independent quantum states of the form
∑ k ∈ Z f ( k ) ∣ k ⟩ ∣ x i + k ⋅ s ⟩ , x i ∈ Z q n , i ∈ [ m ] . \sum_{k\in\mathbb{Z}}f(k)\lvert k\rangle\lvert\mathbf{x}_i+k\cdot\mathbf{s}\rangle,\qquad\mathbf{x}_i\in\mathbb{Z}_{q}^{n},\ i\in[m]. k ∈ Z ∑ f ( k ) ∣ k ⟩ ∣ x i + k ⋅ s ⟩ , x i ∈ Z q n , i ∈ [ m ] .
Taking n = 1 n=1 n = 1 and f ( k ) = 1 2 ⋅ 1 [ k ∈ { 0 , 1 } ] f(k)=\frac{1}{\sqrt{2}}\cdot\mathbf{1}[k\in\{0,1\}] f ( k ) = 2 1 ⋅ 1 [ k ∈ { 0 , 1 }] gives two-point DCP states. Writing U-EDCPn , q , r m _{n,q,r}^{m} n , q , r m for the uniform case, in which f f f is the normalized indicator of { 0 , 1 , … , r − 1 } \{0,1,\ldots,r-1\} { 0 , 1 , … , r − 1 } , Brakerski et al. showed that U-EDCPn , q , r m _{n,q,r}^{m} n , q , r m and LWEn , q , α _{n,q,\alpha} n , q , α are equivalent up to polynomial losses in parameters under polynomial-time quantum reductions when m = poly ( n log q ) m=\operatorname{poly}(n\log q) m = poly ( n log q ) and r = poly ( n log q ) / α r=\operatorname{poly}(n\log q)/\alpha r = poly ( n log q ) / α .
Throughout this paper, we specialize to the two-point amplitude f ( k ) = 1 2 1 [ k ∈ { 0 , 1 } ] f(k)=\frac{1}{\sqrt{2}}\mathbf{1}[k\in\{0,1\}] f ( k ) = 2 1 1 [ k ∈ { 0 , 1 }] , and call this problem vector dihedral coset problem , denoted as D C P n , q m \mathrm{DCP}_{n,q}^{m} DCP n , q m . This problem is known to be as hard as U-EDCPn , q , r m _{n,q,r}^{m} n , q , r m [BJK$^{+}$25, Lemma 14]. Our goal is thus to recover s \mathbf{s} s from independent samples of the form
1 2 ( ∣ 0 ⟩ ∣ x i ⟩ + ∣ 1 ⟩ ∣ x i + s ⟩ ) , x i ← Z q n , i ∈ [ m ] . \frac{1}{\sqrt{2}}\left(\lvert0\rangle\lvert\mathbf{x}_i\rangle+\lvert1\rangle\lvert\mathbf{x}_i+\mathbf{s}\rangle\right),\qquad\mathbf{x}_i\leftarrow\mathbb{Z}_{q}^{n},\ i\in[m]. 2 1 ( ∣ 0 ⟩ ∣ x i ⟩ + ∣ 1 ⟩ ∣ x i + s ⟩ ) , x i ← Z q n , i ∈ [ m ] .
For general moduli, the best known algorithm is still Kuperberg’s, which solves D C P q m \mathrm{DCP}_{q}^{m} DCP q m in time and samples 2 O ( log q ) 2^{O(\sqrt{\log q})} 2 O ( l o g q ) [16 ] ; applied to the group Z q n \mathbb{Z}_{q}^{n} Z q n it solves D C P n , q m \mathrm{DCP}_{n,q}^{m} DCP n , q m in time 2 O ( n log q ) 2^{O(\sqrt{n\log q})} 2 O ( n l o g q ) . For structured moduli, however, one can do considerably better. When q = p q=p q = p is a fixed prime, Friedl, Ivanyos, Magniez, Santha and Sen [FIM$^{+}$14] solve the problem in polynomial time, and when q = 2 t q=2^{t} q = 2 t is a power of two, Bai, Jangir, Kirshanova, Ngo and Youmans [BJK$^{+}$25] give a quasipolynomial-time algorithm for q = poly ( n ) q=\operatorname{poly}(n) q = poly ( n ) . Both exploit special structure of the modulus, which raises the question:
Our main result and idea
Call a modulus B B B -smooth if all of its prime factors are at most B B B . Our main result is an algorithm for D C P n , q m \mathrm{DCP}^{m}_{n,q} DCP n , q m whose cost is governed by the largest prime factor of q q q .
Informal Theorem 1.1 (Corollary 4.18 ). Let q > 1 q > 1 q > 1 be B B B -smooth. There is a quantum algorithm that recovers s ∈ Z q n \mathbf{s} \in\mathbb{Z}_{q}^{n} s ∈ Z q n from two-point vector DCP states with success probability at least 1 − ε 1-\varepsilon 1 − ε , using
n O ( B 1 + o ( 1 ) log q ) B O ( B 2 + o ( 1 ) log q ) poly ( log 2 ε ) n^{O(B^{1+o(1)}\log q)}B^{O(B^{2+o(1)}\log q)}\operatorname{poly}\left(\log\frac{2}{\varepsilon}\right) n O ( B 1 + o ( 1 ) l o g q ) B O ( B 2 + o ( 1 ) l o g q ) poly ( log ε 2 ) samples and time. This is quasipolynomial when B = polylog ( n ) B=\operatorname{polylog}(n) B = polylog ( n ) and q = poly ( n ) q=\operatorname{poly}(n) q = poly ( n ) .
The work of Boucher, Fouque and Shen [1 ] uses different techniques to obtain an algorithm for prime-power moduli q = p t q=p^{t} q = p t . We handle smooth moduli with possibly different prime factors. We compare our results in more detail in § 1.2 .
Our algorithm proceeds by reducing the modulus one prime factor p ∣ q p\mid q p ∣ q at a time. The main idea is that this can be done by a sieving procedure that clears the non-linear terms in the phase modulo p p p , one degree at a time, via a subroutine that finds non-zero u ∈ F p ℓ \mathbf{u}\in\mathbb{F}_{p}^{\ell} u ∈ F p ℓ such that ∑ i ∈ [ ℓ ] u i d a i = 0 ( m o d p ) \sum_{i\in[\ell]}u_{i}^{d}a_{i}=0\pmod p ∑ i ∈ [ ℓ ] u i d a i = 0 ( mod p ) , given vectors a 1 , … , a ℓ ∈ F p n \mathbf{a}_{1},\ldots,\mathbf{a}_{\ell}\in\mathbb{F}_{p}^{n} a 1 , … , a ℓ ∈ F p n . We use the diagonal-equation algorithm of Ivanyos and Santha [13 ] for this purpose; the subset sum algorithms of Imran and Ivanyos [II23] or Kothari–O’Donnell–Wu [15 ] give alternative ways to find these relations with slightly worse dependence on B B B in the exponent of n n n . We describe our techniques in more detail in § 2 .
We describe our main algorithm (Algorithm 4.15 ) and state the main result (Theorem 4.16 ) in terms of DCP for the generalized dihedral group dih ( G ) \operatorname{dih}(G) dih ( G ) , where Z q n \mathbb{Z}_{q}^{n} Z q n is replaced with a general finite abelian group G G G to which we have black-box access. This allows us to highlight the structure of Z q n \mathbb{Z}_{q}^{n} Z q n that enables a faster algorithm (see Corollary 4.17).
Related work
The algorithm of Kuperberg [16 ] gives a subexponential-time quantum algorithm for the hidden shift problem over arbitrary finite abelian groups: given oracle access to injective functions f 0 , f 1 : G → X f_{0},f_{1}:G\to X f 0 , f 1 : G → X satisfying f 0 ( x ) = f 1 ( x + s ) f_{0}(x)=f_{1}(x+s) f 0 ( x ) = f 1 ( x + s ) for some unknown s ∈ G s\in G s ∈ G , the goal is to recover s s s . Querying these functions in superposition and measuring the output register yields states of the form 1 2 ( ∣ 0 , x ⟩ + ∣ 1 , x + s ⟩ ) \frac{1}{\sqrt{2}}(\lvert0,x\rangle+\lvert1,x+s\rangle) 2 1 (∣ 0 , x ⟩ + ∣ 1 , x + s ⟩) , where x ∈ G x\in G x ∈ G is uniformly random. These are coset states of the generalized dihedral group dih ( G ) \operatorname{dih}(G) dih ( G ) , defined in Definition 3.1 .
Specializing to G = Z q n G=\mathbb{Z}_{q}^{n} G = Z q n yields the vector dihedral coset problem, which Kuperberg’s algorithm solves in time and sample complexity 2 O ( n log q ) 2^{O(\sqrt{n\log q})} 2 O ( n l o g q ) , for arbitrary moduli q q q . In this setting, Kuperberg’s algorithm works by first performing a quantum Fourier transform to convert DCP samples into Fourier samples of the form ( a , 1 2 ( ∣ 0 ⟩ + ω q ⟨ a , s ⟩ ∣ 1 ⟩ ) ) \left(\mathbf{a},\frac{1}{\sqrt{2}}(\lvert0\rangle+\omega_{q}^{\langle\mathbf{a},\mathbf{s}\rangle}\lvert1\rangle)\right) ( a , 2 1 (∣ 0 ⟩ + ω q ⟨ a , s ⟩ ∣ 1 ⟩) ) , and then performs a “sieving” step that iteratively combines these Fourier samples until a ∈ ( q / 2 ) Z q n \mathbf{a}\in(q/2)\mathbb{Z}_{q}^{n} a ∈ ( q /2 ) Z q n . At this point, the least significant bits of s s s can be learned by a Hadamard transform and Gaussian elimination.
Memory-efficient algorithms. In addition to requiring subexponential samples and runtime, Kuperberg’s original algorithm requires 2 O ( log ∣ G ∣ ) 2^{O(\sqrt{\log|G|})} 2 O ( l o g ∣ G ∣ ) quantum memory. Regev reduced the space complexity to poly ( log ∣ G ∣ ) \operatorname{poly}(\log|G|) poly ( log ∣ G ∣ ) for cyclic 2-groups, at the expense of increasing the time and sample complexity to 2 O ( log ∣ G ∣ log log ∣ G ∣ ) 2^{O(\sqrt{\log|G|\log\log|G|})} 2 O ( l o g ∣ G ∣ l o g l o g ∣ G ∣ ) [20 ] . Kuperberg’s later collimation sieve recovered the original 2 O ( log ∣ G ∣ ) 2^{O(\sqrt{\log|G|})} 2 O ( l o g ∣ G ∣ ) time bound while requiring only O ( log ∣ G ∣ ) O(\log|G|) O ( log ∣ G ∣ ) qubits, at the cost of subexponential 2 O ( log ∣ G ∣ ) 2^{O(\sqrt{\log|G|})} 2 O ( l o g ∣ G ∣ ) classical memory accessible in quantum superposition [17 ] . Peikert [18 ] extended the collimation sieve to arbitrary cyclic groups and analyzed its concrete costs for CSIDH, an isogeny-based key-exchange protocol built from a commutative group action on supersingular elliptic curves.
Time- and sample-efficient algorithms for structured groups. While the preceding works reduce the space complexity of Kuperberg’s algorithm, additional group structure can be exploited to get algorithms that run faster and use fewer samples. The simplest case is G = Z 2 n G = \mathbb{Z}_2^n G = Z 2 n , where hidden shift reduces to Simon’s problem and can be solved in poly ( n ) \operatorname{poly}(n) poly ( n ) time using poly ( n ) \operatorname{poly}(n) poly ( n ) samples by Fourier sampling and then Gaussian elimination [21 ] . Friedl, Ivanyos, Magniez, Santha, and Sen [12 ] generalized this result to G = F p n G = \mathbb{F}_p^n G = F p n for any prime p p p , achieving time complexity n O ( p ) p O ( p ) n^{O(p)}p^{O(p)} n O ( p ) p O ( p ) . Their key observation is that quantum Fourier sampling can be used to obtain random linear disequations of the form ⟨ a , s ⟩ ≠ 0 m o d p \langle a,s\rangle\ne0 \bmod p ⟨ a , s ⟩ = 0 mod p . By Fermat’s little theorem, these can then be converted into linear equations in the degree-( p − 1 ) (p-1) ( p − 1 ) monomials of s s s , allowing the secret to be recovered using linear algebra [14 ] .
Friedl et al. [12 ] also extend their algorithm to more general groups using a recursion-friendly generalization of the hidden shift problem, in which the secret shift can be an entire coset, rather than just a single element.1 Given hidden shift oracles f 0 , f 1 : G → X f_0,f_1:G \to X f 0 , f 1 : G → X , they first prepare the states
∣ f b ⟩ : = 1 ∣ G ∣ ∑ x ∈ G ∣ x , f b ( x ) ⟩ , |f_b\rangle:= \frac{1}{\sqrt{|G|}}\sum_{x\in G}|x,f_b(x)\rangle, ∣ f b ⟩ := ∣ G ∣ 1 x ∈ G ∑ ∣ x , f b ( x )⟩ ,
so that the hidden shift relation becomes s ⋅ ∣ f 0 ⟩ = ∣ f 1 ⟩ s\cdot|f_0\rangle= |f_1\rangle s ⋅ ∣ f 0 ⟩ = ∣ f 1 ⟩ , where s s s acts by translating the first register by s s s ; the recursive iterations of the algorithm prepare states with a coset of hidden shifts. Their recursive algorithm reduces this quantum-state version of hidden shift to instances over subgroups H ≤ G H \le G H ≤ G such that the quotient G / H ≅ F p n G/H \cong\mathbb{F}_p^n G / H ≅ F p n is amenable to their F p n \mathbb{F}_p^n F p n algorithm. In particular, for G = Z q n G = \mathbb{Z}_q^n G = Z q n with all prime factors of q q q bounded by B B B , their algorithm runs in time ( n log q ) O B ( log q ) (n\log q)^{O_B(\log q)} ( n log q ) O B ( l o g q ) , which is quasipolynomial for constant B B B and q = poly ( n ) q = \operatorname{poly}(n) q = poly ( n ) . 2 However, their recursion uses copies of the full function states ∣ f 0 ⟩ , ∣ f 1 ⟩ |f_0\rangle, |f_1\rangle ∣ f 0 ⟩ , ∣ f 1 ⟩ and coherent operations on them, rather than just independent dihedral coset states. It therefore does not directly yield an algorithm for the vector DCP problem considered here.3
Our algorithm can be viewed as a counterpart to the hidden shift algorithm of Friedl et al. [12 ] that works directly with independent DCP samples, rather than coherent access to hidden shift function oracles. The two approaches also use complementary classical subroutines: Friedl et al. solve linear disequations over F p n \mathbb{F}_p^n F p n , whereas we solve diagonal equations over F p n \mathbb{F}_p^n F p n , with subset sum as a special case. This suggests a duality between their approach and ours. The duality of the two problems can also be seen in the work of Chen, Liu, and Zhandry [8 ] , which reduces subset sum over F p n \mathbb{F}_p^n F p n to solving disequations via Fourier transform and unambiguous state discrimination.
Algorithms for DCP over power-of-two moduli. For q = 2 k q = 2^k q = 2 k , faster algorithms are known that work directly with independent DCP states, achieving time and sample complexity n O ( log q ) n^{O(\log q)} n O ( l o g q ) . Bonnetain and Naya-Plasencia [4 ] introduced the Simon-meets-Kuperberg algorithm, which interpolates between Simon’s polynomial-time algorithm when k = 1 k = 1 k = 1 and Kuperberg’s subexponential-time algorithm when n = 1 n = 1 n = 1 . Csáji [Csá21] subsequently gave a rigorous, space-efficient algorithm achieving n O ( log q ) n^{O(\log q)} n O ( l o g q ) time and sample complexity. More recently, Bai, Jangir, Kirshanova, Ngo, and Youmans [2 ] gave a provable variant of Simon-meets-Kuperberg that also handles extrapolated dihedral coset states (EDCP), achieving the same asymptotic complexity for power-of-two moduli. These algorithms exploit linear dependencies over F 2 \mathbb{F}_2 F 2 to progressively reduce the modulus by factors of two.
Beyond powers of two. Castryck, Dooms, Emerencia, and Lemmens [6 ] combined the power-of-two sieving techniques of [4 ] with the F p n \mathbb{F}_p^n F p n algorithm of Friedl et al. [12 ] , to give a n O p ( log q ) n^{O_p(\log q)} n O p ( l o g q ) algorithm for vector DCP over moduli of the form q = p ⋅ 2 k q = p \cdot2^k q = p ⋅ 2 k . They also extend Peikert’s collimation sieve to arbitrary finite abelian groups. Combining these techniques, they obtain a hidden shift algorithm for any finite abelian group G G G running in time poly ( log ∣ G ∣ ) ⋅ 2 O ( log ∣ 2 k p G ∣ ) \operatorname{poly}(\log|G|) \cdot2^{O(\sqrt{\log|2^k pG|})} poly ( log ∣ G ∣ ) ⋅ 2 O ( l o g ∣ 2 k pG ∣ ) , using only polynomially many qubits and quantum-accessible classical memory.
Concurrent work of Boucher, Fouque, and Shen [1 ] . The recent concurrent work by Boucher, Fouque, and Shen [1 ] extends the Simon-meets-Kuperberg framework to vector DCP over prime-power moduli q = p k q = p^k q = p k , achieving n O p ( log q ) n^{O_p(\log q)} n O p ( l o g q ) time and sample complexity. They do this by (1) defining the cyclotomic coset problem (CCP), a p p p -ary generalization of the binary dihedral coset problem (DCP), (2) generalizing the Simon-meets-Kuperberg framework to CCP, and (3) giving a reduction from DCP to CCP.
The dihedral group dih ( Z q ) \operatorname{dih}(\mathbb{Z}_q) dih ( Z q ) can be viewed as a semidirect product Z q ⋊ Z 2 \mathbb{Z}_q \rtimes\mathbb{Z}_2 Z q ⋊ Z 2 , with group law ( x , a ) × ( y , b ) = ( x + ( − 1 ) a y , a + b ) (x,a) \times(y,b) = (x + (-1)^a y, a + b) ( x , a ) × ( y , b ) = ( x + ( − 1 ) a y , a + b ) , and DCP asks to recover the subgroup { ( 0 , 0 ) , ( s , 1 ) } \{(0,0),(s,1)\} {( 0 , 0 ) , ( s , 1 )} from the coset states 1 2 ( ∣ 0 ⟩ ∣ x ⟩ + ∣ 1 ⟩ ∣ x + s ⟩ ) \frac{1}{\sqrt{2}}(|0\rangle|x\rangle+ |1\rangle|x+s\rangle) 2 1 ( ∣0 ⟩ ∣ x ⟩ + ∣1 ⟩ ∣ x + s ⟩) . Boucher, Fouque, and Shen [1 ] define CCP analogously for the cyclotomic group Z q [ ζ p ] n ⋊ Z p \mathbb{Z}_q[\zeta_p]^n \rtimes\mathbb{Z}_p Z q [ ζ p ] n ⋊ Z p , with group law
( x , a ) × ( y , b ) = ( x + ζ p a y , a + b ) , (x,a) \times(y,b) = (x + \zeta_p^a y, a + b), ( x , a ) × ( y , b ) = ( x + ζ p a y , a + b ) ,
where ζ p \zeta_p ζ p is a primitive p p p th root of unity. They define CCP to be the task of recovering the subgroup { ( λ a ⋅ s , a ) : a ∈ Z p } \{(\lambda_a \cdot s,a) : a \in\mathbb{Z}_p\} {( λ a ⋅ s , a ) : a ∈ Z p } , where λ a : = ∑ j = 0 a − 1 ζ p j \lambda_a := \sum_{j=0}^{a-1} \zeta_p^j λ a := ∑ j = 0 a − 1 ζ p j , from coset states of the form
1 p ∑ a ∈ Z p ∣ a ⟩ ∣ x + λ a ⋅ s ⟩ . \frac{1}{\sqrt{p}} \sum_{a\in\mathbb{Z}_p} |a\rangle|x+\lambda_a \cdot s\rangle. p 1 a ∈ Z p ∑ ∣ a ⟩ ∣ x + λ a ⋅ s ⟩ .
They then extend the Simon-meets-Kuperberg framework to work for CCP states, via a subset sum algorithm over F p n \mathbb{F}_p^n F p n of [I23].
Our algorithm also combines Fourier samples using relations among their labels. We work directly with the Fourier samples obtained from the DCP coset states, clearing nonlinear phase terms modulo p p p one degree at a time to get “semi-clean” states whose phase terms are linear modulo p p p . Such “semi-clean” Fourier samples can be used to reduce the modulus by a factor of p p p ; this process can then be repeated. In the language of our algorithm, the cyclotomic states of [1 ] are already semi-clean modulo ζ p − 1 \zeta_p-1 ζ p − 1 : their degree-d d d binomial coefficient is ( ζ p − 1 ) d − 1 y (\zeta_p-1)^{d-1}y ( ζ p − 1 ) d − 1 y , so all nonlinear coefficients vanish modulo ζ p − 1 \zeta_p-1 ζ p − 1 , whereas our algorithm achieves this linearity by explicitly cancelling the nonlinear coefficients of arbitrary phase-label maps.
Although their current analysis is restricted to prime power moduli, we suspect that it might be possible to extend the sieve of [1 ] to smooth moduli, perhaps by giving a reduction that prepares coset states for one cyclotomic group Z q [ ζ p 1 ] n ⋊ F p 1 \mathbb{Z}_q[\zeta_{p_1}]^n \rtimes\mathbb{F}_{p_1} Z q [ ζ p 1 ] n ⋊ F p 1 from coset states for another cyclotomic group Z q [ ζ p 2 ] n ⋊ F p 2 \mathbb{Z}_q[\zeta_{p_2}]^n \rtimes\mathbb{F}_{p_2} Z q [ ζ p 2 ] n ⋊ F p 2 , where p 1 , p 2 ∣ q p_1,p_2\mid q p 1 , p 2 ∣ q , but p 1 ≠ p 2 p_1\ne p_2 p 1 = p 2 ; however this remains to be checked. Our construction directly works with p p p -ary Fourier samples, and handles the more general smooth modulus setting.
While [1 ] uses the subset sum algorithm of [II23], we observe that by instead using the algorithm of Ivanyos and Santha [13 ] to solve the more general degree-d d d problem of finding nonzero u \mathbf{u} u such that ∑ i = 1 ℓ u i d a i = 0 \sum_{i=1}^{\ell}u_i^d\mathbf{a}_i=\mathbf{0} ∑ i = 1 ℓ u i d a i = 0 , we get a slightly better dependence on B B B in the exponent of n n n in the sample and time complexity. For q = p t q=p^t q = p t , our time and sample bound from Corollary 4.18 is
n O ( p 1 + o ( 1 ) log q ) p O ( p 2 + o ( 1 ) log q ) . n^{O(p^{1+o(1)}\log q)}p^{O(p^{2+o(1)}\log q)}. n O ( p 1 + o ( 1 ) l o g q ) p O ( p 2 + o ( 1 ) l o g q ) .
The theorem of [1 ] states a 2 O p ( log n log q ) 2^{O_p(\log n\log q)} 2 O p ( l o g n l o g q ) bound for fixed p p p , but to the best of our understanding, making the dependence on p p p explicit gives a n O ( p 2 log q ) p O ( p 2 log p log q ) n^{O(p^2\log q)}p^{O(p^2\log p\log q)} n O ( p 2 l o g q ) p O ( p 2 l o g p l o g q ) algorithm.
Subset sum and diagonal polynomial equations over F p n \mathbb{F}_p^n F p n . Our algorithm needs a subroutine that, given vectors a 1 , … , a ℓ ∈ F p n \mathbf{a}_1,\ldots,\mathbf{a}_{\ell}\in\mathbb{F}_p^n a 1 , … , a ℓ ∈ F p n and a degree 1 ≤ d ≤ p − 1 1\le d\le p-1 1 ≤ d ≤ p − 1 , finds a nonzero u ∈ F p ℓ \mathbf{u}\in\mathbb{F}_p^\ell u ∈ F p ℓ satisfying ∑ i = 1 ℓ u i d a i = 0 \sum_{i=1}^{\ell}u_i^d\mathbf{a}_i=\mathbf{0} ∑ i = 1 ℓ u i d a i = 0 . Such a relation lets us combine Fourier samples so that their degree-d d d coefficient vanishes, and we do this for degrees d = p − 1 d=p-1 d = p − 1 through 2. Ivanyos and Santha [13 Section 3] give a deterministic algorithm for this task. Writing g = gcd ( d , p − 1 ) g=\gcd(d,p-1) g = g cd( d , p − 1 ) , a sufficient number of arbitrary input vectors is ℓ = n O ( g log ( g + 1 ) ) p O ( g 2 log ( g + 1 ) ) \ell=n^{O(g\log(g+1))}p^{O(g^2\log(g+1))} ℓ = n O ( g l o g ( g + 1 )) p O ( g 2 l o g ( g + 1 )) , and the running time is poly ( ℓ , p ) \operatorname{poly}(\ell,p) poly ( ℓ , p ) ; see Theorem 3.4. This is the subroutine we use.
We observe that a subset sum algorithm also suffices: it finds a nonzero u ∈ { 0 , 1 } ℓ \mathbf{u}\in\{0,1\}^{\ell} u ∈ { 0 , 1 } ℓ with ∑ i u i a i = 0 \sum_i u_i\mathbf{a}_i=\mathbf{0} ∑ i u i a i = 0 . Since u i d = u i u_i^d=u_i u i d = u i for these coefficients, the same relation solves the degree-d d d problem for every d d d .
Imran and Ivanyos [II23, Theorem 2] give a deterministic subset sum algorithm using ℓ = n O ( p log p ) p O ( p log 2 p ) \ell=n^{O(p\log p)}p^{O(p\log^2p)} ℓ = n O ( p l o g p ) p O ( p l o g 2 p ) arbitrary input vectors and poly ( ℓ ) \operatorname{poly}(\ell) poly ( ℓ ) time. They use it as a subroutine to get a polynomial-time HSP algorithm for nilpotent groups of constant class whose orders have bounded prime factors [II23, Theorem 1]. The subset sum routine is also used to reduce the problem to a quotient group, however their work does not cover our dihedral groups: dih ( Z q n ) \operatorname{dih}(\mathbb{Z}_q^n) dih ( Z q n ) is not nilpotent when q q q has an odd prime factor, and for q = 2 k q=2^k q = 2 k its nilpotency class is k k k , which can grow. Their exact theorem also assumes access to a unitary preparing a purification of the subgroup state and its inverse; independent DCP samples do not supply this access, although their central-subgroup conversion itself can use coset-state copies.
Kothari, O’Donnell, and Wu [15 Sections 3.2 and 5.2] improve two steps of Imran–Ivanyos’s method. For p ≥ 5 p\ge5 p ≥ 5 , their subset sum algorithm for independent and uniformly random inputs requires fewer inputs ℓ = n 2 ⌊ ( p + 3 ) / 4 ⌋ p O ( p 2 ) \ell=n^{2\lfloor(p+3)/4\rfloor}p^{O(p^2)} ℓ = n 2 ⌊( p + 3 ) /4 ⌋ p O ( p 2 ) . For p = 3 p=3 p = 3 , Kothari–O’Donnell–Wu gives a deterministic algorithm using O ( n 2 ) O(n^2) O ( n 2 ) arbitrary inputs; see Lemma 3.3.
Cryptographic non-implications
The equivalence of LWE and suitable forms of EDCP does not make the present algorithm an attack on standard LWE. The reductions of Brakerski et al. [3 ] produce only a polynomial number of clean EDCP states, while our algorithm uses a quasipolynomial number. An LWE consequence would therefore require either a polynomial-sample version of our algorithm or a reduction that supplies the larger collection of suitably clean states it needs. The same sample barrier was noted for the power-of-two algorithm of Bai et al. [2 ] .
AI disclosure. The main result was found by ChatGPT-5.6 Sol in a conversation with the author in July 2026, except for the optimization to use the [13 ] algorithm, which was found in conversation with ChatGPT-6 Astra on 26 September 2026. The author verified and simplified the algorithm, over several conversations with ChatGPT-5.6 Sol, Claude Fable 5.1, ChatGPT-6 Sol and Astra; the author takes full responsibility for correctness, exposition, and attribution. The above models were also used to help write and edit this manuscript. The introduction and technical overview were primarily written by the author, with AI assistance mainly for copy-editing. In the remaining sections, the author used AI tools over several rounds to expand initial drafts, obtain feedback, and revise the exposition until the author was satisfied with its presentation.
Acknowledgements. The author thanks Vinod Vaikuntanathan, Noah Shutty, and Seyoon Ragavan for useful discussions. We also thank an anonymous reviewer for pointing out that our quasipolynomial sample and runtime guarantees hold even for smoothness bound B = polylog ( n ) B = \operatorname{polylog}(n) B = polylog ( n ) , not just when B = O ( 1 ) B = O(1) B = O ( 1 ) . The author was supported in part by a Simons investigator award and NSF grant CNS-2534400, and thanks the UK AISI alignment project for supporting access to ChatGPT Pro.
Technical Overview
We recall that our goal is to solve two-point vector EDCP: we are given samples
1 2 ( ∣ 0 ⟩ ∣ x i ⟩ + ∣ 1 ⟩ ∣ x i + s ⟩ ) , \frac{1}{\sqrt{2}}\left(|0\rangle|x_i\rangle+ |1\rangle|x_i+s\rangle\right), 2 1 ( ∣0 ⟩ ∣ x i ⟩ + ∣1 ⟩ ∣ x i + s ⟩ ) ,
where s ∈ Z q n s \in\mathbb{Z}_q^n s ∈ Z q n is a fixed unknown secret and each x i ∼ Z q n x_i \sim\mathbb{Z}_q^n x i ∼ Z q n , i ∈ [ m ] i \in[m] i ∈ [ m ] is uniform and unknown, and our goal is to find s s s . A standard first step is Fourier sampling: measuring the second register of a sample in the q q q -ary Fourier basis returns a uniformly random label a ∈ Z q n a \in\mathbb{Z}_q^n a ∈ Z q n and leaves, up to global phase, the single-qubit phase state
1 2 ( ∣ 0 ⟩ + ω q ⟨ a , s ⟩ ∣ 1 ⟩ ) , (1) \frac{1}{\sqrt{2}}\left(|0\rangle+\omega_q^{\langle a,s\rangle}|1\rangle\right), \tag*{(1)} 2 1 ( ∣0 ⟩ + ω q ⟨ a , s ⟩ ∣1 ⟩ ) , (1)
where ω q : = e 2 π i / q \omega_q := e^{2\pi i/q} ω q := e 2 π i / q . We call this a binary Fourier sample with label a a a ; the label a a a is known to the algorithm but the secret s s s is not. A single phase qubit is of little use on its own, because the phase ω q ⟨ a , s ⟩ \omega_q^{\langle a,s\rangle} ω q ⟨ a , s ⟩ cannot be read off by a measurement in general. The q = 2 q=2 q = 2 case is exactly Simon’s algorithm [21 ] : performing a Hadamard measurement returns ⟨ a , s ⟩ \langle a,s\rangle ⟨ a , s ⟩ mod 2 exactly, and O ( n ) O(n) O ( n ) such equations with independent uniform labels determine s s s .
Now let us think about the case of larger q q q ; assume for now that it is even. If we had gotten lucky, and it so happened that the measurement resulted in a ∈ ( q / 2 ) ⋅ Z q n ≅ Z 2 n a \in(q/2)\cdot\mathbb{Z}_q^n \cong\mathbb{Z}_2^n a ∈ ( q /2 ) ⋅ Z q n ≅ Z 2 n , we would know that ⟨ a , s ⟩ \langle a,s\rangle ⟨ a , s ⟩ lies in { 0 , q / 2 } \{0,q/2\} { 0 , q /2 } , and the same Hadamard-basis measurement would allow us to learn ( 2 q ⟨ a , s ⟩ ) \left(\frac{2}{q}\langle a,s\rangle\right) ( q 2 ⟨ a , s ⟩ ) mod 2. The high-level idea of Kuperberg’s sieve [16 ] is to combine binary Fourier samples so that their labels become progressively “more divisible” by q / 2 q/2 q /2 , until the phases can be read off by a Hadamard measurement. The Simon-meets-Kuperberg algorithms [4 Csá21, 2 ] implement this strategy particularly efficiently for power-of-two moduli, using linear algebra over F 2 \mathbb{F}_2 F 2 to reduce the modulus by a factor of 2 at each step. As we will see, this more efficient state-combination procedure does not directly extend to odd primes; our contribution is to overcome this obstacle for smooth moduli.
Recalling the q = 2 k q = 2^k q = 2 k algorithm
It will be instructive for us to first recall the Simon-meets-Kuperberg algorithms of [4 , 2 ] for the special case when q = 2 k q = 2^k q = 2 k for some k ∈ N k \in\mathbb{N} k ∈ N . Take n + 1 n+1 n + 1 phase qubits with labels a 1 , … , a n + 1 \mathbf{a}_1,\ldots,\mathbf{a}_{n+1} a 1 , … , a n + 1 and collect the labels as the rows of a known matrix A ∈ Z q ( n + 1 ) × n \mathbf{A} \in\mathbb{Z}_q^{(n+1)\times n} A ∈ Z q ( n + 1 ) × n . The tensor product of these n + 1 n+1 n + 1 states is
1 2 n + 1 ∑ x ∈ { 0 , 1 } n + 1 ω q ⟨ A T x , s ⟩ q ∣ x ⟩ , (2) \frac{1}{\sqrt{2^{n+1}}}\sum_{\mathbf{x}\in\{0,1\}^{n+1}}\omega_q^{\langle\mathbf{A}^{\mathsf{T}}\mathbf{x},\mathbf{s}\rangle_q}|\mathbf{x}\rangle, \tag*{(2)} 2 n + 1 1 x ∈ { 0 , 1 } n + 1 ∑ ω q ⟨ A T x , s ⟩ q ∣ x ⟩ , (2)
where we interpret x ∈ Z q n + 1 \mathbf{x} \in\mathbb{Z}_q^{n+1} x ∈ Z q n + 1 in the phase term. We would like to retain only those x \mathbf{x} x which are in the mod 2 kernel of A T \mathbf{A}^{\mathsf{T}} A T , i.e., with A T x ≡ 0 m o d 2 \mathbf{A}^{\mathsf{T}}\mathbf{x} \equiv0 \bmod2 A T x ≡ 0 mod 2 , since those are exactly the branches whose phase labels lie in 2 Z q n ≅ Z q / 2 n 2\mathbb{Z}_q^n \cong\mathbb{Z}_{q/2}^n 2 Z q n ≅ Z q /2 n . A naive hope might be to coherently measure a bit indicating whether x ∈ ker ( A T m o d 2 ) \mathbf{x} \in\ker(\mathbf{A}^{\mathsf{T}} \bmod2) x ∈ ker ( A T mod 2 ) and postselect on success, but the set of such x \mathbf{x} x is far too sparse to do this—there are exactly two such vectors with good probability, namely 0 \mathbf{0} 0 and the nonzero u ∈ F 2 n + 1 \mathbf{u} \in\mathbb{F}_2^{n+1} u ∈ F 2 n + 1 kernel vector of A T m o d 2 \mathbf{A}^{\mathsf{T}} \bmod2 A T mod 2 .
The key observation is that any single coset of the kernel is just as good. Unlike the kernel itself, its cosets can be filtered for as follows: we first parameterize x = ( z + t u ) \mathbf{x} = (\mathbf{z} + t\mathbf{u}) x = ( z + t u ) with z \mathbf{z} z ranging over fixed representatives of the cosets in F 2 n + 1 / ⟨ u ⟩ \mathbb{F}_2^{n+1}/\langle\mathbf{u}\rangle F 2 n + 1 / ⟨ u ⟩ and t ∈ F 2 t \in\mathbb{F}_2 t ∈ F 2 so that Equation (2) reads
1 2 n + 1 ∑ z ∈ F 2 n + 1 / ⟨ u ⟩ , t ∈ F 2 ω q ⟨ A T ( ( z + t u ) m o d 2 ) , s ⟩ q ∣ t ⟩ ∣ z ⟩ . \frac{1}{\sqrt{2^{n+1}}}\sum_{\substack{\mathbf{z}\in\mathbb{F}_2^{n+1}/\langle\mathbf{u}\rangle,\\ t\in\mathbb{F}_2}}\omega_q^{\langle\mathbf{A}^{\mathsf{T}}((\mathbf{z}+t\mathbf{u})\bmod2),\mathbf{s}\rangle_q}|t\rangle|\mathbf{z}\rangle. 2 n + 1 1 z ∈ F 2 n + 1 / ⟨ u ⟩ , t ∈ F 2 ∑ ω q ⟨ A T (( z + t u ) mod 2 ) , s ⟩ q ∣ t ⟩ ∣ z ⟩ .
Measuring the second register—that is, measuring which coset of ⟨ u ⟩ \langle\mathbf{u}\rangle ⟨ u ⟩ the branch lies in—leaves, up to global phase, a binary Fourier sample 1 2 ( ∣ 0 ⟩ + ω q / 2 ⟨ a ′ , s ⟩ ∣ 1 ⟩ ) \frac{1}{\sqrt{2}}(|0\rangle+\omega_{q/2}^{\langle\mathbf{a}',\mathbf{s}\rangle}|1\rangle) 2 1 ( ∣0 ⟩ + ω q /2 ⟨ a ′ , s ⟩ ∣1 ⟩) , with uniformly random and known label
a ′ : = A T ( ( ( z + u ) m o d 2 ) − z ) 2 ∈ Z q / 2 n . \mathbf{a}' := \frac{\mathbf{A}^{\mathsf{T}}(((\mathbf{z}+\mathbf{u})\bmod2)-\mathbf{z})}{2}\in\mathbb{Z}_{q/2}^n. a ′ := 2 A T ((( z + u ) mod 2 ) − z ) ∈ Z q /2 n .
Iterating this procedure brings the modulus down from q = 2 k q = 2^k q = 2 k to 2, at a cost of n + 1 n+1 n + 1 phase qubits per level and hence n O ( k ) n^{O(k)} n O ( k ) per modulus 2 phase qubit. A Hadamard measurement at the very end then gives one equation ⟨ a ~ , s ⟩ ≡ c m o d 2 \langle\widetilde{\mathbf{a}},\mathbf{s}\rangle\equiv c \bmod2 ⟨ a , s ⟩ ≡ c mod 2 with a known uniform a ~ \widetilde{\mathbf{a}} a , and O ( n ) O(n) O ( n ) of them determine s m o d 2 \mathbf{s} \bmod2 s mod 2 by Gaussian elimination. Once this last bit of the secret is known it can be stripped off and the whole procedure can be repeated on the next bit. Therefore this algorithm has sample and time complexity n O ( log q ) n^{O(\log q)} n O ( l o g q ) , which is quasipolynomial when q = poly ( n ) q = \operatorname{poly}(n) q = poly ( n ) .
The q = 3 k q = 3^k q = 3 k case
We could try to peel off one factor of 3 at each level and use the Fourier transform over F 3 \mathbb{F}_3 F 3 at the end to learn an equation in s \mathbf{s} s . But a binary Fourier sample still has only two branches, whereas an exact Fourier measurement modulo 3 requires a three-branch Fourier state. Moreover, if we measure A T x m o d 3 \mathbf{A}^{\mathsf{T}}\mathbf{x} \bmod3 A T x mod 3 on m m m binary samples, the surviving set need not be a coset of the kernel, and need not have three elements.
From qubits to qutrits. The mismatch between the support size of the states, which is 2, and the prime we wish to divide out, which is 3, motivates converting these binary qubits into qutrits supported on 3 basis states. Given two Fourier samples with labels a , a ′ \mathbf{a},\mathbf{a}' a , a ′ ,
1 2 ( ∣ 00 ⟩ + ω q ⟨ a ′ , s ⟩ ∣ 01 ⟩ + ω q ⟨ a , s ⟩ ∣ 10 ⟩ + ω q ⟨ a + a ′ , s ⟩ ∣ 11 ⟩ ) , \frac{1}{2}\left(\lvert00\rangle+\omega_q^{\langle\mathbf{a}',\mathbf{s}\rangle}\lvert01\rangle+\omega_q^{\langle\mathbf{a},\mathbf{s}\rangle}\lvert10\rangle+\omega_q^{\langle\mathbf{a}+\mathbf{a}',\mathbf{s}\rangle}\lvert11\rangle\right), 2 1 ( ∣ 00 ⟩ + ω q ⟨ a ′ , s ⟩ ∣ 01 ⟩ + ω q ⟨ a , s ⟩ ∣ 10 ⟩ + ω q ⟨ a + a ′ , s ⟩ ∣ 11 ⟩ ) ,
we can project the joint state onto span ( ∣ 00 ⟩ , ∣ 10 ⟩ , ∣ 11 ⟩ ) \operatorname{span}(\lvert00\rangle,\lvert10\rangle,\lvert11\rangle) span (∣ 00 ⟩ , ∣ 10 ⟩ , ∣ 11 ⟩) , which succeeds with probability 3 / 4 3/4 3/4 . Relabeling ∣ 00 ⟩ ↦ ∣ 0 ⟩ , ∣ 10 ⟩ ↦ ∣ 1 ⟩ , ∣ 11 ⟩ ↦ ∣ 2 ⟩ \lvert00\rangle\mapsto\lvert0\rangle,\lvert10\rangle\mapsto\lvert1\rangle,\lvert11\rangle\mapsto\lvert2\rangle ∣ 00 ⟩ ↦ ∣ 0 ⟩ , ∣ 10 ⟩ ↦ ∣ 1 ⟩ , ∣ 11 ⟩ ↦ ∣ 2 ⟩ , and writing b : = a ′ − a \mathbf{b}:=\mathbf{a}'-\mathbf{a} b := a ′ − a , gives the resulting qutrit
1 3 ( ∣ 0 ⟩ + ω q ⟨ a , s ⟩ ∣ 1 ⟩ + ω q ⟨ 2 a + b , s ⟩ ∣ 2 ⟩ ) . \frac{1}{\sqrt{3}}\left(\lvert0\rangle+\omega_q^{\langle\mathbf{a},\mathbf{s}\rangle}\lvert1\rangle+\omega_q^{\langle2\mathbf{a}+\mathbf{b},\mathbf{s}\rangle}\lvert2\rangle\right). 3 1 ( ∣ 0 ⟩ + ω q ⟨ a , s ⟩ ∣ 1 ⟩ + ω q ⟨ 2 a + b , s ⟩ ∣ 2 ⟩ ) .
Since ( a , a ′ ) ↦ ( a , b ) (\mathbf{a},\mathbf{a}')\mapsto(\mathbf{a},\mathbf{b}) ( a , a ′ ) ↦ ( a , b ) is invertible, the labels a , b \mathbf{a},\mathbf{b} a , b are again independent and uniform. It is convenient to record such a qutrit by a function corresponding to its phase terms f : Z 3 → Z q n f:\mathbb{Z}_3\to\mathbb{Z}_q^n f : Z 3 → Z q n , defined by f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 , f ( 1 ) = a f(1)=\mathbf{a} f ( 1 ) = a , and f ( 2 ) = 2 a + b f(2)=2\mathbf{a}+\mathbf{b} f ( 2 ) = 2 a + b . That is,
f ( x ) ≡ a x + b ( x 2 ) ( m o d 3 ) . f(x)\equiv\mathbf{a}x+\mathbf{b}\binom{x}{2}\pmod{3}. f ( x ) ≡ a x + b ( 2 x ) ( mod 3 ) .
The above form is the expansion of f f f in the binomial basis ( x 1 ) , ( x 2 ) \binom{x}{1},\binom{x}{2} ( 1 x ) , ( 2 x ) , which will be a convenient coordinate system for maps out of Z p \mathbb{Z}_p Z p (see Lemma 3.5 ). Call a qutrit semi-clean if its quadratic coefficient vanishes, that is, b ≡ 0 ( m o d 3 ) \mathbf{b}\equiv0\pmod{3} b ≡ 0 ( mod 3 ) . For a semi-clean qutrit the label map is linear modulo 3, and the binary argument goes through verbatim: combining n + 1 n+1 n + 1 semi-clean qutrits and measuring the coset of a kernel direction produces a qutrit whose labels are all divisible by 3, so the modulus drops from q q q to q / 3 q/3 q /3 . Therefore the problem has been reduced to manufacturing semi-clean qutrits, or equivalently, clearing the quadratic coefficient b \mathbf{b} b .
Clearing the quadratic coefficient b \mathbf{b} b via F 3 \mathbb{F}_3 F 3 -subset sum [II23]. Take m m m qutrits with phase term functions f i ( x ) = a i x + b i ( x 2 ) f_i(x)=\mathbf{a}_i x+\mathbf{b}_i\binom{x}{2} f i ( x ) = a i x + b i ( 2 x ) . Their tensor product is
1 3 m ∑ x ∈ F 3 m ω q ⟨ g ( x ) , s ⟩ ∣ x ⟩ , g ( x ) : = ∑ i = 1 m f i ( x i ) = ∑ i = 1 m ( a i x i + b i ( x i 2 ) ) ( m o d 3 ) . \frac{1}{\sqrt{3^m}}\sum_{\mathbf{x}\in\mathbb{F}_3^m}\omega_q^{\langle g(\mathbf{x}),\mathbf{s}\rangle}\lvert\mathbf{x}\rangle,\qquad
g(\mathbf{x}):=\sum_{i=1}^{m}f_i(x_i)=\sum_{i=1}^{m}\left(\mathbf{a}_i x_i+\mathbf{b}_i\binom{x_i}{2}\right)\pmod{3}. 3 m 1 x ∈ F 3 m ∑ ω q ⟨ g ( x ) , s ⟩ ∣ x ⟩ , g ( x ) := i = 1 ∑ m f i ( x i ) = i = 1 ∑ m ( a i x i + b i ( 2 x i ) ) ( mod 3 ) .
We could try to apply a similar state-combination procedure as the power-of-two algorithm, and for some fixed nonzero vector u ∈ F 3 m \mathbf{u}\in\mathbb{F}_3^m u ∈ F 3 m , we measure the coset of x \mathbf{x} x modulo ⟨ u ⟩ \langle\mathbf{u}\rangle ⟨ u ⟩ . It is not clear yet what u \mathbf{u} u should be; we will see a natural choice shortly. This measurement leaves a uniform superposition over an affine line x = z + t u \mathbf{x}=\mathbf{z}+t\mathbf{u} x = z + t u , t ∈ F 3 t\in\mathbb{F}_3 t ∈ F 3 for some measurement outcome z \mathbf{z} z known to the algorithm. Restricted to that line, g g g mod 3 becomes a univariate map of degree at most 2,
g ( z + t u ) ≡ c 0 + c 1 t + c 2 ( t 2 ) ( m o d 3 ) . g(\mathbf{z}+t\mathbf{u})\equiv c_0+c_1t+c_2\binom{t}{2}\pmod{3}. g ( z + t u ) ≡ c 0 + c 1 t + c 2 ( 2 t ) ( mod 3 ) .
A simple calculation (see Lemma 3.6 ) shows that its quadratic coefficient is c 2 = ∑ i u i 2 b i ( m o d 3 ) c_2=\sum_i u_i^2\mathbf{b}_i\pmod{3} c 2 = ∑ i u i 2 b i ( mod 3 ) . Because u i 2 = 1 [ u i ≠ 0 ] u_i^2=\mathbf{1}[u_i\ne0] u i 2 = 1 [ u i = 0 ] in F 3 \mathbb{F}_3 F 3 , this coefficient depends only on the support of u \mathbf{u} u , and it vanishes exactly when
∑ i : u i ≠ 0 b i ≡ 0 ( m o d 3 ) . \sum_{i:u_i\ne0}\mathbf{b}_i\equiv0\pmod{3}. i : u i = 0 ∑ b i ≡ 0 ( mod 3 ) .
Finding such a vector u \mathbf{u} u is an instance of subset-sum over F 3 n \mathbb{F}_3^n F 3 n , given input b 1 , … , b m \mathbf{b}_1,\ldots,\mathbf{b}_m b 1 , … , b m . If m = Θ ( n 2 ) m=\Theta(n^2) m = Θ ( n 2 ) , there is a polynomial-time algorithm that finds such a solution, due to [II23, KOW26].
One semi-clean qutrit costs O ( n 2 ) O(n^2) O ( n 2 ) qutrits, and one modulus reduction costs n + 1 n+1 n + 1 semi-clean qutrits, so a single level costs O ( n 3 ) O(n^3) O ( n 3 ) input states. Running log 3 q \log_3 q log 3 q levels and collecting O ( n ) O(n) O ( n ) equations per digit gives sample and time complexity n O ( log q ) n^{O(\log q)} n O ( l o g q ) , which is quasipolynomial for q = poly ( n ) q=\operatorname{poly}(n) q = poly ( n ) .
Generalizing to smooth q q q
The techniques for the q = 3 k q=3^k q = 3 k case can be readily generalized to smooth moduli.
First, we can use a method similar to how we prepared qutrits (or 3-ary Fourier samples) from binary Fourier samples, to also prepare p p p -ary Fourier samples (and vice versa).
As in the power-of-three algorithm, we reduce these labels modulo p p p and expand in the binomial basis, giving
f ( t ) ≡ ∑ d = 1 p − 1 ( t d ) a ( d ) ( m o d p ) . f(t) \equiv\sum_{d=1}^{p-1} \binom{t}{d} a^{(d)} \pmod p. f ( t ) ≡ d = 1 ∑ p − 1 ( d t ) a ( d ) ( mod p ) .
We clear the coefficients from degree p − 1 p-1 p − 1 down to degree 2. At degree d d d , collapsing a collection of states to a coset of u \mathbf{u} u changes the degree-d d d coefficient to
∑ i u i d a i ( d ) . (3) \sum_i u_i^d a_i^{(d)}. \tag*{(3)} i ∑ u i d a i ( d ) . (3)
Since we want to reduce the degree modulo p p p , we choose u \mathbf{u} u to make this sum zero. Higher degrees do not reappear, so this results in a p p p -ary Fourier sample where the phase terms are described by a degree-( d − 1 ) (d-1) ( d − 1 ) function modulo p p p .
When p = 3 p=3 p = 3 and d = 2 d=2 d = 2 , this corresponds exactly to subset sum over F 3 n \mathbb{F}_3^n F 3 n . For every p p p and d d d , a subset-sum solution u ∈ { 0 , 1 } m \mathbf{u}\in\{0,1\}^m u ∈ { 0 , 1 } m also suffices, since u i d = u i u_i^d=u_i u i d = u i . Such a solution can be supplied by Imran–Ivanyos [II23] (or Kothari–O’Donnell–Wu [15 ] , but we additionally must prove that the input vectors remain uniformly random). Using the Imran–Ivanyos bound requires m = n O ( p log p ) p O ( p log 2 p ) m=n^{O(p\log p)}p^{O(p\log^2 p)} m = n O ( p l o g p ) p O ( p l o g 2 p ) inputs per degree. The costs multiply over the degrees p − 1 , … , 2 p-1,\ldots,2 p − 1 , … , 2 , so using only this subset sum routine would cost n O ( p 2 log p ) p O ( p 2 log 2 p ) n^{O(p^2\log p)}p^{O(p^2\log^2 p)} n O ( p 2 l o g p ) p O ( p 2 l o g 2 p ) samples per modulus reduction.
However, we do not need a subset-sum solution u ∈ { 0 , 1 } m \mathbf{u}\in\{0,1\}^m u ∈ { 0 , 1 } m : any nonzero u ∈ F p m \mathbf{u}\in\mathbb{F}_p^m u ∈ F p m making (3) zero will do. Writing g = gcd ( d , p − 1 ) g=\gcd(d,p-1) g = g cd( d , p − 1 ) , the Ivanyos–Santha algorithm finds such a relation given
ℓ ( p , n , d ) ≥ n O ( g log p ) p O ( g 2 log p ) . \ell(p,n,d)\ge n^{O(g\log p)}p^{O(g^2\log p)}. ℓ ( p , n , d ) ≥ n O ( g l o g p ) p O ( g 2 l o g p ) .
inputs. Since q ≪ p q\ll p q ≪ p often, this gives us a better dependence on B B B in the exponent of n n n : for each divisor g ∣ ( p − 1 ) g\mid(p-1) g ∣ ( p − 1 ) , at most ( p − 1 ) / g (p-1)/g ( p − 1 ) / g degrees have gcd ( d , p − 1 ) = g \gcd(d,p-1)=g g cd( d , p − 1 ) = g , since each is a multiple of g g g . Thus the contribution to the exponent of n n n from each divisor is at most p g O ( g log p ) = O ( p log p ) \frac{p}{g}O(g\log p)=O(p\log p) g p O ( g log p ) = O ( p log p ) . Since p − 1 p-1 p − 1 has p o ( 1 ) p^{o(1)} p o ( 1 ) divisors by Lemma 3.11 , the product over all degrees is at most
n O ( p 1 + o ( 1 ) ) p O ( p 2 + o ( 1 ) ) . n^{O(p^{1+o(1)})}p^{O(p^{2+o(1)})}. n O ( p 1 + o ( 1 ) ) p O ( p 2 + o ( 1 ) ) .
Preliminaries
Notation and terminology. We write Z q \mathbb{Z}_q Z q to mean Z / q Z \mathbb{Z}/q\mathbb{Z} Z / q Z .
For an abelian group G G G , a subgroup H ≤ G H \le G H ≤ G , and g ∈ G g \in G g ∈ G , we write g + H ∈ G / H g + H \in G/H g + H ∈ G / H for the quotient class and [ g ] H ∈ G [g]_H \in G [ g ] H ∈ G for a fixed canonical representative of that class. For a function f f f valued in G G G , we use these notations pointwise: ( f + H ) ( x ) = f ( x ) + H (f + H)(x) = f(x) + H ( f + H ) ( x ) = f ( x ) + H and [ f ] H ( x ) = [ f ( x ) ] H [f]_H(x) = [f(x)]_H [ f ] H ( x ) = [ f ( x ) ] H .
Throughout this paper, we identify quantum states up to global phase.
Definition 3.1. Let G G G be a finite abelian group, written additively. The generalized dihedral group of G G G is dih ( G ) : = G ⋊ − 1 Z 2 \operatorname{dih}(G) := G \rtimes_{-1} \mathbb{Z}_2 dih ( G ) := G ⋊ − 1 Z 2 , where the nontrivial element of Z 2 \mathbb{Z}_2 Z 2 acts on G G G by inversion. That is, writing elements in dih ( G ) \operatorname{dih}(G) dih ( G ) as pairs ( b , x ) ∈ Z 2 × G (b,x) \in\mathbb{Z}_2 \times G ( b , x ) ∈ Z 2 × G , the group operation is
( b 1 , x 1 ) ⋅ ( b 2 , x 2 ) = ( b 1 + b 2 , x 1 + ( − 1 ) b 1 x 2 ) . (b_1,x_1) \cdot(b_2,x_2) = (b_1+b_2, x_1 + (-1)^{b_1}x_2). ( b 1 , x 1 ) ⋅ ( b 2 , x 2 ) = ( b 1 + b 2 , x 1 + ( − 1 ) b 1 x 2 ) . The dihedral group of 2 q 2q 2 q elements is obtained by taking G = Z q G = \mathbb{Z}_q G = Z q .
Definition 3.2. Let G G G be a finite abelian group, and let s ∈ G s \in G s ∈ G be a fixed secret. The generalized dihedral coset problem asks to recover s s s from samples of the form
1 2 ( ∣ 0 ⟩ ∣ x i ⟩ + ∣ 1 ⟩ ∣ x i + s ⟩ ) , \frac{1}{\sqrt{2}}\left(|0\rangle|x_i\rangle+ |1\rangle|x_i+s\rangle\right), 2 1 ( ∣0 ⟩ ∣ x i ⟩ + ∣1 ⟩ ∣ x i + s ⟩ ) , where x i ∼ G x_i \sim G x i ∼ G are uniformly random and unknown.
In this work, we are especially interested in the vector dihedral coset problem, which specializes G = Z q n G = \mathbb{Z}_q^n G = Z q n .
Subset sum over small field size
Lemma 3.3 (Imran–Ivanyos [II23] and Kothari–O’Donnell–Wu [15 ] ). Let p p p be prime and n ≥ 1 n \ge1 n ≥ 1 . The following algorithms find a nonempty zero-sum subset of vectors in F p n \mathbb{F}_p^n F p n .
Theorem 2 of Imran and Ivanyos gives a deterministic algorithm for any ℓ ≥ p O ( p log 2 p ) n O ( p log p ) \ell\ge p^{O(p\log^2 p)}n^{O(p\log p)} ℓ ≥ p O ( p l o g 2 p ) n O ( p l o g p ) input vectors, running in time poly ( ℓ ) \operatorname{poly}(\ell) poly ( ℓ ) .
For p = 3 p = 3 p = 3 and n ≥ 2 n \ge2 n ≥ 2 , Theorem 1.2 of Kothari, O’Donnell, and Wu gives a deterministic algorithm, for any ℓ ≥ n 2 / 3 + C n log n \ell\ge n^{2/3} + Cn\log n ℓ ≥ n 2/3 + C n log n input vectors, running in time poly ( ℓ ) \operatorname{poly}(\ell) poly ( ℓ ) , for an absolute constant C C C .
For p ≥ 5 p \ge5 p ≥ 5 , Theorem 4.12 of Kothari, O’Donnell, and Wu gives a deterministic algorithm that succeeds with probability at least 2 / 3 2/3 2/3 on ℓ ≥ p O ( p 2 ) n 2 ⌊ ( p + 3 ) / 4 ⌋ \ell\ge p^{O(p^2)}n^{2\lfloor(p+3)/4\rfloor} ℓ ≥ p O ( p 2 ) n 2 ⌊( p + 3 ) /4 ⌋ independent uniform input vectors and runs in time poly ( ℓ ) \operatorname{poly}(\ell) poly ( ℓ ) .
These subset sum routines give alternative ways to find the relations used below. Our algorithm instead uses the following Ivanyos–Santha theorem at every degree.
Theorem 3.4 (Ivanyos–Santha [13 Section 3] ). Let p p p be prime, n ≥ 1 n \ge1 n ≥ 1 , and 1 ≤ d < p 1 \le d < p 1 ≤ d < p , and put g = gcd ( d , p − 1 ) g = \gcd(d,p-1) g = g cd( d , p − 1 ) . Given any ℓ \ell ℓ vectors a 1 , … , a ℓ ∈ F p n a_1,\ldots,a_\ell\in\mathbb{F}_p^n a 1 , … , a ℓ ∈ F p n with
ℓ ≥ ( n + 1 ) g ⌈ log 2 ( g + 1 ) ⌉ ⌈ g ( g − 1 ) 2 ⌉ ⌈ log 2 ( g + 1 ) ⌉ , \ell\ge(n+1)^{g\lceil\log_2(g+1)\rceil}\left\lceil\frac{g(g-1)}{2}\right\rceil\lceil\log_2(g+1)\rceil, ℓ ≥ ( n + 1 ) g ⌈ l o g 2 ( g + 1 )⌉ ⌈ 2 g ( g − 1 ) ⌉ ⌈ log 2 ( g + 1 )⌉ , the deterministic algorithm of Ivanyos and Santha runs in time poly ( ℓ , p ) \operatorname{poly}(\ell,p) poly ( ℓ , p ) and finds a nonzero u ∈ F p ℓ \mathbf{u} \in\mathbb{F}_p^\ell u ∈ F p ℓ such that ∑ i = 1 ℓ u i d a i = 0 \sum_{i=1}^{\ell}u_i^d a_i = 0 ∑ i = 1 ℓ u i d a i = 0 .
Binomial basis for polynomials
Lemma 3.5. Let p p p be prime. Every map g : Z p → Z p n g : \mathbb{Z}_p \to\mathbb{Z}_p^n g : Z p → Z p n satisfying g ( 0 ) = 0 g(0) = 0 g ( 0 ) = 0 has a unique expression
g ( x ) = ∑ d = 1 p − 1 ( x d ) a ( d ) , a ( d ) = ∑ x = 0 d ( − 1 ) d − x ( d x ) g ( x ) . g(x) = \sum_{d=1}^{p-1} \binom{x}{d} \mathbf{a}^{(d)}, \qquad\mathbf{a}^{(d)} = \sum_{x=0}^{d} (-1)^{d-x} \binom{d}{x} g(x). g ( x ) = d = 1 ∑ p − 1 ( d x ) a ( d ) , a ( d ) = x = 0 ∑ d ( − 1 ) d − x ( x d ) g ( x ) . In particular, if g ( 1 ) , … , g ( p − 1 ) g(1), \ldots, g(p-1) g ( 1 ) , … , g ( p − 1 ) are independent and uniform in Z p n \mathbb{Z}_p^n Z p n , then a ( 1 ) , … , a ( p − 1 ) \mathbf{a}^{(1)}, \ldots, \mathbf{a}^{(p-1)} a ( 1 ) , … , a ( p − 1 ) are also independent and uniform in Z p n \mathbb{Z}_p^n Z p n .
Proof. The matrix with entries ( x d ) \binom{x}{d} ( d x ) for x , d = 1 x,d = 1 x , d = 1 to p − 1 p-1 p − 1 is lower triangular with every diagonal entry equal to one, and is therefore invertible over Z p \mathbb{Z}_p Z p . The displayed inverse is the usual finite difference formula. The final assertion follows because an invertible linear map preserves the uniform distribution.
Lemma 3.6. Suppose
g ( x ) = ∑ j = 1 d ( x j ) a ( j ) ( m o d p ) g(x) = \sum_{j=1}^{d} \binom{x}{j} \mathbf{a}^{(j)} \pmod p g ( x ) = j = 1 ∑ d ( j x ) a ( j ) ( mod p ) for some d < p d < p d < p . Then g ( z + t u ) − g ( z ) g(z+tu)-g(z) g ( z + t u ) − g ( z ) has degree at most d d d in t t t , and its degree-d d d coefficient in the binomial basis is u d a ( d ) u^d\mathbf{a}^{(d)} u d a ( d ) . Its linear coefficient is u a ( 1 ) u\mathbf{a}^{(1)} u a ( 1 ) plus a value determined by a ( 2 ) , … , a ( d ) , z \mathbf{a}^{(2)},\ldots,\mathbf{a}^{(d)},z a ( 2 ) , … , a ( d ) , z , and u u u .
Proof. The polynomial ( x d ) \binom{x}{d} ( d x ) has degree d d d and leading coefficient 1 / d ! 1/d! 1/ d ! . Substituting x = z + t u x=z+tu x = z + t u multiplies its leading coefficient by u d u^d u d . Since the degree-d d d binomial polynomial in t t t also has leading coefficient 1 / d ! 1/d! 1/ d ! , its coefficient after substitution is u d u^d u d . Terms of smaller degree cannot contribute to it. Finally, the linear input term contributes
( z + t u ) a ( 1 ) − z a ( 1 ) = t u a ( 1 ) , (z+tu)\mathbf{a}^{(1)}-z\mathbf{a}^{(1)}=tu\mathbf{a}^{(1)}, ( z + t u ) a ( 1 ) − z a ( 1 ) = t u a ( 1 ) ,
and every other contribution to the linear coefficient comes from the coefficients of degrees 2 to $d.
Group theory and characters
Lemma 3.7. Every finite abelian group G G G is isomorphic to a direct sum of cyclic groups,
G ≅ ( Z / p 1 α 1 Z ) n 1 × ⋯ × ( Z / p k α k Z ) n k . G \cong(\mathbb{Z}/p_1^{\alpha_1}\mathbb{Z})^{n_1} \times\cdots\times(\mathbb{Z}/p_k^{\alpha_k}\mathbb{Z})^{n_k}. G ≅ ( Z / p 1 α 1 Z ) n 1 × ⋯ × ( Z / p k α k Z ) n k .
Definition 3.8. A character of a finite abelian group G G G is a homomorphism χ : G → C \chi:G\to\mathbb{C} χ : G → C . The dual group G ^ \widehat{G} G is the set of these characters, where the group law is pointwise multiplication, i.e.,
( χ 1 χ 2 ) ( g ) : = χ 1 ( g ) ⋅ χ 2 ( g ) . (\chi_1\chi_2)(g) := \chi_1(g)\cdot\chi_2(g). ( χ 1 χ 2 ) ( g ) := χ 1 ( g ) ⋅ χ 2 ( g ) .
Lemma 3.9. Let G G G be a finite abelian group. Then, G ^ ≅ G \widehat{G}\cong G G ≅ G . Further, G ^ ^ \widehat{\widehat{G}} G is canonically isomorphic to G G G , that is, there is an isomorphism G → G ^ ^ G\to\widehat{\widehat{G}} G → G that can be defined without fixing a generator.
We write this canonical isomorphism as g → χ g g\to\chi_g g → χ g , for g ∈ G g\in G g ∈ G .
Definition 3.10. For H ≤ G H\leq G H ≤ G , its annihilator in G ^ \widehat{G} G is
H ⊥ = { χ ∈ G ^ : χ ( h ) = 1 for every h ∈ H } . H^\perp=\{\chi\in\widehat{G}:\chi(h)=1\text{ for every }h\in H\}. H ⊥ = { χ ∈ G : χ ( h ) = 1 for every h ∈ H } .
Lemma 3.11. Let N ≥ 1 N \ge1 N ≥ 1 be an integer. Then the number of positive divisors of N N N satisfies
# { g ≥ 1 : g ∣ N } = N o ( 1 ) . \#\{g \ge1 : g \mid N\} = N^{o(1)}. # { g ≥ 1 : g ∣ N } = N o ( 1 ) . Proof. We will show that for every fixed constant c > 0 c > 0 c > 0 , we have that
# { g ≥ 1 : g ∣ N } = O ( N c ) ( N → ∞ ) . \#\{g \ge1 : g \mid N\} = O(N^c) \qquad(N \to\infty). # { g ≥ 1 : g ∣ N } = O ( N c ) ( N → ∞ ) . Let c > 0 c > 0 c > 0 be an arbitrary constant. Write N = ∏ i = 1 k p i α i N = \prod_{i=1}^{k} p_i^{\alpha_i} N = ∏ i = 1 k p i α i , where the p i p_i p i are distinct primes and α i ≥ 1 \alpha_i \ge1 α i ≥ 1 . Then, we have that
# { g ≥ 1 : g ∣ N } = ∏ i = 1 k ( α i + 1 ) . \#\{g \ge1 : g \mid N\} = \prod_{i=1}^{k}(\alpha_i + 1). # { g ≥ 1 : g ∣ N } = i = 1 ∏ k ( α i + 1 ) . If p i c ≥ 2 p_i^c \ge2 p i c ≥ 2 , then α i + 1 ≤ 2 α i ≤ p i c α i \alpha_i + 1 \le2^{\alpha_i} \le p_i^{c\alpha_i} α i + 1 ≤ 2 α i ≤ p i c α i . Only finitely many primes satisfy p i c < 2 p_i^c < 2 p i c < 2 , and for each of them
sup α i ≥ 1 ( α i + 1 ) p i − c α i < ∞ \sup_{\alpha_i \ge1}(\alpha_i + 1)p_i^{-c\alpha_i} < \infty α i ≥ 1 sup ( α i + 1 ) p i − c α i < ∞ because p i c > 1 p_i^c > 1 p i c > 1 . Multiplying these bounds gives ∏ i = 1 k ( α i + 1 ) = O ( N c ) \prod_{i=1}^{k}(\alpha_i + 1) = O(N^c) ∏ i = 1 k ( α i + 1 ) = O ( N c ) .
Our algorithm
In this section, we present our algorithm and its proof of correctness for the dihedral coset problem over Dih ( G ) \operatorname{Dih}(G) Dih ( G ) , for a general abelian group G G G equipped with the necessary computational subroutines. We later specialize to the case G = ( Z / q Z ) n G = (\mathbb{Z}/q\mathbb{Z})^n G = ( Z / q Z ) n .
Black-box group model. We assume that we have black-box access to the group, i.e., every group element is identified by a unique string (of length O ( log ∣ G ∣ ) O(\log|G|) O ( log ∣ G ∣ ) , say), and we are given access to an oracle that performs the group operation. Further, we are given a set of generators for G G G . Cheung and Mosca [9 ] give an algorithm that, given black-box access to G G G as described above, computes a cyclic decomposition of G G G as in Lemma 3.7 . Therefore, we assume without loss of generality that we have efficient algorithms that compute the forward and inverse maps for the cyclic decomposition isomorphism
G ≅ ( Z / p 1 α 1 Z ) n 1 × ⋯ × ( Z / p k α k Z ) n k . G \cong(\mathbb{Z}/p_1^{\alpha_1}\mathbb{Z})^{n_1} \times\cdots\times(\mathbb{Z}/p_k^{\alpha_k}\mathbb{Z})^{n_k}. G ≅ ( Z / p 1 α 1 Z ) n 1 × ⋯ × ( Z / p k α k Z ) n k .
This allows us to work with quotient groups and characters of the group easily, so for our purposes, we are effectively working with the explicit cyclic decomposition group on the right hand side of the above equation. Nevertheless, we will write the rest of this section in terms of general groups to avoid keeping track of multiple indices, and keep the notation as simple as possible. For the relevant group theory background, please see § 3.3 , and for a more elementary presentation, please refer to § 2 .
Notation 4.1. For a prime p p p , a finite abelian group G G G , s ∈ G s \in G s ∈ G , and function f : F p → G ^ f : \mathbb{F}_p \to\widehat{G} f : F p → G , we define
∣ φ G f , s ⟩ : = 1 p ∑ x ∈ F p χ s ( f ( x ) ) ∣ x ⟩ . \lvert\varphi_G^{f,s}\rangle:= \frac{1}{\sqrt{p}}\sum_{x \in\mathbb{F}_p}\chi_s(f(x))\lvert x\rangle. ∣ φ G f , s ⟩ := p 1 x ∈ F p ∑ χ s ( f ( x )) ∣ x ⟩ . Here χ s \chi_s χ s is a character of G ^ \widehat{G} G . We call ( f , ∣ φ G f , s ⟩ ) (f,\lvert\varphi_G^{f,s}\rangle) ( f , ∣ φ G f , s ⟩) a p p p -ary Fourier sample. If p = 2 p = 2 p = 2 , we will ignore global phase, and also call f ( 1 ) − f ( 0 ) f(1)-f(0) f ( 1 ) − f ( 0 ) ,
∣ 0 ⟩ + χ s ( f ( 1 ) − f ( 0 ) ) ∣ 1 ⟩ 2 \frac{\lvert0\rangle+\chi_s(f(1)-f(0))\lvert1\rangle}{\sqrt{2}} 2 ∣ 0 ⟩ + χ s ( f ( 1 ) − f ( 0 )) ∣ 1 ⟩ a binary Fourier sample.
When G = Z q n G = \mathbb{Z}_q^n G = Z q n , the character χ s \chi_s χ s can be chosen to be χ s ( a ) = ω q ⟨ s , a ⟩ \chi_s(a) = \omega_q^{\langle s,a\rangle} χ s ( a ) = ω q ⟨ s , a ⟩ for every a ∈ Z q n a \in\mathbb{Z}_q^n a ∈ Z q n .
Preparing Fourier samples
Lemma 4.2. Let G G G be a finite abelian group and let s , x ∈ G s, x \in G s , x ∈ G be arbitrary. Applying a Fourier transform over G G G to the second register of the quantum state 1 2 ( ∣ 0 , x ⟩ + ∣ 1 , x + s ⟩ ) \frac{1}{\sqrt{2}}(|0,x\rangle+ |1,x+s\rangle) 2 1 ( ∣0 , x ⟩ + ∣1 , x + s ⟩) and measuring it gives a uniformly random Fourier label a ∈ G ^ a \in\widehat{G} a ∈ G as the measurement outcome and the corresponding binary Fourier sample
1 2 ( ∣ 0 ⟩ + χ s ( a ) ∣ 1 ⟩ ) (4) \frac{1}{\sqrt{2}}(|0\rangle+\chi_s(a)|1\rangle) \tag*{(4)} 2 1 ( ∣0 ⟩ + χ s ( a ) ∣1 ⟩) (4) as the residual quantum state.
Proof. Use the Fourier transform convention ∣ y ⟩ ↦ ∣ G ∣ − 1 / 2 ∑ a ∈ G ^ χ y ( a ) ∣ a ⟩ |y\rangle\mapsto|G|^{-1/2}\sum_{a\in\widehat{G}}\chi_y(a)|a\rangle ∣ y ⟩ ↦ ∣ G ∣ − 1/2 ∑ a ∈ G χ y ( a ) ∣ a ⟩ . Since χ x + s ( a ) = χ x ( a ) χ s ( a ) \chi_{x+s}(a)=\chi_x(a)\chi_s(a) χ x + s ( a ) = χ x ( a ) χ s ( a ) , applying this transform to the second register gives
1 2 ∣ G ∣ ∑ a ∈ G ^ χ x ( a ) ( ∣ 0 ⟩ + χ s ( a ) ∣ 1 ⟩ ) ∣ a ⟩ . \frac{1}{\sqrt{2|G|}}\sum_{a\in\widehat{G}}\chi_x(a)(|0\rangle+\chi_s(a)|1\rangle)|a\rangle. 2∣ G ∣ 1 a ∈ G ∑ χ x ( a ) ( ∣0 ⟩ + χ s ( a ) ∣1 ⟩) ∣ a ⟩ .
Thus every label is measured with probability 1 / ∣ G ∣ 1/|G| 1/∣ G ∣ . After measurement, the factor χ x ( a ) \chi_x(a) χ x ( a ) is a global phase of the qubit and can be ignored, leaving the state in (4) .
Lemma 4.3. Let p p p be a prime, H H H be a finite abelian group, and fix s ∈ H s \in H s ∈ H . There is a quantum procedure that takes O ( p ) O(p) O ( p ) binary Fourier samples of the form ( a , ∣ 0 ⟩ + χ s ( a ) ∣ 1 ⟩ 2 ) \left(a,\frac{|0\rangle+\chi_s(a)|1\rangle}{\sqrt{2}}\right) ( a , 2 ∣0 ⟩ + χ s ( a ) ∣1 ⟩ ) and outputs a p p p -ary Fourier sample ( f , ∣ φ H f , s ⟩ ) \left(f,|\varphi_H^{f,s}\rangle\right) ( f , ∣ φ H f , s ⟩ ) , for some f : F p → H ^ f:\mathbb{F}_p\to\widehat{H} f : F p → H , f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 . If the binary Fourier labels are i.i.d. uniformly random, f f f is a uniformly random function. The procedure runs in time polynomial in p p p and the group-operation cost, and succeeds with probability Ω ( 1 ) \Omega(1) Ω ( 1 ) .
Proof. Collect ℓ \ell ℓ binary Fourier samples, with labels a 1 , … , a ℓ a_1,\ldots,a_\ell a 1 , … , a ℓ . Their joint state is
2 − ℓ / 2 ∑ b ∈ { 0 , 1 } ℓ χ s ( ∑ i = 1 ℓ b i a i ) ∣ b ⟩ . 2^{-\ell/2}\sum_{\mathbf b\in\{0,1\}^{\ell}}\chi_s\left(\sum_{i=1}^{\ell}b_i a_i\right)|\mathbf b\rangle. 2 − ℓ /2 b ∈ { 0 , 1 } ℓ ∑ χ s ( i = 1 ∑ ℓ b i a i ) ∣ b ⟩ .
We will partition { 0 , 1 } ℓ \{0,1\}^{\ell} { 0 , 1 } ℓ into components of size ℓ + 1 \ell+1 ℓ + 1 , measure the component label, and retain p p p strings from that component.
It is tempting to take ℓ = ⌈ log 2 p ⌉ \ell=\lceil\log_2 p\rceil ℓ = ⌈ log 2 p ⌉ and take a single component corresponding to the binary encodings of 0 , … , p − 1 0,\ldots,p-1 0 , … , p − 1 . This succeeds with probability p / 2 ℓ ≥ 1 / 2 p/2^\ell\geq1/2 p / 2 ℓ ≥ 1/2 , but the resulting values of f f f are sums of only ℓ \ell ℓ random input labels and therefore cannot be independently uniformly random. Instead, we will take ℓ = 2 ⌈ log 2 p ⌉ − 1 \ell=2^{\lceil\log_2 p\rceil}-1 ℓ = 2 ⌈ l o g 2 p ⌉ − 1 , and our partition will be such that each component consists of a “central” bit string c \mathbf c c and all the bit strings of Hamming distance 1 1 1 from it, i.e., c + 1 i \mathbf c+\mathbf1_i c + 1 i , for i ∈ [ ℓ ] i\in[\ell] i ∈ [ ℓ ] . Relative to the center’s phase, the labels on these ℓ \ell ℓ neighbors are independently uniform.
Our centers will be the vectors in the right kernel of the matrix M ∈ F 2 ⌈ log 2 p ⌉ × ℓ M\in\mathbb{F}_2^{\lceil\log_2 p\rceil\times\ell} M ∈ F 2 ⌈ l o g 2 p ⌉ × ℓ whose columns are all the nonzero vectors of length ⌈ log 2 p ⌉ \lceil\log_2 p\rceil ⌈ log 2 p ⌉ . The image of every other string is nonzero and therefore matches exactly one column; flipping the bit corresponding to that column changes the result to zero. Thus every string is either a center or has Hamming distance 1 1 1 from a unique center. Therefore, we can collapse the state to a single component by measuring the nearest center c \mathbf c c , and then we can relabel c ↦ 0 \mathbf c\mapsto0 c ↦ 0 and c + 1 i ↦ i \mathbf c+\mathbf1_i\mapsto i c + 1 i ↦ i . The resulting state is a uniform superposition over ℓ + 1 \ell+1 ℓ + 1 branches, which we then project to labels in F p \mathbb{F}_p F p . This succeeds with probability p / ( ℓ + 1 ) ≥ 1 / 2 p/(\ell+1)\geq1/2 p / ( ℓ + 1 ) ≥ 1/2 , resulting in the state, up to global phase, 1 p ∑ x ∈ F p χ s ( f ( x ) ) ∣ x ⟩ \frac{1}{\sqrt{p}}\sum_{x\in\mathbb{F}_p}\chi_s(f(x))|x\rangle p 1 ∑ x ∈ F p χ s ( f ( x )) ∣ x ⟩ , where f ( x ) = ( − 1 ) c x a x f(x)=(-1)^{c_x}a_x f ( x ) = ( − 1 ) c x a x for x ≠ 0 x\ne0 x = 0 , and f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 . Since the a i a_i a i ’s are uniformly random, we have that f f f is uniformly random among functions with f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 . The success probability does not depend on the input labels or s s s : every branch has the same magnitude. Thus failed attempts can be discarded and replaced with fresh inputs, and the expected number of binary samples per output is ℓ ( ℓ + 1 ) / p < 4 p \ell(\ell+1)/p<4p ℓ ( ℓ + 1 ) / p < 4 p .
Lemma 4.4. Let p p p be a prime, H H H be a finite abelian group, and fix s ∈ H s\in H s ∈ H . There is a quantum procedure that takes a p p p -ary Fourier sample ( f , ∣ φ H f , s ⟩ ) \left(f,\lvert\varphi_H^{f,s}\rangle\right) ( f , ∣ φ H f , s ⟩ ) and outputs a binary Fourier sample ( a , ∣ 0 ⟩ + χ s ( a ) ∣ 1 ⟩ 2 ) \left(a,\frac{\lvert0\rangle+\chi_s(a)\lvert1\rangle}{\sqrt{2}}\right) ( a , 2 ∣ 0 ⟩ + χ s ( a ) ∣ 1 ⟩ ) . If the function f f f is uniformly random conditioned on f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 , then a a a is uniformly random. The procedure runs in time polynomial in p p p and the group-operation cost, and succeeds with probability ≥ 2 / 3 \ge2/3 ≥ 2/3 .
Proof. Partition F p \mathbb{F}_p F p into fixed pairs, for instance { ( 0 , 1 ) , ( 2 , 3 ) , … } \{(0,1),(2,3),\ldots\} {( 0 , 1 ) , ( 2 , 3 ) , … } , leaving one index unpaired if p p p is odd. We measure the pair index to collapse the state to be supported only on a single pair. (We declare failure if the outcome is the unpaired index.) This succeeds with probability 1 1 1 for p = 2 p=2 p = 2 and ( p − 1 ) / p ≥ 2 / 3 (p-1)/p\ge2/3 ( p − 1 ) / p ≥ 2/3 for odd p p p , independently of f f f and s s s . If the measured pair is { x , y } \{x,y\} { x , y } , we can relabel x ↦ 0 x\mapsto0 x ↦ 0 , y ↦ 1 y\mapsto1 y ↦ 1 . After ignoring the common phase χ s ( f ( x ) ) \chi_s(f(x)) χ s ( f ( x )) , the normalized state is ∣ 0 ⟩ + χ s ( f ( y ) − f ( x ) ) ∣ 1 ⟩ 2 \frac{\lvert0\rangle+\chi_s(f(y)-f(x))\lvert1\rangle}{\sqrt{2}} 2 ∣ 0 ⟩ + χ s ( f ( y ) − f ( x )) ∣ 1 ⟩ . The procedure outputs the classical label a = f ( y ) − f ( x ) a=f(y)-f(x) a = f ( y ) − f ( x ) ; and when f f f is uniform (subject to f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 ), f ( y ) − f ( x ) f(y)-f(x) f ( y ) − f ( x ) is uniform as well.
A state combination procedure
Lemma 4.5. Let H H H be a finite abelian group. Given ℓ \ell ℓ p p p -ary Fourier samples with fixed secret s ∈ H s\in H s ∈ H and arbitrary known labels f 1 , … , f ℓ : F p → H ^ f_1,\ldots,f_\ell:\mathbb{F}_p\to\widehat{H} f 1 , … , f ℓ : F p → H , and a nonzero vector u ∈ F p ℓ \mathbf{u}\in\mathbb{F}_p^\ell u ∈ F p ℓ , there is a quantum procedure that measures a uniformly random coset of ⟨ u ⟩ ≤ F p ℓ \langle\mathbf{u}\rangle\le\mathbb{F}_p^\ell ⟨ u ⟩ ≤ F p ℓ and outputs a p p p -ary Fourier sample with label
g ( t ) = ∑ i = 1 ℓ ( f i ( z i + t u i ) − f i ( z i ) ) , (5) g(t)=\sum_{i=1}^{\ell}\left(f_i(z_i+tu_i)-f_i(z_i)\right), \tag*{(5)} g ( t ) = i = 1 ∑ ℓ ( f i ( z i + t u i ) − f i ( z i ) ) , (5) along with a representative z z z of the measured coset. The representative is chosen by any fixed efficient rule that depends only on u \mathbf{u} u and the coset. The procedure runs in time poly ( ℓ , p , log ∣ H ∣ ) \operatorname{poly}(\ell,p,\log|H|) poly ( ℓ , p , log ∣ H ∣ ) .
Proof. Given the joint input state 1 p ℓ / 2 ∑ x ∈ F p ℓ χ s ( ∑ i = 1 ℓ f i ( x i ) ) ∣ x ⟩ \frac{1}{p^{\ell/2}}\sum_{x\in\mathbb{F}_p^\ell}\chi_s\left(\sum_{i=1}^{\ell}f_i(x_i)\right)\lvert x\rangle p ℓ /2 1 ∑ x ∈ F p ℓ χ s ( ∑ i = 1 ℓ f i ( x i ) ) ∣ x ⟩ , we coherently compute and measure which coset of ⟨ u ⟩ \langle\mathbf{u}\rangle ⟨ u ⟩ contains the index vector x x x , collapsing to a superposition on that coset. Each coset contains p p p orthogonal basis vectors of magnitude p − ℓ / 2 p^{-\ell/2} p − ℓ /2 , so each coset occurs with probability p 1 − ℓ p^{1-\ell} p 1 − ℓ . Every vector in the measured coset is of the form z + t u z+t\mathbf{u} z + t u for a unique t t t , and the remaining state is
1 p ∑ t ∈ F p χ s ( ∑ i = 1 ℓ f i ( z i + t u i ) ) ∣ z + t u ⟩ . \frac{1}{\sqrt{p}}\sum_{t\in\mathbb{F}_p}\chi_s\left(\sum_{i=1}^{\ell}f_i(z_i+tu_i)\right)\lvert z+t\mathbf{u}\rangle. p 1 t ∈ F p ∑ χ s ( i = 1 ∑ ℓ f i ( z i + t u i ) ) ∣ z + t u ⟩ .
We then reversibly relabel ∣ z + t u ⟩ ↦ ∣ t ⟩ \lvert z+t\mathbf{u}\rangle\mapsto\lvert t\rangle ∣ z + t u ⟩ ↦ ∣ t ⟩ , so that the relative phase of ∣ t ⟩ \lvert t\rangle ∣ t ⟩ with respect to ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ is χ s ( g ( t ) ) \chi_s(g(t)) χ s ( g ( t )) in (5) , with g ( 0 ) = 0 g(0)=0 g ( 0 ) = 0 . Computing the coset label, relabeling its p p p vectors, and computing the truth table of g g g take time polynomial in ℓ \ell ℓ , p p p , and log ∣ H ∣ \log|H| log ∣ H ∣ .
Lemma 4.6. Let f 1 , … , f ℓ , g f_1,\ldots,f_\ell,g f 1 , … , f ℓ , g be functions as in Lemma 4.5. If f 1 , … , f ℓ f_1,\ldots,f_\ell f 1 , … , f ℓ are i.i.d. uniformly random functions that vanish on 0 0 0 , and u \mathbf{u} u is chosen independently, then g g g is a uniformly random function that vanishes on 0 0 0 , even conditioned on u \mathbf{u} u and z z z .
Proof. It is clear that g ( 0 ) = 0 g(0)=0 g ( 0 ) = 0 . Fix u \mathbf{u} u and z \mathbf{z} z . The choice of u \mathbf{u} u is independent of the input functions, and by Lemma 4.5 , z \mathbf{z} z is uniform for every fixed choice of those functions. Thus the posterior on f i f_i f i remains independent and uniform conditioned on u , z \mathbf{u},\mathbf{z} u , z . Choose an index j j j with u j ≠ 0 u_j \ne0 u j = 0 , and fix the other input functions. The contribution of f j f_j f j to g g g is the function t ↦ f j ( z j + t u j ) − f j ( z j ) t \mapsto f_j(z_j+tu_j)-f_j(z_j) t ↦ f j ( z j + t u j ) − f j ( z j ) , which vanishes at 0 0 0 . As t t t ranges over F p \mathbb{F}_p F p , the argument z j + t u j z_j+tu_j z j + t u j ranges over all of F p \mathbb{F}_p F p , and therefore this contribution is uniform. The other functions f i f_i f i , i ≠ j i \ne j i = j contribute a fixed function that also vanishes at 0 0 0 , and this preserves uniformity.
Lemma 4.7. Let f 1 , … , f ℓ , g f_1,\ldots,f_\ell,g f 1 , … , f ℓ , g be functions as in Lemma 4.5 , with f i ( 0 ) = 0 f_i(0)=0 f i ( 0 ) = 0 . Let A ≤ H ^ A \le\widehat{H} A ≤ H , and choose canonical representatives in H ^ \widehat{H} H for each coset of A A A , with 0 0 0 representing A A A . Suppose that the vector u \mathbf{u} u in Lemma 4.5 depends only on the [ f i ] A [f_i]_A [ f i ] A functions. Suppose further that f i − [ f i ] A f_i-[f_i]_A f i − [ f i ] A are i.i.d. uniformly random A A A -valued functions that vanish at 0 0 0 , even conditioned on the entire collection [ f 1 ] A , … , [ f ℓ ] A [f_1]_A,\ldots,[f_\ell]_A [ f 1 ] A , … , [ f ℓ ] A . Then, g − [ g ] A g-[g]_A g − [ g ] A is a uniformly random A A A -valued function that vanishes at 0 0 0 , even conditioned on [ g ] A [g]_A [ g ] A and z \mathbf{z} z . Here [ f i ] A [f_i]_A [ f i ] A and [ g ] A [g]_A [ g ] A apply the chosen representatives pointwise.
Proof. Fix the representative functions [ f 1 ] A , … , [ f ℓ ] A [f_1]_A,\ldots,[f_\ell]_A [ f 1 ] A , … , [ f ℓ ] A . This fixes u \mathbf{u} u , while the functions f i − [ f i ] A f_i-[f_i]_A f i − [ f i ] A remain independent and uniform by assumption. The coset measurement of Lemma 4.5 is uniform even when all the input functions are fixed. We may therefore also condition on its outcome z \mathbf{z} z without changing the distribution of these A A A -valued functions. Substituting f i = [ f i ] A + ( f i − [ f i ] A ) f_i=[f_i]_A+(f_i-[f_i]_A) f i = [ f i ] A + ( f i − [ f i ] A ) into (5) , we have
g ( t ) − [ g ( t ) ] A = ∑ i = 1 ℓ ( ( f i − [ f i ] A ) ( z i + t u i ) − ( f i − [ f i ] A ) ( z i ) ) + ∑ i = 1 ℓ ( [ f i ( z i + t u i ) ] A − [ f i ( z i ) ] A ) − [ g ( t ) ] A . g(t)-[g(t)]_A=\sum_{i=1}^{\ell}\bigl((f_i-[f_i]_A)(z_i+tu_i)-(f_i-[f_i]_A)(z_i)\bigr)
+\sum_{i=1}^{\ell}\bigl([f_i(z_i+tu_i)]_A-[f_i(z_i)]_A\bigr)-[g(t)]_A. g ( t ) − [ g ( t ) ] A = i = 1 ∑ ℓ ( ( f i − [ f i ] A ) ( z i + t u i ) − ( f i − [ f i ] A ) ( z i ) ) + i = 1 ∑ ℓ ( [ f i ( z i + t u i ) ] A − [ f i ( z i ) ] A ) − [ g ( t ) ] A .
The terms involving [ f i ] A [f_i]_A [ f i ] A determine g + A g+A g + A , and hence determine [ g ] A [g]_A [ g ] A . Applying Lemma 4.6 to the A A A -valued functions f i − [ f i ] A f_i-[f_i]_A f i − [ f i ] A shows that the first sum is uniform among A A A -valued functions vanishing at 0 0 0 . The remaining terms form a fixed A A A -valued function: the second sum and [ g ( t ) ] A [g(t)]_A [ g ( t ) ] A represent the same coset, and both vanish at t = 0 t=0 t = 0 . Adding this fixed function to the first sum preserves uniformity.
Modulus reduction
Whenever H ^ / A ≅ F p r \widehat{H}/A \cong\mathbb{F}_p^r H / A ≅ F p r below, we fix such an isomorphism and use it to view a + A a+A a + A as a vector in F p r \mathbb{F}_p^r F p r .
Lemma 4.8. Let f 1 , … , f ℓ , g : F p → H ^ f_1,\ldots,f_\ell,g:\mathbb{F}_p \to\widehat{H} f 1 , … , f ℓ , g : F p → H and u \mathbf{u} u be as in Lemma 4.5 . Suppose that H ^ / A ≅ F p r \widehat{H}/A \cong\mathbb{F}_p^r H / A ≅ F p r for some A ≤ H ^ A \le\widehat{H} A ≤ H , and suppose f i ( x ) + A = ∑ j = 1 d ( x j ) a i ( j ) f_i(x)+A=\sum_{j=1}^{d}\binom{x}{j}\mathbf{a}_i^{(j)} f i ( x ) + A = ∑ j = 1 d ( j x ) a i ( j ) for some degree 1 ≤ d < p 1 \le d < p 1 ≤ d < p and coefficients a i ( j ) ∈ F p r \mathbf{a}_i^{(j)}\in\mathbb{F}_p^r a i ( j ) ∈ F p r . If u \mathbf{u} u satisfies
∑ i = 1 ℓ u i d a i ( d ) = 0 , (6) \sum_{i=1}^{\ell}u_i^d\mathbf{a}_i^{(d)}=0, \tag*{(6)} i = 1 ∑ ℓ u i d a i ( d ) = 0 , (6) then g + A g+A g + A has degree at most d − 1 d-1 d − 1 . That is, there exist b ( 1 ) , … , b ( d − 1 ) ∈ F p r \mathbf{b}^{(1)},\ldots,\mathbf{b}^{(d-1)}\in\mathbb{F}_p^r b ( 1 ) , … , b ( d − 1 ) ∈ F p r such that g ( x ) + A = ∑ j = 1 d − 1 ( x j ) b ( j ) g(x)+A=\sum_{j=1}^{d-1}\binom{x}{j}\mathbf{b}^{(j)} g ( x ) + A = ∑ j = 1 d − 1 ( j x ) b ( j ) .
Proof. By (5) , in F p r \mathbb{F}_p^r F p r we have
g ( t ) + A = ∑ i = 1 ℓ ∑ j = 1 d ( ( z i + t u i j ) − ( z i j ) ) a i ( j ) . g(t)+A=\sum_{i=1}^{\ell}\sum_{j=1}^{d}\left(\binom{z_i+tu_i}{j}-\binom{z_i}{j}\right)a_i^{(j)}. g ( t ) + A = i = 1 ∑ ℓ j = 1 ∑ d ( ( j z i + t u i ) − ( j z i ) ) a i ( j ) .
By Lemma 3.6 , the coefficient of ( t d ) \binom{t}{d} ( d t ) is ∑ i u i d a i ( d ) = 0 \sum_i u_i^d a_i^{(d)}=0 ∑ i u i d a i ( d ) = 0 by (6) . Thus g ( t ) + A g(t)+A g ( t ) + A has degree at most d − 1 d-1 d − 1 . Also g ( 0 ) + A = 0 g(0)+A=0 g ( 0 ) + A = 0 , so its constant term vanishes. For d = 1 d=1 d = 1 , this gives g ( t ) + A = 0 g(t)+A=0 g ( t ) + A = 0 .
Lemma 4.9. Consider the setting of Lemma 4.8 . Suppose that conditioned on degree-d d d coefficients a 1 ( d ) , … , a ℓ ( d ) a_1^{(d)},\ldots,a_\ell^{(d)} a 1 ( d ) , … , a ℓ ( d ) , the lower degree coefficients { a i ( j ) } i ∈ [ ℓ ] , j ∈ [ d − 1 ] \{a_i^{(j)}\}_{i\in[\ell],j\in[d-1]} { a i ( j ) } i ∈ [ ℓ ] , j ∈ [ d − 1 ] are jointly i.i.d. uniformly randomly distributed in F p r \mathbb{F}_p^r F p r . Suppose further that u u u is a (possibly randomized) function of the degree-d d d coefficients a 1 ( d ) , … , a ℓ ( d ) a_1^{(d)},\ldots,a_\ell^{(d)} a 1 ( d ) , … , a ℓ ( d ) and independent of the lower degree coefficients. Then, the output coefficients b ( 1 ) , … , b ( d − 1 ) b^{(1)},\ldots,b^{(d-1)} b ( 1 ) , … , b ( d − 1 ) are jointly i.i.d. uniform, even conditioned on a 1 ( d ) , … , a ℓ ( d ) a_1^{(d)},\ldots,a_\ell^{(d)} a 1 ( d ) , … , a ℓ ( d ) .
Proof. The statement is vacuous for d = 1 d=1 d = 1 , so suppose d ≥ 2 d\ge2 d ≥ 2 . Fix the degree-d d d coefficients and the independent coins used to choose u u u . This fixes a nonzero u u u . We may also fix the measured coset representative z z z : by Lemma 4.5 , its distribution is uniform for every fixed collection of input tables, so this conditioning does not change the distribution of their lower coefficients.
Choose i i i with u i ≠ 0 u_i\ne0 u i = 0 and fix the lower coefficients of every other input. For j < d j<d j < d , the contribution of a i ( j ) a_i^{(j)} a i ( j ) to g ( t ) + A g(t)+A g ( t ) + A is
( ( z i + t u i j ) − ( z i j ) ) a i ( j ) . \left(\binom{z_i+tu_i}{j}-\binom{z_i}{j}\right)a_i^{(j)}. ( ( j z i + t u i ) − ( j z i ) ) a i ( j ) .
By Lemma 3.6 , its coefficient of ( t j ) \binom{t}{j} ( j t ) is u i j a i ( j ) u_i^j a_i^{(j)} u i j a i ( j ) , and it has no terms of higher degree. The fixed degree-d d d terms cancel at degree d d d by (6) . Thus b ( j ) b^{(j)} b ( j ) depends on a i ( j ) , … , a i ( d − 1 ) a_i^{(j)},\ldots,a_i^{(d-1)} a i ( j ) , … , a i ( d − 1 ) , but not on any lower coefficient of the i i i th input.
At degree d − 1 d-1 d − 1 , every contribution to b ( d − 1 ) b^{(d-1)} b ( d − 1 ) except u i d − 1 a i ( d − 1 ) u_i^{d-1}a_i^{(d-1)} u i d − 1 a i ( d − 1 ) is fixed. Since u i d − 1 ≠ 0 u_i^{d-1}\ne0 u i d − 1 = 0 , this output coefficient is uniform, and fixing it also fixes a i ( d − 1 ) a_i^{(d-1)} a i ( d − 1 ) . Now suppose the output coefficients of degrees j + 1 , … , d − 1 j+1,\ldots,d-1 j + 1 , … , d − 1 have been fixed. Working downward in the same way, they fix a i ( j + 1 ) , … , a i ( d − 1 ) a_i^{(j+1)},\ldots,a_i^{(d-1)} a i ( j + 1 ) , … , a i ( d − 1 ) . The only unfixed contribution to b ( j ) b^{(j)} b ( j ) is then u i j a i ( j ) u_i^j a_i^{(j)} u i j a i ( j ) . Since a i ( j ) a_i^{(j)} a i ( j ) is still independent and uniform and u i j ≠ 0 u_i^j\ne0 u i j = 0 , b ( j ) b^{(j)} b ( j ) is uniform even conditioned on all higher output coefficients. Continuing to j = 1 j=1 j = 1 proves joint independence and uniformity.
Lemma 4.10 (Degree-relation routine). Let p p p be prime, r ≥ 1 r\ge1 r ≥ 1 , and 1 ≤ d < p 1\le d<p 1 ≤ d < p , and put g = gcd ( d , p − 1 ) g=\gcd(d,p-1) g = g cd( d , p − 1 ) . Set
ℓ ( p , r , d ) = ( r + 1 ) g ⌈ log 2 ( g + 1 ) ⌉ g g ( g − 1 ) 2 ⌈ log 2 ( g + 1 ) ⌉ . \ell(p,r,d)=(r+1)g^{\lceil\log_2(g+1)\rceil}g^{\frac{g(g-1)}{2}\lceil\log_2(g+1)\rceil}. ℓ ( p , r , d ) = ( r + 1 ) g ⌈ l o g 2 ( g + 1 )⌉ g 2 g ( g − 1 ) ⌈ l o g 2 ( g + 1 )⌉ . The deterministic Ivanyos–Santha algorithm, given any ℓ = ℓ ( p , r , d ) \ell=\ell(p,r,d) ℓ = ℓ ( p , r , d ) vectors a 1 , … , a ℓ ∈ F p r \mathbf{a}_1,\ldots,\mathbf{a}_\ell\in\mathbb{F}_p^r a 1 , … , a ℓ ∈ F p r , runs in time at most T ( p , r , d ) = poly ( ℓ ( p , r , d ) , p ) T(p,r,d)=\operatorname{poly}(\ell(p,r,d),p) T ( p , r , d ) = poly ( ℓ ( p , r , d ) , p ) and finds a nonzero u ∈ F p ℓ \mathbf{u}\in\mathbb{F}_p^\ell u ∈ F p ℓ satisfying
∑ i = 1 ℓ u i d a i = 0. \sum_{i=1}^{\ell}u_i^d\mathbf{a}_i=\mathbf{0}. i = 1 ∑ ℓ u i d a i = 0 . In particular, ℓ ( p , r , 1 ) = r + 1 \ell(p,r,1)=r+1 ℓ ( p , r , 1 ) = r + 1 .
Proof. Apply Theorem 3.4 with n = r n=r n = r . The chosen number of vectors meets its hypothesis, giving the required relation and running time. When d = 1 d=1 d = 1 , we have g = 1 g=1 g = 1 and the formula gives r + 1 r+1 r + 1 vectors. In the degree-reduction procedure, the algorithm inspects only the supplied degree-d d d coefficient vectors. □
Below, ℓ ( p , r , d ) \ell(p,r,d) ℓ ( p , r , d ) and T ( p , r , d ) T(p,r,d) T ( p , r , d ) refer to the routine in Lemma 4.10 .
Lemma 4.11. Let p p p be prime, let r ≥ 1 r \ge1 r ≥ 1 be an integer, H H H be a finite abelian group, and let A ≤ H ^ A \le\widehat{H} A ≤ H with H ^ / A ≅ F p \widehat{H}/A \cong\mathbb{F}_p H / A ≅ F p . There is a Las Vegas quantum procedure that takes as input p p p -ary Fourier samples ( f i , ∣ φ H f i , s ⟩ ) (f_i, \lvert\varphi_H^{f_i,s}\rangle) ( f i , ∣ φ H f i , s ⟩) over H H H with fixed secret s s s and i.i.d. uniformly random functions f i : F p → H ^ f_i:\mathbb{F}_p \to\widehat{H} f i : F p → H that vanish at 0 0 0 , and outputs a p p p -ary Fourier sample ( g , ∣ φ H g , s ⟩ ) (g,\lvert\varphi_H^{g,s}\rangle) ( g , ∣ φ H g , s ⟩) with
g ( t ) + A = t a g(t)+A=ta g ( t ) + A = t a for all t ∈ F p t \in\mathbb{F}_p t ∈ F p , where a ∼ F p r a \sim\mathbb{F}_p^r a ∼ F p r is uniformly random. Further, we have that g ( 0 ) = 0 g(0)=0 g ( 0 ) = 0 , and conditioned on g + A g+A g + A , the values of g ( t ) g(t) g ( t ) for t ≠ 0 t \ne0 t = 0 are independently uniform in the corresponding coset of A A A . The expected number of input samples and time required by the procedure are at most m m m and T ′ T' T ′ respectively, where
m = ∏ d = 2 p − 1 ℓ ( p , r , d ) , and T ′ = O ( p ∏ d = 2 p − 1 ( T ( p , r , d ) + poly ( ℓ ( p , r , d ) , p , r , log ∣ H ∣ ) ) ) . m=\prod_{d=2}^{p-1}\ell(p,r,d), \qquad\text{and} \qquad T'=O\left(p\prod_{d=2}^{p-1}\left(T(p,r,d)+\operatorname{poly}(\ell(p,r,d),p,r,\log|H|)\right)\right). m = d = 2 ∏ p − 1 ℓ ( p , r , d ) , and T ′ = O ( p d = 2 ∏ p − 1 ( T ( p , r , d ) + poly ( ℓ ( p , r , d ) , p , r , log ∣ H ∣ ) ) ) .
Proof. A degree-d d d pass takes samples whose quotient coefficients of degrees d + 1 , … , p − 1 d+1,\ldots,p-1 d + 1 , … , p − 1 have already been cleared, and clears their degree-d d d coefficients. Begin with a supply of fresh original input samples. For d = p − 1 , p − 2 , … , 2 d=p-1,p-2,\ldots,2 d = p − 1 , p − 2 , … , 2 , the degree-d d d pass does the following:
Draw ℓ : = ℓ ( p , r , d ) \ell:= \ell(p,r,d) ℓ := ℓ ( p , r , d ) independent samples ( f i , ∣ φ H f i , s ⟩ ) (f_i,\lvert\varphi_H^{f_i,s}\rangle) ( f i , ∣ φ H f i , s ⟩) , i ∈ [ ℓ ] i \in[\ell] i ∈ [ ℓ ] from the previous pass, and compute the degree-d d d coefficient a i ( d ) a_i^{(d)} a i ( d ) of the functions f i f_i f i modulo A A A :
a i ( d ) = ∑ x = 0 d ( − 1 ) d − x ( d x ) ( f i ( x ) + A ) . a_i^{(d)}=\sum_{x=0}^{d}(-1)^{d-x}\binom{d}{x}(f_i(x)+A). a i ( d ) = x = 0 ∑ d ( − 1 ) d − x ( x d ) ( f i ( x ) + A ) .
Run the degree-d d d relation routine of Lemma 4.10 on these degree-d d d coefficients a 1 ( d ) , … , a ℓ ( d ) a_1^{(d)},\ldots,a_\ell^{(d)} a 1 ( d ) , … , a ℓ ( d ) to get u \mathbf{u} u such that (6) holds.
Apply Lemma 4.5 to the block using u \mathbf{u} u , and provide its output as one sample from the new supply.
Return one sample from the final degree pass. For each t ≠ 0 t \ne0 t = 0 , the pair ( f i ( t ) + A , f i ( t ) − [ f i ( t ) ] A ) (f_i(t)+A, f_i(t)-[f_i(t)]_A) ( f i ( t ) + A , f i ( t ) − [ f i ( t ) ] A ) is uniform in F p r × A \mathbb{F}_p^r \times A F p r × A . These pairs are independent across i i i and t t t . Thus the A A A -valued parts are uniform even after the functions f i f_i f i are fixed modulo A A A , and Lemma 3.5 gives
f i ( t ) + A = ∑ j = 1 p − 1 ( t j ) a i ( j ) , f_i(t)+A=\sum_{j=1}^{p-1}\binom{t}{j}a_i^{(j)}, f i ( t ) + A = j = 1 ∑ p − 1 ( j t ) a i ( j ) ,
where the a i ( j ) a_i^{(j)} a i ( j ) are independent uniform vectors in F p r \mathbb{F}_p^r F p r . Suppose the samples entering a degree-d d d pass have
f i ( t ) + A = ∑ j = 1 d ( t j ) a i ( j ) , (7) f_i(t)+A=\sum_{j=1}^{d}\binom{t}{j}a_i^{(j)}, \tag*{(7)} f i ( t ) + A = j = 1 ∑ d ( j t ) a i ( j ) , (7)
where the a i ( j ) a_i^{(j)} a i ( j ) are independent uniform. The relation returned by the deterministic routine and Lemmas 4.5 and 4.8 give an output sample with
g ( t ) + A = ∑ j = 1 d − 1 ( t j ) b ( j ) . g(t) + A = \sum_{j=1}^{d-1} \binom{t}{j} \mathbf{b}^{(j)}. g ( t ) + A = j = 1 ∑ d − 1 ( j t ) b ( j ) .
The lower output coefficients b ( 1 ) , … , b ( d − 1 ) \mathbf{b}^{(1)},\ldots,\mathbf{b}^{(d-1)} b ( 1 ) , … , b ( d − 1 ) remain uniform, by Lemma 4.9 . Conditional on f i + A f_i + A f i + A , the functions f i − [ f i ] A f_i - [f_i]_A f i − [ f i ] A remain independent uniform. Since u \mathbf{u} u depends only on the functions f i + A f_i + A f i + A , by Lemma 4.7 , we have that g − [ g ] A g - [g]_A g − [ g ] A is uniform even after g + A g + A g + A is fixed. Thus the next pass receives the same uniformity properties.
After the final pass, g ( t ) + A = t a g(t) + A = ta g ( t ) + A = t a with uniform a ∈ F p r \mathbf{a} \in\mathbb{F}_p^r a ∈ F p r , and conditional on g + A g + A g + A , the values g ( t ) − [ g ( t ) ] A g(t) - [g(t)]_A g ( t ) − [ g ( t ) ] A for t ≠ 0 t \ne0 t = 0 are independent uniform in A A A , as required. For p = 2 p = 2 p = 2 , the returned input sample already has these properties.
Each degree-d d d pass consumes exactly ℓ ( p , r , d ) \ell(p,r,d) ℓ ( p , r , d ) outputs from the preceding pass, because its relation routine always returns a valid direction. Multiplying these costs gives m m m original input samples per output. The additional time per pass is at most T ( p , r , d ) T(p,r,d) T ( p , r , d ) plus a polynomial in ℓ ( p , r , d ) \ell(p,r,d) ℓ ( p , r , d ) , p p p , r r r , and log ∣ H ∣ \log|H| log ∣ H ∣ for coefficient computation and state combination. Choose the polynomial term to dominate ℓ ( p , r , d ) \ell(p,r,d) ℓ ( p , r , d ) . The time recurrence then has fewer than p p p degree levels, and summing their costs gives the displayed bound on T ′ T' T ′ . For p = 2 p = 2 p = 2 , both products are empty, so the returned input also meets the bounds.
Lemma 4.12. Let p p p be a prime, let r ≥ 1 r \ge1 r ≥ 1 be an integer, let H H H be a finite abelian group with A ≤ H ^ A \le\widehat{H} A ≤ H such that H ^ / A ≅ F p r \widehat{H}/A \cong\mathbb{F}_p^r H / A ≅ F p r . Let K : = A ⊥ ≅ F p r K := A^\perp\cong\mathbb{F}_p^r K := A ⊥ ≅ F p r . Then, there exists a Las Vegas quantum algorithm that takes as input p p p -ary Fourier samples ( f i , ∣ φ H f i , s ⟩ ) \left(f_i,\lvert\varphi_H^{f_i,s}\rangle\right) ( f i , ∣ φ H f i , s ⟩ ) over H H H with fixed secret s ∈ H s \in H s ∈ H and i.i.d. uniformly random functions f i : F p → H ^ f_i:\mathbb{F}_p \to\widehat{H} f i : F p → H that vanish at 0 0 0 , and outputs a p p p -ary Fourier sample ( g , ∣ φ H / K g , s + K ⟩ ) \left(g,\lvert\varphi_{H/K}^{g,s+K}\rangle\right) ( g , ∣ φ H / K g , s + K ⟩ ) over H / K H/K H / K . Further, g : F p → A g:\mathbb{F}_p \to A g : F p → A is a uniformly random function that vanishes at 0 0 0 . This procedure uses at most m m m input samples in expectation, and runs in time at most T ′ T' T ′ in expectation, where
m = ∏ d = 1 p − 1 ℓ ( p , r , d ) , and T ′ = O ( p ∏ d = 1 p − 1 ( T ( p , r , d ) + poly ( ℓ ( p , r , d ) , p , r , log ∣ H ∣ ) ) ) . m = \prod_{d=1}^{p-1} \ell(p,r,d), \qquad\text{and} \qquad T' = O\left(p\prod_{d=1}^{p-1}\left(T(p,r,d) + \operatorname{poly}(\ell(p,r,d),p,r,\log|H|)\right)\right). m = d = 1 ∏ p − 1 ℓ ( p , r , d ) , and T ′ = O ( p d = 1 ∏ p − 1 ( T ( p , r , d ) + poly ( ℓ ( p , r , d ) , p , r , log ∣ H ∣ ) ) ) .
Proof. Use Lemma 4.11 on disjoint fresh inputs to obtain independent samples ( f i , ∣ φ H f i , s ⟩ ) \left(f_i,\lvert\varphi_H^{f_i,s}\rangle\right) ( f i , ∣ φ H f i , s ⟩ ) for which f i ( t ) + A = t a i f_i(t) + A = ta_i f i ( t ) + A = t a i , with the a i a_i a i independent and uniform in F p r \mathbb{F}_p^r F p r . Collect ℓ ( p , r , 1 ) \ell(p,r,1) ℓ ( p , r , 1 ) such samples and run the degree-1 routine from Lemma 4.10 on these vectors. Combining the states using Lemma 4.5 gives a p p p -ary Fourier sample ( g , ∣ φ H g , s ⟩ ) \left(g,\lvert\varphi_H^{g,s}\rangle\right) ( g , ∣ φ H g , s ⟩ ) such that
g ( t ) + A = t ∑ i = 1 ℓ u i a i = 0. g(t) + A = t\sum_{i=1}^{\ell}u_i a_i = 0. g ( t ) + A = t i = 1 ∑ ℓ u i a i = 0.
Since g ( t ) + A = A g(t) + A = A g ( t ) + A = A and 0 0 0 represents A A A , we have [ g ] A = 0 [g]_A = 0 [ g ] A = 0 and hence g − [ g ] A = g g - [g]_A = g g − [ g ] A = g . By Lemma 4.7 , we have that g g g is uniformly random, conditioned on g ( 0 ) = 0 g(0) = 0 g ( 0 ) = 0 . For every a ∈ A a \in A a ∈ A and k ∈ K = A ⊥ k \in K = A^\perp k ∈ K = A ⊥ , we have χ s + K ( a ) = χ s ( a ) χ K ( a ) = χ s ( a ) \chi_{s+K}(a) = \chi_s(a)\chi_K(a) = \chi_s(a) χ s + K ( a ) = χ s ( a ) χ K ( a ) = χ s ( a ) . Under A ≅ H / K ^ A \cong\widehat{H/K} A ≅ H / K , this gives ∣ φ H g , s ⟩ = ∣ φ H / K g , s + K ⟩ \lvert\varphi_H^{g,s}\rangle= \lvert\varphi_{H/K}^{g,s+K}\rangle ∣ φ H g , s ⟩ = ∣ φ H / K g , s + K ⟩ .
A degree-1 pass uses ℓ ( p , r , 1 ) \ell(p,r,1) ℓ ( p , r , 1 ) outputs of Lemma 4.11 , giving the stated sample bound m m m . The relation routine and final state combination add T ( p , r , 1 ) + poly ( ℓ ( p , r , 1 ) , p , r , log ∣ H ∣ ) T(p,r,1) + \operatorname{poly}(\ell(p,r,1),p,r,\log|H|) T ( p , r , 1 ) + poly ( ℓ ( p , r , 1 ) , p , r , log ∣ H ∣ ) time. Applying the same time recurrence as in Lemma 4.11 and absorbing the fewer than p p p degree levels gives the stated bound T ′ T' T ′ .
Terminal recovery
Lemma 4.13. Let p p p be prime, let r ≥ 1 r \ge1 r ≥ 1 be an integer, and let H H H be a finite abelian group with fixed coordinates H ^ ≅ F p r \widehat{H} \cong\mathbb{F}_p^r H ≅ F p r . For a ∈ H ^ a \in\widehat{H} a ∈ H , write a ∈ F p r a \in\mathbb{F}_p^r a ∈ F p r for its coordinates; the unknown s ∈ H s \in H s ∈ H is represented by s ∈ F p r s \in\mathbb{F}_p^r s ∈ F p r through
χ s ( a ) = ω p ⟨ a , s ⟩ . \chi_s(a) = \omega_p^{\langle a,s\rangle}. χ s ( a ) = ω p ⟨ a , s ⟩ . There is a Las Vegas quantum procedure that takes independent p p p -ary Fourier samples ( f i , ∣ φ H f i , s ⟩ ) \left(f_i, \lvert\varphi_H^{f_i,s}\rangle\right) ( f i , ∣ φ H f i , s ⟩ ) over H H H , where the functions f i : F p → H ^ f_i : \mathbb{F}_p \to\widehat{H} f i : F p → H are i.i.d. uniform and vanish at 0 0 0 , and returns s s s with probability 1 1 1 . Its expected number of input samples is at most m m m , and its expected running time is at most T ′ T' T ′ , where
m = ( r + 2 ) ∏ d = 2 p − 1 ℓ ( p , r , d ) , and T ′ = O ( m poly ( p , r , log ∣ H ∣ ) ∑ d = 2 p − 1 ( ℓ ( p , r , d ) + T ( p , r , d ) ) ) . m = (r+2)\prod_{d=2}^{p-1}\ell(p,r,d), \qquad\text{and} \qquad T' = O\left(m\operatorname{poly}(p,r,\log|H|)\sum_{d=2}^{p-1}\left(\ell(p,r,d)+T(p,r,d)\right)\right). m = ( r + 2 ) d = 2 ∏ p − 1 ℓ ( p , r , d ) , and T ′ = O ( m poly ( p , r , log ∣ H ∣ ) d = 2 ∑ p − 1 ( ℓ ( p , r , d ) + T ( p , r , d ) ) ) .
Proof. Apply Lemma 4.11 with A = { 0 } A=\{0\} A = { 0 } to fresh, disjoint inputs. Each call returns a sample with g ( t ) = t a g(t)=ta g ( t ) = t a , where a a a is uniform in F p r \mathbb{F}_p^r F p r . Its state is
∣ φ H g , s ⟩ = 1 p ∑ t ∈ F p ω p t ⟨ a , s ⟩ ∣ t ⟩ . \lvert\varphi_H^{g,s}\rangle= \frac{1}{\sqrt{p}}\sum_{t\in\mathbb{F}_p}\omega_p^{t\langle a,s\rangle}\lvert t\rangle. ∣ φ H g , s ⟩ = p 1 t ∈ F p ∑ ω p t ⟨ a , s ⟩ ∣ t ⟩ .
An inverse Fourier transform over F p \mathbb{F}_p F p followed by a measurement gives ⟨ a , s ⟩ \langle a,s\rangle ⟨ a , s ⟩ exactly. Calls on disjoint inputs therefore give independent uniform vectors a a a and their corresponding linear equations in s s s . Continue until the obtained vectors a a a span F p r \mathbb{F}_p^r F p r , then solve the equations by Gaussian elimination.
When their current span has dimension j j j , a fresh uniform vector lies outside it with probability 1 − p j − r 1-p^{j-r} 1 − p j − r . Thus the expected number of calls is
∑ j = 0 r − 1 1 1 − p j − r = r + ∑ j = 1 r 1 p j − 1 < r + 2 , \sum_{j=0}^{r-1}\frac{1}{1-p^{j-r}}=r+\sum_{j=1}^{r}\frac{1}{p^j-1}<r+2, j = 0 ∑ r − 1 1 − p j − r 1 = r + j = 1 ∑ r p j − 1 1 < r + 2 ,
since 1 / ( p j − 1 ) ≤ 2 1 − j 1/(p^j-1)\le2^{1-j} 1/ ( p j − 1 ) ≤ 2 1 − j and ∑ j = 1 r 2 1 − j < 2 \sum_{j=1}^{r}2^{1-j}<2 ∑ j = 1 r 2 1 − j < 2 , giving the desired upper bound on the expected sample complexity.
Since each original sample is used in at most one attempt per degree and each final equation uses at least one original sample, the total work is at most the number of original samples times a polynomial in p p p , r r r , log ∣ H ∣ \log|H| log ∣ H ∣ and ∑ d = 2 p − 1 ( ℓ ( p , r , d ) + T ( p , r , d ) ) \sum_{d=2}^{p-1}(\ell(p,r,d)+T(p,r,d)) ∑ d = 2 p − 1 ( ℓ ( p , r , d ) + T ( p , r , d )) , giving the stated expected time bound.
Lemma 4.14. Let p p p be prime, let H H H be a finite abelian group with fixed secret s ∈ H s\in H s ∈ H , and let A ≤ H ^ A\le\widehat{H} A ≤ H . Let t ∈ H t\in H t ∈ H be such that χ t \chi_t χ t is a known, efficiently evaluatable extension of χ s ∣ A \chi_s|_A χ s ∣ A . Define K : = A ⊥ ≤ H ^ K:=A^\perp\le\widehat{H} K := A ⊥ ≤ H , so that K ^ ≅ H ^ / A \widehat{K}\cong\widehat{H}/A K ≅ H / A . Then a deterministic quantum procedure takes as input a p p p -ary Fourier sample ( f , ∣ φ H f , s ⟩ ) \left(f,\lvert\varphi_H^{f,s}\rangle\right) ( f , ∣ φ H f , s ⟩ ) with f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 and χ s ∣ A \chi_s|_A χ s ∣ A , multiplies the phase of ∣ x ⟩ \lvert x\rangle ∣ x ⟩ by χ t ( f ( x ) ) − 1 \chi_t(f(x))^{-1} χ t ( f ( x ) ) − 1 , and outputs a p p p -ary Fourier sample ( g , ∣ φ K g , r ⟩ ) \left(g,\lvert\varphi_K^{g,r}\rangle\right) ( g , ∣ φ K g , r ⟩ ) over K K K , where g : F p → H ^ / A g:\mathbb{F}_p\to\widehat{H}/A g : F p → H / A ,
r = s − t ∈ K , and g ( x ) = f ( x ) + A . r=s-t\in K,\qquad\text{and}\qquad g(x)=f(x)+A. r = s − t ∈ K , and g ( x ) = f ( x ) + A . If f f f is a uniformly random function such that f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 , so is g g g .
Proof. Since χ t \chi_t χ t extends χ s ∣ A \chi_s|_A χ s ∣ A , for every h ∈ A h\in A h ∈ A we have χ s − t ( h ) = χ s ( h ) χ t ( h ) − 1 = 1 \chi_{s-t}(h)=\chi_s(h)\chi_t(h)^{-1}=1 χ s − t ( h ) = χ s ( h ) χ t ( h ) − 1 = 1 . Hence r = s − t r=s-t r = s − t belongs to K = A ⊥ K=A^\perp K = A ⊥ . In particular, χ r \chi_r χ r is trivial on A A A , so its value at f ( x ) f(x) f ( x ) depends only on the coset
g ( x ) = f ( x ) + A g(x)=f(x)+A g ( x ) = f ( x ) + A . The prescribed phase correction therefore changes the state to
1 p ∑ x ∈ F p χ s ( f ( x ) ) χ t ( f ( x ) ) − 1 ∣ x ⟩ = 1 p ∑ x ∈ F p χ r ( g ( x ) ) ∣ x ⟩ = ∣ φ K g , r ⟩ \frac{1}{\sqrt{p}}\sum_{x\in\mathbb{F}_p}\chi_s(f(x))\chi_t(f(x))^{-1}|x\rangle=\frac{1}{\sqrt{p}}\sum_{x\in\mathbb{F}_p}\chi_r(g(x))|x\rangle=\left|\varphi_K^{g,r}\right\rangle p 1 x ∈ F p ∑ χ s ( f ( x )) χ t ( f ( x ) ) − 1 ∣ x ⟩ = p 1 x ∈ F p ∑ χ r ( g ( x )) ∣ x ⟩ = ∣ φ K g , r ⟩
using H ^ / A ≅ K ^ \widehat{H}/A\cong\widehat{K} H / A ≅ K . Since f f f is uniform subject to f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 , the values of g ( x ) = f ( x ) + A g(x)=f(x)+A g ( x ) = f ( x ) + A for x ≠ 0 x\ne0 x = 0 are independent and uniform in H ^ / A \widehat{H}/A H / A .
Putting everything together
We are now ready to describe the main algorithm.
Algorithm 4.15. As input, we are given black-box access to a finite abelian group G G G , and independent coset states 1 2 ( ∣ 0 , x ⟩ + ∣ 1 , x + s ⟩ ) \frac{1}{\sqrt{2}}(|0,x\rangle+|1,x+s\rangle) 2 1 ( ∣0 , x ⟩ + ∣1 , x + s ⟩) , where each x x x is independent and uniform in G G G and s ∈ G s\in G s ∈ G is fixed and unknown. Use the Ivanyos–Santha degree-relation routine from Lemma 4.10 . Then, we describe an algorithm to find s ∈ G s\in G s ∈ G as follows:
Use the Cheung–Mosca algorithm [9 ] to compute an explicit cyclic decomposition of G G G , and fix a chain
G ^ = A 0 ⊃ A 1 ⊃ ⋯ ⊃ A k = { 0 } (8) \widehat{G}=A_0\supset A_1\supset\cdots\supset A_k=\{0\} \tag*{(8)} G = A 0 ⊃ A 1 ⊃ ⋯ ⊃ A k = { 0 } (8) such that A i − 1 / A i ≅ F p i r i A_{i-1}/A_i\cong\mathbb{F}_{p_i}^{r_i} A i − 1 / A i ≅ F p i r i for all i ∈ [ k ] i\in[k] i ∈ [ k ] , where each p i p_i p i is prime and r i ≥ 1 r_i\ge1 r i ≥ 1 .
Initialize χ \chi χ to the unique character on A k = { 0 } A_k=\{0\} A k = { 0 } , that is, χ ( 0 ) = 1 \chi(0)=1 χ ( 0 ) = 1 .
Whenever a fresh binary Fourier sample is needed, apply Lemma 4.2 to a new coset state to obtain the binary Fourier sample ( a , 1 2 ( ∣ 0 ⟩ + χ s ( a ) ∣ 1 ⟩ ) ) \left(a,\frac{1}{\sqrt{2}}(|0\rangle+\chi_s(a)|1\rangle)\right) ( a , 2 1 ( ∣0 ⟩ + χ s ( a ) ∣1 ⟩) ) , where a a a is uniform in G ^ \widehat{G} G .
For i = k , k − 1 , … , 1 i=k,k-1,\ldots,1 i = k , k − 1 , … , 1 , with χ = χ s ∣ A i \chi=\chi_s|_{A_i} χ = χ s ∣ A i at the start of the stage:
(a) Use the explicit cyclic decomposition to find t ∈ G t\in G t ∈ G such that χ t ∣ A i = χ \chi_t|_{A_i}=\chi χ t ∣ A i = χ . Apply Lemma 4.14 to each fresh binary Fourier sample with p = 2 p=2 p = 2 , H = G H=G H = G , A = A i A=A_i A = A i , K = A i ⊥ K=A_i^\perp K = A i ⊥ , and the extension χ t \chi_t χ t . For a sample with label a a a , the lemma’s input function has f ( 0 ) = 0 f(0)=0 f ( 0 ) = 0 and f ( 1 ) = a f(1)=a f ( 1 ) = a : multiply the phase of ∣ 1 ⟩ |1\rangle ∣1 ⟩ by χ t ( a ) − 1 \chi_t(a)^{-1} χ t ( a ) − 1 and replace its label by a + A i a+A_i a + A i . The lemma’s r r r is s − t ∈ A i ⊥ s-t\in A_i^\perp s − t ∈ A i ⊥ , and the corrected samples have independent uniform labels in G ^ / A i \widehat{G}/A_i G / A i .
(b) For j = 1 , … , i − 1 j=1,\ldots,i-1 j = 1 , … , i − 1 , turn binary samples with independent uniform labels in A j − 1 / A i A_{j-1}/A_i A j − 1 / A i into binary samples with independent uniform labels in A j / A i A_j/A_i A j / A i as follows:
i. Use Lemma 4.3 with p = p j p=p_j p = p j , H = A i ⊥ / A j − 1 ⊥ H=A_i^\perp/A_{j-1}^\perp H = A i ⊥ / A j − 1 ⊥ , and secret ( s − t ) + A j − 1 ⊥ (s-t)+A_{j-1}^\perp ( s − t ) + A j − 1 ⊥ to convert the current binary samples into p j p_j p j -ary Fourier samples. Here H ^ ≅ A j − 1 / A i \widehat{H}\cong A_{j-1}/A_i H ≅ A j − 1 / A i .
ii. Apply Lemma 4.12 with p = p j p=p_j p = p j , r = r j r=r_j r = r j , H = A i ⊥ / A j − 1 ⊥ H=A_i^\perp/A_{j-1}^\perp H = A i ⊥ / A j − 1 ⊥ , A = A j / A i A=A_j/A_i A = A j / A i , K = A i ⊥ / A j − 1 ⊥ = A j ⊥ / A j − 1 ⊥ K=A_i^\perp/A_{j-1}^\perp=A_j^\perp/A_{j-1}^\perp K = A i ⊥ / A j − 1 ⊥ = A j ⊥ / A j − 1 ⊥ , and secret ( s − t ) + A j − 1 ⊥ (s-t)+A_{j-1}^\perp ( s − t ) + A j − 1 ⊥ . Indeed, H ^ / A ≅ A j − 1 / A j ≅ F p j r j \widehat{H}/A\cong A_{j-1}/A_j\cong\mathbb{F}_{p_j}^{r_j} H / A ≅ A j − 1 / A j ≅ F p j r j . Use the Ivanyos–Santha routine from Lemma 4.10 for degrees 1 , … , p j − 1 1,\ldots,p_j-1 1 , … , p j − 1 ; at degree one it takes r j + 1 r_j+1 r j + 1 coefficient vectors. The output p j p_j p j -ary samples have independent uniform label functions into A j / A i A_j/A_i A j / A i and secret ( s − t ) + A j ⊥ (s-t)+A_j^\perp ( s − t ) + A j ⊥ over H / K ≅ A i ⊥ / A j ⊥ H/K\cong A_i^\perp/A_j^\perp H / K ≅ A i ⊥ / A j ⊥ .
iii. Use Lemma 4.4 with p = p j p=p_j p = p j , H = A i ⊥ / A j ⊥ H=A_i^\perp/A_j^\perp H = A i ⊥ / A j ⊥ , and secret ( s − t ) + A j ⊥ (s-t)+A_j^\perp ( s − t ) + A j ⊥ to convert the outputs back to binary samples with independent uniform labels in H ^ ≅ A j / A i \widehat{H}\cong A_j/A_i H ≅ A j / A i .
(c) Use Lemma 4.3 with p = p i p=p_i p = p i , H = A i ⊥ / A i − 1 ⊥ H=A_i^\perp/A_{i-1}^\perp H = A i ⊥ / A i − 1 ⊥ , and secret ( s − t ) + A i − 1 ⊥ (s-t)+A_{i-1}^\perp ( s − t ) + A i − 1 ⊥ to convert independent binary samples with uniform labels in H ^ ≅ A i − 1 / A i \widehat{H}\cong A_{i-1}/A_i H ≅ A i − 1 / A i into p i p_i p i -ary Fourier samples. When i = 1 i=1 i = 1 , these binary samples come directly from the character correction in part (a).
(d) Apply Lemma 4.13 with p = p i p=p_i p = p i , r = r i r=r_i r = r i , H = A i ⊥ / A i − 1 ⊥ H=A_i^\perp/A_{i-1}^\perp H = A i ⊥ / A i − 1 ⊥ , secret ( s − t ) + A i − 1 ⊥ (s-t)+A_{i-1}^\perp ( s − t ) + A i − 1 ⊥ , and coordinates H ^ ≅ A i − 1 / A i ≅ F p i r i \widehat{H}\cong A_{i-1}/A_i\cong\mathbb{F}_{p_i}^{r_i} H ≅ A i − 1 / A i ≅ F p i r i . Its output determines the character of A i − 1 / A i A_{i-1}/A_i A i − 1 / A i induced by s − t s-t s − t .
(e) Extend χ \chi χ to A i − 1 A_{i-1} A i − 1 by setting
χ ( a ) = χ t ( a ) χ s − t ( a + A i ) for every a ∈ A i − 1 , \chi(a)=\chi_t(a)\chi_{s-t}(a+A_i) \qquad\text{for every }a\in A_{i-1}, χ ( a ) = χ t ( a ) χ s − t ( a + A i ) for every a ∈ A i − 1 ,
where the second factor is the character recovered in part (d).
Identify s s s from χ = χ s \chi=\chi_s χ = χ s on A 0 = G ^ A_0=\widehat{G} A 0 = G using the explicit cyclic coordinates, and output s s s .
Theorem 4.16. Let G G G be a finite abelian group. Suppose G ^ \widehat{G} G has a chain with effective coordinates
G ^ = A 0 ⊇ A 1 ⊇ ⋯ ⊇ A k = { 0 } , A i − 1 / A i ≅ F p i r i ( i ∈ [ k ] ) , \widehat{G}=A_0\supseteq A_1\supseteq\cdots\supseteq A_k=\{0\}, \qquad A_{i-1}/A_i\cong\mathbb{F}_{p_i}^{r_i}\quad(i\in[k]), G = A 0 ⊇ A 1 ⊇ ⋯ ⊇ A k = { 0 } , A i − 1 / A i ≅ F p i r i ( i ∈ [ k ]) , where each p i p_i p i is prime and r i ≥ 1 r_i\geq1 r i ≥ 1 . For every i i i and 2 ≤ d < p i 2\leq d<p_i 2 ≤ d < p i , use the deterministic degree-d d d relation routine with parameters ℓ ( p i , r i , d ) \ell(p_i,r_i,d) ℓ ( p i , r i , d ) and T ( p i , r i , d ) T(p_i,r_i,d) T ( p i , r i , d ) from Lemma 4.10 . Then, with probability at least Ω ( 1 ) \Omega(1) Ω ( 1 ) , Algorithm 4.15 solves the generalized dihedral coset problem over dih ( G ) \operatorname{dih}(G) dih ( G ) with at most m m m samples and T T T time, where
m = O ( ∏ i = 1 k ( 8 p i ( r i + 1 ) ∏ d = 2 p i − 1 ℓ ( p i , r i , d ) ) ) , and m=O\left(\prod_{i=1}^{k}\left(8p_i(r_i+1)\prod_{d=2}^{p_i-1}\ell(p_i,r_i,d)\right)\right),\qquad\text{and} m = O ( i = 1 ∏ k ( 8 p i ( r i + 1 ) d = 2 ∏ p i − 1 ℓ ( p i , r i , d ) ) ) , and T = O ( m poly ( log ( m ∣ G ∣ ) , ∑ i = 1 k ( p i + ∑ d = 2 p i − 1 ( ℓ ( p i , r i , d ) + T ( p i , r i , d ) ) ) ) ) . T=O\left(m\operatorname{poly}\left(\log(m|G|),\sum_{i=1}^{k}\left(p_i+\sum_{d=2}^{p_i-1}\left(\ell(p_i,r_i,d)+T(p_i,r_i,d)\right)\right)\right)\right). T = O ( m poly ( log ( m ∣ G ∣ ) , i = 1 ∑ k ( p i + d = 2 ∑ p i − 1 ( ℓ ( p i , r i , d ) + T ( p i , r i , d ) ) ) ) ) .
Proof. The explicit cyclic decomposition supplies the subgroup, quotient, and character operations needed in the algorithm. Each quotient A i − 1 / A i A_{i-1}/A_i A i − 1 / A i has order p i r i ≥ 2 p_i^{r_i}\geq2 p i r i ≥ 2 , so the chain has k ≤ log 2 ∣ G ∣ k\leq\log_2|G| k ≤ log 2 ∣ G ∣ levels. By Lemma 4.2 , Step 3 turns each fresh coset state into a binary Fourier sample with a uniform label in G ^ \widehat{G} G .
We claim that the algorithm maintains the following invariant: at the start of stage i i i in the Step 4 loop, we have that χ = χ s ∣ A i \chi=\chi_s|_{A_i} χ = χ s ∣ A i . We prove this by induction. The base case i = k i=k i = k , when χ \chi χ is initialized in Step 2, holds since the unique character on A k = { 0 } A_k=\{0\} A k = { 0 } is χ s ∣ A k \chi_s|_{A_k} χ s ∣ A k .
By the induction hypothesis, suppose that at the start of stage i i i in Step 4, we have that χ = χ s ∣ A i \chi=\chi_s|_{A_i} χ = χ s ∣ A i . The explicit cyclic decomposition isomorphism allows us to find some t ∈ G t\in G t ∈ G such that χ t ∣ A i = χ \chi_t|_{A_i}=\chi χ t ∣ A i = χ . Hence s − t ∈ A i ⊥ s-t\in A_i^\perp s − t ∈ A i ⊥ .
Step 4(a). Correcting for the recovered parts of s s s . Applying Lemma 4.14 in Step 4(a) with p = 2 p=2 p = 2 to fresh binary samples gives independent samples with secret s − t s-t s − t and uniform labels in G ^ / A i \widehat{G}/A_i G / A i .
Step 4(b). Modulus reduction from A 0 : = G ^ A_0:=\widehat{G} A 0 := G to A i − 1 A_{i-1} A i − 1 . At the start of pass j j j in Step 4(b), the binary labels are independent and uniform in A j − 1 / A i A_{j-1}/A_i A j − 1 / A i . By Lemma 4.3 , they give p j p_j p j -ary samples over A i ⊥ / A j − 1 ⊥ A_i^\perp/A_{j-1}^\perp A i ⊥ / A j − 1 ⊥ with independent uniform label functions, with at most 4 p j 4p_j 4 p j binary Fourier samples in expectation per output. In Step 4(b)(ii), for the current group H = A i ⊥ / A j − 1 ⊥ H = A_i^{\perp}/A_{j-1}^{\perp} H = A i ⊥ / A j − 1 ⊥ , the subgroup A = A j / A i A = A_j/A_i A = A j / A i satisfies H ^ / A ≅ A j − 1 / A j ≅ F p j r j \widehat{H}/A \cong A_{j-1}/A_j \cong\mathbb{F}_{p_j}^{r_j} H / A ≅ A j − 1 / A j ≅ F p j r j , and K = A ⊥ = A j ⊥ / A j − 1 ⊥ K = A^{\perp} = A_j^{\perp}/A_{j-1}^{\perp} K = A ⊥ = A j ⊥ / A j − 1 ⊥ . The Ivanyos–Santha routine from Lemma 4.10 finds a nonzero degree-one relation among r j + 1 r_j + 1 r j + 1 coefficient vectors. Thus Lemma 4.12 gives a p j p_j p j -ary sample over H / K ≅ A i ⊥ / A j ⊥ H/K \cong A_i^{\perp}/A_j^{\perp} H / K ≅ A i ⊥ / A j ⊥ with secret ( s − t ) + A j ⊥ (s-t) + A_j^{\perp} ( s − t ) + A j ⊥ and a uniform label function into A j / A i A_j/A_i A j / A i . It uses at most
( r j + 1 ) ∏ d = 2 p j − 1 ℓ ( p j , r j , d ) (r_j+1)\prod_{d=2}^{p_j-1}\ell(p_j,r_j,d) ( r j + 1 ) d = 2 ∏ p j − 1 ℓ ( p j , r j , d )
input p j p_j p j -ary samples. Calls on disjoint fresh inputs give independent outputs. By Lemma 4.4 , a successful conversion of an output of part (ii) gives a binary sample with a uniform label in A j / A i A_j/A_i A j / A i . The conversion succeeds with probability at least 2 / 3 2/3 2/3 , so it uses fewer than two p j p_j p j -ary samples in expectation. Both conversion success probabilities are independent of the labels, so retrying with fresh samples preserves the uniform independent output labels. Combining steps 4(b)(i)–(iii), one binary output of pass j j j costs fewer than 8 p j ( r j + 1 ) ∏ d = 2 p j − 1 ℓ ( p j , r j , d ) 8p_j(r_j+1)\prod_{d=2}^{p_j-1}\ell(p_j,r_j,d) 8 p j ( r j + 1 ) ∏ d = 2 p j − 1 ℓ ( p j , r j , d ) binary inputs from the preceding pass in expectation.
Step 4(c). After pass i − 1 i-1 i − 1 , the binary labels are independent and uniform in A i − 1 / A i A_{i-1}/A_i A i − 1 / A i ; when i = 1 i=1 i = 1 , this follows directly from part (a). By Lemma 4.3 , fewer than 4 p i 4p_i 4 p i such binary samples in expectation give one p i p_i p i -ary sample with a uniform label function.
Step 4(d). The dual of A i ⊥ / A i − 1 ⊥ A_i^{\perp}/A_{i-1}^{\perp} A i ⊥ / A i − 1 ⊥ is A i − 1 / A i ≅ F p i r i A_{i-1}/A_i \cong\mathbb{F}_{p_i}^{r_i} A i − 1 / A i ≅ F p i r i . Thus Lemma 4.13 recovers the character induced by s − t s-t s − t on this quotient with probability 1. It uses at most
( r i + 2 ) ∏ d = 2 p i − 1 ℓ ( p i , r i , d ) (r_i+2)\prod_{d=2}^{p_i-1}\ell(p_i,r_i,d) ( r i + 2 ) d = 2 ∏ p i − 1 ℓ ( p i , r i , d )
p i p_i p i -ary samples in expectation. With Step 4(c), the expected number of binary samples needed after the inner loop is less than 4 p i ( r i + 2 ) ∏ d = 2 p i − 1 ℓ ( p i , r i , d ) 4p_i(r_i+2)\prod_{d=2}^{p_i-1}\ell(p_i,r_i,d) 4 p i ( r i + 2 ) ∏ d = 2 p i − 1 ℓ ( p i , r i , d ) .
Step 4(e). Since s − t ∈ A i ⊥ s-t\in A_i^{\perp} s − t ∈ A i ⊥ , its character is well defined on A i − 1 / A i A_{i-1}/A_i A i − 1 / A i . For every a ∈ A i − 1 a\in A_{i-1} a ∈ A i − 1 , the update in the algorithm therefore gives
χ ( a ) = χ t ( a ) χ s − t ( a + A i ) = χ t ( a ) χ s − t ( a ) = χ s ( a ) . \chi(a)=\chi_t(a)\chi_{s-t}(a+A_i)=\chi_t(a)\chi_{s-t}(a)=\chi_s(a). χ ( a ) = χ t ( a ) χ s − t ( a + A i ) = χ t ( a ) χ s − t ( a ) = χ s ( a ) .
Hence χ = χ s ∣ A i − 1 \chi=\chi_s|_{A_{i-1}} χ = χ s ∣ A i − 1 , as required for the next stage.
Therefore, after stage i = 1 i=1 i = 1 , we know χ s \chi_s χ s on A 0 = G ^ A_0=\widehat{G} A 0 = G . The explicit cyclic decomposition and Lemma 3.9 allow us to find the unique s ∈ G s\in G s ∈ G with this character.
Time and sample complexity. The expected sample costs multiply because each pass combines samples produced by the preceding pass, and summing over recovery stages changes the full product by only a constant factor, giving the stated bound m m m in expectation. The calls to [13 ] and polynomial work per sample give the corresponding expected running time T T T . Aborting runs that exceed sufficiently large constant multiples of these expectations gives the stated time and sample bounds with constant success probability by Markov’s inequality.
Corollary 4.17 (Finite abelian groups of smooth exponent). Let G G G be a finite abelian group whose exponent is B B B -smooth, where B > 2 B>2 B > 2 . Suppose G ^ \widehat{G} G has a chain with effective coordinates G ^ = A 0 ⊇ ⋯ ⊇ A k = { 0 } \widehat{G}=A_0\supseteq\cdots\supseteq A_k=\{0\} G = A 0 ⊇ ⋯ ⊇ A k = { 0 } and A i − 1 / A i ≅ F p i r i A_{i-1}/A_i\cong\mathbb{F}_{p_i}^{r_i} A i − 1 / A i ≅ F p i r i for every i ∈ [ k ] i\in[k] i ∈ [ k ] , where each p i p_i p i is prime and r i ≥ 1 r_i\geq1 r i ≥ 1 . Then, for every 0 < ϵ < 1 0<\epsilon<1 0 < ϵ < 1 , the
generalized dihedral coset problem over dih ( G ) \operatorname{dih}(G) dih ( G ) can be solved with probability at least 1 − ε 1-\varepsilon 1 − ε . Both its sample complexity and running time are at most
poly ( B , log ∣ G ∣ , log 2 ε ) B O ( k B 2 + o ( 1 ) ) ∏ i = 1 k ( 1 + r i ) O ( B 1 + o ( 1 ) ) . \operatorname{poly}\left(B,\log|G|,\log\frac{2}{\varepsilon}\right)B^{O(kB^{2+o(1)})}\prod_{i=1}^{k}(1+r_i)^{O(B^{1+o(1)})}. poly ( B , log ∣ G ∣ , log ε 2 ) B O ( k B 2 + o ( 1 ) ) i = 1 ∏ k ( 1 + r i ) O ( B 1 + o ( 1 ) ) .
Proof. Fix a quotient F p r \mathbb{F}_p^r F p r and a degree d d d , and put g = gcd ( d , p − 1 ) g=\gcd(d,p-1) g = g cd( d , p − 1 ) as in Lemma 4.10 . Since g < p g<p g < p and ⌈ log 2 ( g + 1 ) ⌉ = O ( log p ) \lceil\log_2(g+1)\rceil=O(\log p) ⌈ log 2 ( g + 1 )⌉ = O ( log p ) , its number of input vectors satisfies
ℓ ( p , r , d ) ≤ ( r + 1 ) O ( g log p ) p O ( g 2 log p ) . \ell(p,r,d)\leq(r+1)^{O(g\log p)}p^{O(g^2\log p)}. ℓ ( p , r , d ) ≤ ( r + 1 ) O ( g l o g p ) p O ( g 2 l o g p ) .
This also holds when g = 1 g=1 g = 1 , for which ℓ ( p , r , d ) = r + 1 \ell(p,r,d)=r+1 ℓ ( p , r , d ) = r + 1 .
For each divisor g g g of p − 1 p-1 p − 1 , at most ( p − 1 ) / g (p-1)/g ( p − 1 ) / g degrees have gcd ( d , p − 1 ) = g \gcd(d,p-1)=g g cd( d , p − 1 ) = g , since each such degree is a multiple of g g g . Grouping the factors by this gcd gives
∏ d = 2 p − 1 ℓ ( p , r , d ) ≤ ( r + 1 ) O ( p log p # g ≥ 1 : g ∣ p − 1 ) p O ( p log p ∑ g ∣ p − 1 g ) ≤ ( r + 1 ) O ( p 1 + o ( 1 ) ) p O ( p 2 + o ( 1 ) ) . \begin{aligned}
\prod_{d=2}^{p-1}\ell(p,r,d)\leq(r+1)^{O(p\log p\#{g\geq1:g\mid p-1})}p^{O(p\log p\sum_{g\mid p-1}g)} \\
&\leq(r+1)^{O(p^{1+o(1)})}p^{O(p^{2+o(1)})}.
\end{aligned} d = 2 ∏ p − 1 ℓ ( p , r , d ) ≤ ( r + 1 ) O ( p l o g p # g ≥ 1 : g ∣ p − 1 ) p O ( p l o g p ∑ g ∣ p − 1 g ) ≤ ( r + 1 ) O ( p 1 + o ( 1 ) ) p O ( p 2 + o ( 1 ) ) .
For the second inequality, Lemma 3.11 gives # g ≥ 1 : g ∣ p − 1 = p o ( 1 ) \#{g\geq1:g\mid p-1}=p^{o(1)} # g ≥ 1 : g ∣ p − 1 = p o ( 1 ) , and each divisor is less than p p p , so ∑ g ∣ p − 1 g ≤ p # g ≥ 1 : g ∣ p − 1 \sum_{g\mid p-1}g\leq p\#{g\geq1:g\mid p-1} ∑ g ∣ p − 1 g ≤ p # g ≥ 1 : g ∣ p − 1 . The factor log p \log p log p is absorbed into p o ( 1 ) p^{o(1)} p o ( 1 ) . When p = 2 p=2 p = 2 , the product is empty and the same bound holds.
Multiplying by 8 p ( r + 1 ) 8p(r+1) 8 p ( r + 1 ) preserves the last bound, so Theorem 4.16 bounds the sample complexity by the product of these factors over the chain. Every p i ≤ B p_i\leq B p i ≤ B , giving the stated separate powers of B B B and 1 + r i 1+r_i 1 + r i . The time bound has the same form: T ( p , r , d ) T(p,r,d) T ( p , r , d ) is polynomial in ℓ ( p , r , d ) \ell(p,r,d) ℓ ( p , r , d ) and p p p , and the theorem’s additional polynomial work only changes the absolute constants in these exponents.
Repeating the capped algorithm O ( log ( 2 / ε ) ) O(\log(2/\varepsilon)) O ( log ( 2/ ε )) times and allocating total approximation error at most ε / 2 \varepsilon/2 ε /2 gives the stated success probability and costs.
The vector DCP guarantee follows by taking the subgroup chain that removes one prime factor of q q q at a time.
Corollary 4.18 (Vector DCP over smooth moduli). Let n ≥ 1 n\geq1 n ≥ 1 , let q > 1 q>1 q > 1 be B B B -smooth, and let 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 . A quantum algorithm recovers every s ∈ Z q n s\in\mathbb{Z}_q^n s ∈ Z q n from independent vector DCP samples with probability at least 1 − ε 1-\varepsilon 1 − ε . Both its sample complexity and running time are at most
n O ( B 1 + o ( 1 ) log q ) B O ( B 2 + o ( 1 ) log q ) poly ( log 2 ε ) . n^{O(B^{1+o(1)}\log q)}B^{O(B^{2+o(1)}\log q)}\operatorname{poly}\left(\log\frac{2}{\varepsilon}\right). n O ( B 1 + o ( 1 ) l o g q ) B O ( B 2 + o ( 1 ) l o g q ) poly ( log ε 2 ) . Proof. Write q = ∏ i = 1 k p i q=\prod_{i=1}^{k}p_i q = ∏ i = 1 k p i , with repetition, and take A 0 = Z q n ≅ Z q n A_0=\mathbb{Z}_q^n\cong\mathbb{Z}_q^n A 0 = Z q n ≅ Z q n and A i = ( p 1 ⋯ p i ) A 0 A_i=(p_1\cdots p_i)A_0 A i = ( p 1 ⋯ p i ) A 0 . Then A i − 1 / A i ≅ F p i n A_{i-1}/A_i\cong\mathbb{F}_{p_i}^n A i − 1 / A i ≅ F p i n , the coordinates are given by modular arithmetic, and k ≤ log 2 q k\leq\log_2q k ≤ log 2 q . Apply Corollary 4.17 with r i = n r_i=n r i = n and ∣ G ∣ = q n |G|=q^n ∣ G ∣ = q n . Its product over the chain is at most n O ( B 1 + o ( 1 ) log q ) B O ( B 2 + o ( 1 ) log q ) n^{O(B^{1+o(1)}\log q)}B^{O(B^{2+o(1)}\log q)} n O ( B 1 + o ( 1 ) l o g q ) B O ( B 2 + o ( 1 ) l o g q ) . The polynomial overhead is absorbed into this bound, apart from the stated dependence on ε \varepsilon ε .