Automated Quantum Algorithm Design using a Domain-Specific Language
Amy Rouillard, Matt Lourens, Francesco Petruccione
TL;DR
The paper addresses automatic quantum algorithm design by learning general, scalable algorithm structures rather than fixed unitary implementations. It introduces a domain-specific language (DSL) that encodes quantum circuits via modular motifs and uses neural-architecture-search-inspired evolutionary methods to discover algorithms. The authors successfully rediscover QFT, Deutsch–Jozsa, and Grover from small training circuits, demonstrating that the learned structures generalize to larger $n$-qubit problems with modest computational effort. This approach yields interpretable, scalable algorithm designs and points to broader applications in variational ansätze and quantum many-body wavefunctions.
Abstract
We present a computational method to automatically design the n-qubit realisations of quantum algorithms. Our approach leverages a domain-specific language (DSL) that enables the construction of quantum circuits via modular building blocks, making it well-suited for evolutionary search. In this DSL quantum circuits are abstracted beyond the usual gate-sequence description and scale automatically to any problem size. This enables us to learn the algorithm structure rather than a specific unitary implementation. We demonstrate our method by automatically designing three known quantum algorithms-the Quantum Fourier Transform, the Deutsch-Jozsa algorithm, and Grover's search. Remarkably, we were able to learn the general implementation of each algorithm by considering examples of circuits containing at most 5-qubits. Our method proves robust, as it maintains performance across increasingly large search spaces. Convergence to the relevant algorithm is achieved with high probability and with moderate computational resources.
