Constant-time hybrid compilation of Shor's algorithm with quantum just-in-time compilation

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ittah, David, Fraser, Jackson, Izaac, Josh, Di Matteo, Olivia
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909582151909376
author Ittah, David
Fraser, Jackson
Izaac, Josh
Di Matteo, Olivia
author_facet Ittah, David
Fraser, Jackson
Izaac, Josh
Di Matteo, Olivia
contents Continuous improvements in quantum computing hardware are exposing the need for simultaneous advances in software. Large-scale implementation of quantum algorithms requires rapid and automated compilation routines such as circuit synthesis and optimization. As systems move towards fault-tolerance, programming frameworks and compilers must also be capable of compiling and optimizing programs comprising both classical and quantum code. This work takes a step in that direction by providing an implementation of Shor's factoring algorithm, compiled to elementary quantum gates using PennyLane and Catalyst, a library for quantum just-in-time (QJIT) compilation of hybrid workflows. We demonstrate that with QJIT compilation, the algorithm is compiled once per bit width of $N$, the integer being factored, even when $N$-specific optimizations are applied to circuit generation based on values determined at runtime. The implementation is benchmarked up to 32-bit $N$, and both the size of the compiled program and the pure compilation time are found to be constant (under 3 seconds on a laptop computer), meaning code generation becomes tractable even for realistic problem sizes.
format Preprint
id arxiv_https___arxiv_org_abs_2504_12449
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Constant-time hybrid compilation of Shor's algorithm with quantum just-in-time compilation
Ittah, David
Fraser, Jackson
Izaac, Josh
Di Matteo, Olivia
Quantum Physics
Continuous improvements in quantum computing hardware are exposing the need for simultaneous advances in software. Large-scale implementation of quantum algorithms requires rapid and automated compilation routines such as circuit synthesis and optimization. As systems move towards fault-tolerance, programming frameworks and compilers must also be capable of compiling and optimizing programs comprising both classical and quantum code. This work takes a step in that direction by providing an implementation of Shor's factoring algorithm, compiled to elementary quantum gates using PennyLane and Catalyst, a library for quantum just-in-time (QJIT) compilation of hybrid workflows. We demonstrate that with QJIT compilation, the algorithm is compiled once per bit width of $N$, the integer being factored, even when $N$-specific optimizations are applied to circuit generation based on values determined at runtime. The implementation is benchmarked up to 32-bit $N$, and both the size of the compiled program and the pure compilation time are found to be constant (under 3 seconds on a laptop computer), meaning code generation becomes tractable even for realistic problem sizes.
title Constant-time hybrid compilation of Shor's algorithm with quantum just-in-time compilation
topic Quantum Physics
url https://arxiv.org/abs/2504.12449