Paper 2026/1446

Quantum Circuit Optimization with LLMs under a Structured Guideline

Kyungbae Jang, Nanyang Technological University
Hyunji Kim, Hansung University
Hwajeong Seo, Hansung University
Anupam Chattopadhyay, Nanyang Technological University
Abstract

The cost of quantum cryptanalysis is dominated by the quantum circuit of the target cipher. Estimating the quantum attack cost of a cipher thus requires building that circuit and measuring its qubit count, Toffoli count, and Toffoli depth. This is manual work that needs expert knowledge and must be redone for each cipher and each cost target. Large language models handle ordinary programming well, but their use in constructing quantum circuits for ciphers is still limited. In this work, we collect quantum circuit optimization techniques that apply across many ciphers. We write these techniques into a guideline for a general-purpose LLM. Given this guideline and a single target cipher, the model produces two circuits. One minimizes the qubit count, and the other minimizes the Toffoli depth. Each circuit is verified against the test vectors of the cipher before its resources are estimated. Using this approach, we implement quantum circuits of CRAFT, MANTIS, QARMA, mCrypton, EPCBC, and Pyjamask for which quantum circuit implementations have not previously been reported. We further apply the same approach to ciphers with existing implementations. Without access to prior results, the generated circuits reach resource counts comparable to manually optimized ones.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Preprint.
Keywords
Quantum ComputingQuantum CircuitQuantum CryptanalysisLarge Language Model
Contact author(s)
starj1023 @ gmail com
khj1594012 @ gmail com
hwajeong84 @ gmail com
anupam @ ntu edu sg
History
2026-08-06: last of 2 revisions
2026-07-16: received
See all versions
Short URL
https://ia.cr/2026/1446
License
Creative Commons Attribution-NonCommercial-ShareAlike
CC BY-NC-SA

BibTeX

@misc{cryptoeprint:2026/1446,
      author = {Kyungbae Jang and Hyunji Kim and Hwajeong Seo and Anupam Chattopadhyay},
      title = {Quantum Circuit Optimization with {LLMs} under a Structured Guideline},
      howpublished = {Cryptology {ePrint} Archive, Paper 2026/1446},
      year = {2026},
      url = {https://eprint.iacr.org/2026/1446}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.