Constant-time hybrid compilation of Shor's algorithm with quantum just-in-time compilation
- URL: http://arxiv.org/abs/2504.12449v1
- Date: Wed, 16 Apr 2025 19:30:10 GMT
- Title: Constant-time hybrid compilation of Shor's algorithm with quantum just-in-time compilation
- Authors: David Ittah, Jackson Fraser, Josh Izaac, Olivia Di Matteo,
- Abstract summary: This work provides an implementation of Shor's factoring algorithm, compiled to elementary quantum gates using PennyLane and Catalyst.<n>We demonstrate that with QJIT compilation, the algorithm is compiled once per bit width of $N$, even when $N$-specific optimizations are applied to circuit generation.<n>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.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: 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.
Related papers
- Quantum Compiling with Reinforcement Learning on a Superconducting Processor [55.135709564322624]
We develop a reinforcement learning-based quantum compiler for a superconducting processor.
We demonstrate its capability of discovering novel and hardware-amenable circuits with short lengths.
Our study exemplifies the codesign of the software with hardware for efficient quantum compilation.
arXiv Detail & Related papers (2024-06-18T01:49:48Z) - One-Time Compilation of Device-Level Instructions for Quantum Subroutines [21.79238078751215]
We develop a device-level partial-compilation (DLPC) technique that reduces compilation overhead to nearly constant.
We execute this modified pipeline on real trapped-ion quantum computers and observe significant reductions in compilation time.
arXiv Detail & Related papers (2023-08-21T15:23:09Z) - A High Performance Compiler for Very Large Scale Surface Code Computations [38.26470870650882]
We present the first high performance compiler for very large scale quantum error correction.
It translates an arbitrary quantum circuit to surface code operations based on lattice surgery.
The compiler can process millions of gates using a streaming pipeline at a speed geared towards real-time operation of a physical device.
arXiv Detail & Related papers (2023-02-05T19:06:49Z) - The Basis of Design Tools for Quantum Computing: Arrays, Decision
Diagrams, Tensor Networks, and ZX-Calculus [55.58528469973086]
Quantum computers promise to efficiently solve important problems classical computers never will.
A fully automated quantum software stack needs to be developed.
This work provides a look "under the hood" of today's tools and showcases how these means are utilized in them, e.g., for simulation, compilation, and verification of quantum circuits.
arXiv Detail & Related papers (2023-01-10T19:00:00Z) - Quantum Clustering with k-Means: a Hybrid Approach [117.4705494502186]
We design, implement, and evaluate three hybrid quantum k-Means algorithms.
We exploit quantum phenomena to speed up the computation of distances.
We show that our hybrid quantum k-Means algorithms can be more efficient than the classical version.
arXiv Detail & Related papers (2022-12-13T16:04:16Z) - Compiler Optimization for Quantum Computing Using Reinforcement Learning [3.610459670994051]
We propose a reinforcement learning framework for developing optimized quantum circuit compilation flows.
The proposed framework is set up with a selection of compilation passes from IBM's Qiskit and Quantinuum's TKET.
It significantly outperforms both individual compilers in 73% of cases regarding the expected fidelity.
arXiv Detail & Related papers (2022-12-08T19:00:01Z) - Compilation of algorithm-specific graph states for quantum circuits [55.90903601048249]
We present a quantum circuit compiler that prepares an algorithm-specific graph state from quantum circuits described in high level languages.
The computation can then be implemented using a series of non-Pauli measurements on this graph state.
arXiv Detail & Related papers (2022-09-15T14:52:31Z) - Efficient parameterised compilation for hybrid quantum programming [0.0]
Near term quantum devices have the potential to outperform classical computing.
These devices use hybrid classical-quantum algorithms such as Variational Eigensolvers.
We have implemented explicit parameters that prevent recompilation of the whole program in Quantum programming framework OpenQL.
arXiv Detail & Related papers (2022-08-16T11:45:08Z) - Arline Benchmarks: Automated Benchmarking Platform for Quantum Compilers [0.0]
Open-source software package, Arline Benchmarks, is designed to perform automated benchmarking of quantum compilers.
We compare several quantum compilation frameworks based on a set of important metrics.
We propose a concept of composite compilation pipeline that combines compiler-specific circuit optimizations in a single compilation stack.
arXiv Detail & Related papers (2022-02-28T18:48:01Z) - An LLVM-based C++ Compiler Toolchain for Variational Hybrid
Quantum-Classical Algorithms and Quantum Accelerators [0.8323133408188051]
This paper presents an LLVM-based C++ compiler toolchain to efficiently execute variational hybrid quantum-classical algorithms.
We introduce a set of extensions to the C++ language for programming these algorithms.
We evaluate the framework's performance by running quantum circuits that prepare Thermofield Double (TFD) states.
arXiv Detail & Related papers (2022-02-22T19:32:50Z) - Enabling Retargetable Optimizing Compilers for Quantum Accelerators via
a Multi-Level Intermediate Representation [78.8942067357231]
We present a multi-level quantum-classical intermediate representation (IR) that enables an optimizing, retargetable, ahead-of-time compiler.
We support the entire gate-based OpenQASM 3 language and provide custom extensions for common quantum programming patterns and improved syntax.
Our work results in compile times that are 1000x faster than standard Pythonic approaches, and 5-10x faster than comparative standalone quantum language compilers.
arXiv Detail & Related papers (2021-09-01T17:29:47Z) - Extending C++ for Heterogeneous Quantum-Classical Computing [56.782064931823015]
qcor is a language extension to C++ and compiler implementation that enables heterogeneous quantum-classical programming, compilation, and execution in a single-source context.
Our work provides a first-of-its-kind C++ compiler enabling high-level quantum kernel (function) expression in a quantum-language manner.
arXiv Detail & Related papers (2020-10-08T12:49:07Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.