Paper 2026/1446 Original: eprint.iacr.org/2026/1446 ↗

Quantum Circuit Optimization with LLMs under a Structured Guideline

Kyungbae Jang
Hyunji Kim
Hwajeong Seo
Anupam Chattopadhyay
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.
History
2026-08-06: last updated
2026-07-16: published
Short URL
https://ia.cr/2026/1446
License
https://creativecommons.org/licenses/by-nc-sa/4.0/

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, this archive does not use cookies or embedded third party content.