quantumopt
AI-driven quantum circuit compiler using Graph Neural Networks + Claude LLM — tested on real research circuits
What It Does
quantumopt takes your quantum circuit and returns an optimized version that runs more accurately on IBM quantum hardware — with a plain English explanation you can cite in your paper.
Installation
pip install quantumopt
Usage
from qiskit import QuantumCircuit
from quantumopt import compile
# Your research circuit
qc = QuantumCircuit(5)
qc.h(0)
qc.cx(0, 1)
qc.cx(1, 2)
qc.ry(0.5, 0)
qc.rz(0.3, 1)
# Compile and optimize
result = compile(qc, hardware="ibm_brisbane")
# Results
print(result.depth_reduction) # "31%"
print(result.gate_reduction) # "32%"
print(result.explanation) # Claude-generated report
print(result.optimized_circuit) # Ready to run on IBM
Benchmark Results
Tested on 41 real circuits from QASMbench (published research circuits):
| Metric | quantumopt | Baseline |
|---|---|---|
| Avg depth reduction | 13.2% | 0% |
| Avg gate reduction | 15.2% | 0% |
| Circuits improved | 34/41 | N/A |
| Circuits made worse | 0/41 | N/A |
| Best result | 89% | N/A |
Tested on 10,240 synthetic circuits:
| Metric | Result |
|---|---|
| GNN prediction accuracy (±10%) | 82% |
| GNN prediction accuracy (±20%) | 100% |
| Avg predicted improvement | 64.5% |
Example Explanation Output
When ANTHROPIC_API_KEY is set, quantumopt generates
research-quality explanations:
"Transpilation of the target circuit for IBM Brisbane hardware yielded a 31.6% reduction in circuit depth (128 → 88 layers) and a 31.6% reduction in total gate count (326 → 223 gates). Among the applied optimization passes, merge_rotations contributed most substantially, as consecutive single-qubit rotation gates collapse into single parametrized operations. The resulting reduction in two-qubit gate exposure is particularly consequential for hardware execution, as each eliminated layer directly reduces coherence-time consumption against Brisbane's median T₂ timescales (~100–200 µs)."
How It Works
- Your circuit is encoded as a Directed Acyclic Graph
- A trained GNN (82% accuracy) predicts optimization potential and recommends optimization actions
- Qiskit transpiler optimizes for target hardware
- Claude generates a hardware-specific explanation you can cite in your paper
Supported Algorithms
VQE, QAOA, QFT, Grover, GHZ, Bernstein-Vazirani, Deutsch-Jozsa, Amplitude Estimation, Phase Estimation
Supported Hardware
- IBM Brisbane (default)
- More backends coming
Configuration
# Required for AI explanations
export ANTHROPIC_API_KEY=your-key-here
# Optional — for real IBM hardware execution
export IBM_QUANTUM_TOKEN=your-token-here
Requirements
- Python 3.10+
- Qiskit >= 1.0.0
- PyTorch >= 2.0.0
- torch-geometric >= 2.4.0
- anthropic >= 0.20.0 (optional, for explanations)
Citation
If you use quantumopt in your research please cite:
Syamala, N. (2025). quantumopt: An AI-driven quantum
circuit compiler using Graph Neural Networks and Large
Language Models. GitHub.
https://github.com/nsyamala1/quantumopt
License
MIT License — free for research and commercial use.
Contact
Built by Naveen Syamala GitHub: github.com/nsyamala1 Issues: github.com/nsyamala1/quantumopt/issues
Metadata
Release files for quantumopt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| quantumopt-0.1.0.tar.gz | 347.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quantumopt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 692.7 kB
Release files / quantumopt-0.1.0.tar.gz
| Download URL | quantumopt-0.1.0.tar.gz |
|---|---|
| Size | 347.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a20fcfd864e99f39e0ba2f18690c2e3fd8d9bbc3d6ada0264dddb9ae74269c6c
|
|
BLAKE2b-256 checksum How to use checksums |
3ba9f3fde4303bb262ee3075fd9fe6e4ffa799ce488d643733c3b164d89e0535
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / quantumopt-0.1.0-py3-none-any.whl
| Download URL | quantumopt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 345.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
607d498297ed9acd3206584f3fdec24dd47a09d3a6be4cb2517b639c34508722
|
|
BLAKE2b-256 checksum How to use checksums |
9468bad2753db8787930737192ffbc79c68ae1a377429d1e46ef84642db0fd93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for quantumopt 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.