QEncodeBench: Can Large Language Models Encode Classical Problems into Verified Quantum Oracles?

Xujun Che, Hanhan Wu, Yuchen Yuan, Chenyang Yu
7/31/2026
1 citation
quant-phcs.LG
benchmark-dataset

Official code: chexujun/QEncodeBench (0 stars, Python, MIT, last commit 2026-07-31).

Abstract

Grover search, amplitude amplification, and quantum counting all rely on the same reusable subroutine, a phase oracle, whose construction the algorithms literature takes as given: the classical predicate is assumed to be already encoded as a correct, resource-bounded circuit. We turn this assumption into a measured capability.

Show full abstract

QEncodeBench tasks large language models (LLMs) with encoding classical constraint problems as phase oracles and scores the generated circuits with an adversarially self-validated verifier that decides full solution-set equivalence up to a global phase, with ancillas restored and resource budgets enforced. Sampled basis-state tests, we show, systematically overestimate this ability. Measured this way, models separate sharply: code models without a reasoning mode solve essentially nothing, and enabling native reasoning on identical weights improves accuracy by an order of magnitude. The failures are overwhelmingly semantic rather than syntactic. Two architectures, a unit-verified constraint agent and a neuro-symbolic compilation pipeline, close most of the remaining gap by delegating correctness-critical composition to deterministic procedures. Ablations quantify the contribution of each component, and resource gating exposes an architecture-dependent trade-off between circuit width and depth. Finally, controlled difficulty escalation reveals architecture-specific responses to difficulty structure: different difficulty axes degrade different methods, while the neuro-symbolic pipeline passes every evaluated instance. Code and data are available at https://github.com/chexujun/QEncodeBench.

View on arXivView PDF

Code Implementations(1)

MIT
00PythonJul 31, 20264 months agoMIT

Similar Papers

Cite this paper

@article{che2026qencodebench,
  title  = {QEncodeBench: Can Large Language Models Encode Classical Problems into Verified Quantum Oracles?},
  author = {Xujun Che and Hanhan Wu and Yuchen Yuan and Chenyang Yu},
  year   = {2026},
  eprint = {2609.20319},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.20319v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.20319.svg)](https://codeofpaper.com/paper/2609.20319)

Discussion