← Atlas

Algorithms · Computational number theory

Exponential congruences over a finite field

Given elements a, b, c, f, g of the multiplicative group of a finite field F_q, decide whether the exponential congruence af^x + bg^y = c has a solution in nonnegative integers x and y, and find one if it does. The problem generalizes the discrete logarithm and is connected to the hidden subgroup problem over semidirect product groups.

Attested & literatureUpdated

View frozen graph

  • Record typeLiterature reference
  • Speedup class (secondary source)Polynomial
  • Primary source on the speedupStated by the primary source: "While still superpolynomial in log q, this quantum algorithm is significantly faster than the best known classical algorithm, which has time complexity q^{9/8}(log q)^{O(1)}. Thus it gives an example of a natural problem where quantum algorithms provide about a cubic speed-up over classical ones."
  • Reported costq^(3/8)(log q)^(O(1)) on a quantum computer in the worst case, against q^(9/8)(log q)^(O(1)) for the best known classical algorithm. In the typical case the figures are q^(1/3)(log q)^(O(1)) quantum and q(log q)^(O(1)) classical. A sharper quantum variant runs in q^(1/2)(st)^(−1/4)(log q)^(O(1)) in terms of the multiplicative orders s and t, which the paper bounds above by O(q^(1/8)(log q)^(O(1))).
  • Papers1

A part this method uses, worked through

This page says Shor's algorithm — here is a concrete, runnable instance of it.

Order-finding for 7 mod 15

3 counting qubits, 4 work qubits, finding the order of 7 modulo 15 (the order is 4: 7⁴ mod 15 = 1).

q0q1q2q3q4q5q6XHadamard layer(3)Controlled x7 mod 15Controlled x4 mod 15QFT inverse(3)

Where it ends up

  • 00010006%
  • 00010106%
  • 00011006%
  • 00011106%
  • 12 more outcomes75%

The counting register reads 000, 010, 100 or 110, each equally likely, corresponding to the four powers k = 0, 1, 2, 3 of the order r = 4; the work register ends entangled with the counting outcome, holding one of 1, 7, 4 or 13. Repeating this and applying the continued-fractions step of the full algorithm to a nonzero outcome recovers the order r = 4 exactly.

Open this part in Studio

A part this method uses, worked through

This page says Grover search — here is a concrete, runnable instance of it.

Grover's algorithm finds |101⟩

3 qubits, searching for |101⟩ among 8 states, with 2 Grover iterations.

q0q1q2Hadamard layer(3)Phase oracle(101)Grover diffuser(3)Phase oracle(101)Grover diffuser(3)

Where it ends up

  • 10195%
  • 0001%
  • 1101%
  • 0011%
  • 4 more outcomes3%

Measuring gives 101, the marked state, with high probability.

One of its steps changes only phase: the outcome probabilities stay put while the state does not.

Open this part in Studio

Quantum vs classical

Classical baseline

Compare Computational number theory with the strongest classical method for the same instance, input budget, and output metric.

Quantum claim

This reference exposes a quantum circuit pattern; it does not imply an application-level speedup without a matched benchmark.

How to compare

Report input loading, circuit depth, repetitions, classical preprocessing, post-processing, and wall-clock time together.

References

  • Classical and Quantum Algorithms for Exponential Congruences

    Wim van Dam, Igor E. Shparlinski · 2008

    Primary source, and the source of both the quantum and the classical figures this record compares. Consult it for the character-sum bounds that fix the search box, for the distinction between the worst case and the typical case that produces two different pairs of bounds, and for section 6, where the authors keep efficient solution in time polynomial in log q open — the sentence that stops the cubic speedup from being read as tractability.

Attested & literature
  • Peer-reviewed paper
Method
Curation only. The problem statement was recorded from the literature; the speedup class is checked against the record's own primary paper, which states it; the primary reference's title, authors and submission year were read from its arXiv abs page; the complexity claim was taken from a clause of that paper's abstract (abstract of arXiv:0804.1109: "A quantum algorithm with time com- plexity q^{3/8}(log q)^{O(1)} is presented… this quantum algorithm is significantly faster than the best known classi- cal algorithm, which has time complexity q^{9/8}(log q)^{O(1)}."; section 4.1, Theorem 3: "…in time q^{3/8}(log q)^{O(1)} on a quantum computer."; section 4.2, Theorem 5, for the typical case: "…in time q^{1/3}(log q)^{O(1)} on a quantum computer."; section 3.2, Theorem 2, for the classical typical case: "…in deterministic time q(log q)^{O(1)} on a classical computer."; section 4.1, Theorem 4: "…in time q^{1/2}(st)^{-1/4}(log q)^{O(1)} on a quantum computer," with "the running time of the algorithm of Theorem 4 is upper bounded by O(q^{1/8}(log q)^{O(1)})".). No circuit was constructed, simulated or run.
Result
Pass · the record's problem, speedup class and primary reference agree with the two sources named above.
Caveat
This is a literature record: nothing was constructed, compiled, simulated or run, and no congruence was solved here. The speedup is real and stated by the authors, but it is a speedup between two algorithms that are both superpolynomial in the input size — the input is q written in binary, so log q is the length, and the abstract itself opens the comparison with "While still superpolynomial in log q". Section 5 says the same of every algorithm in the paper, and section 6 keeps efficient solution in time (log q)^(O(1)) open as a problem. So a cubic speedup here does not make the problem tractable, and this record should not be read as one that does. The classical figure is the best known algorithm rather than a proved lower bound. The rigorous subexponential discrete-logarithm algorithms that could sharpen the classical side are, as the paper notes, known only for special fields such as prime fields and binary fields. The elliptic-curve analogue is asserted to follow at the cost of only typographical changes but is not carried out. The bounds are asymptotic with unnamed (log q)^(O(1)) factors, so no gate count, qubit count or constant follows from them.
Classical and Quantum Algorithms for Exponential Congruences ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
Citation metadata only; source publication terms apply
exponential congruencediscrete logarithmcharacter sumsgrover searchfinite field

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.