Lightweight quantum circuit compiler. Drop-in replacement for Qiskit transpile, Cirq optimize, and more. Powered by Arvak.
Project description
arvak-lite
One function. All frameworks. 3000x faster.
Drop-in replacement for qiskit.transpile, cirq.optimize, and other framework transpilers.
Powered by Arvak, the high-performance quantum circuit compiler.
from arvak_lite import transpile
compiled = transpile(circuit)
Why arvak-lite?
| Feature | Qiskit transpile | Cirq optimize | arvak-lite |
|---|---|---|---|
| Frameworks | Qiskit only | Cirq only | All of them |
| Speed (100q) | ~45s | ~12s | ~15ms |
| API surface | 30+ params | varies | 1 function |
| Output type | Qiskit only | Cirq only | Same as input |
arvak-lite detects your circuit's framework, compiles it through the Arvak compiler, and returns the result in the same type you gave it.
Installation
pip install arvak-lite
With framework extras:
pip install arvak-lite[qiskit] # Qiskit integration
pip install arvak-lite[cirq] # Cirq integration
pip install arvak-lite[pennylane] # PennyLane integration
pip install arvak-lite[pulser] # Pulser (Pasqal) integration
pip install arvak-lite[all] # Everything
Quick start
Qiskit
from qiskit import QuantumCircuit
from arvak_lite import transpile
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
compiled = transpile(qc) # Returns a QuantumCircuit
Cirq
import cirq
from arvak_lite import transpile
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit(cirq.H(q0), cirq.CNOT(q0, q1))
compiled = transpile(circuit) # Returns a cirq.Circuit
Raw QASM
from arvak_lite import transpile
qasm = """OPENQASM 3.0;
qubit[2] q;
h q[0];
cx q[0], q[1];
"""
compiled = transpile(qasm) # Returns a QASM string
With metrics
compiled, metrics = transpile(circuit, return_metrics=True)
print(f"Compiled in {metrics['time_ms']:.2f}ms, {metrics['gate_count']} gates")
Parameters
transpile(
circuit, # Any supported circuit type
optimization_level=3, # 0=parse, 1=basic, 2=standard, 3=aggressive
coupling_map=[[0,1], [1,2]], # Device connectivity (None = all-to-all)
basis_gates=["cx", "rz", "sx"], # Target gate set
backend="ibm_torino", # Backend hint for compilation strategy
return_metrics=True, # Return (circuit, metrics) tuple
)
Supported frameworks
| Framework | Import | Round-trip |
|---|---|---|
| Qiskit | qiskit.QuantumCircuit |
Yes |
| Cirq | cirq.Circuit |
Yes |
| PennyLane | pennylane QNode/tape |
Yes |
| Pulser | pulser.Sequence (digital) |
QASM output |
| OpenQASM | str (2.0 or 3.0) |
Yes |
| Arvak | arvak.Circuit |
Yes |
How it works
- Detect the input framework from the circuit's type
- Convert to
arvak.Circuit(Arvak's internal representation) - Compile using Arvak's Rust-based optimizer
- Convert back to the original framework type
No QASM serialization overhead for frameworks with native Arvak integrations.
License
LGPL-3.0-or-later. See LICENSE.
Built by The HAL Contract.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arvak_lite-0.1.0.tar.gz.
File metadata
- Download URL: arvak_lite-0.1.0.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a19ad4cdb32b996534568f2adfaf0489354a2c03ec11eb016a183434eb7b222
|
|
| MD5 |
d30ea026558a624f6720e83dd20bafdb
|
|
| BLAKE2b-256 |
b54022e831512856f3777abdd982bb3acb96bb3574e3d11bc05a28b900c5d7c9
|
Provenance
The following attestation bundles were made for arvak_lite-0.1.0.tar.gz:
Publisher:
publish.yml on hiq-lab/arvak-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arvak_lite-0.1.0.tar.gz -
Subject digest:
0a19ad4cdb32b996534568f2adfaf0489354a2c03ec11eb016a183434eb7b222 - Sigstore transparency entry: 1059658782
- Sigstore integration time:
-
Permalink:
hiq-lab/arvak-lite@bce4f6c6b84c0ee6e58bb9ebbc67cb9cf2d21da0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hiq-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bce4f6c6b84c0ee6e58bb9ebbc67cb9cf2d21da0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file arvak_lite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arvak_lite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d41a5f8a9e90555274f2a30fb1f87d8d2b6895b4f8785b9f582effa04f69e12
|
|
| MD5 |
62af7977d76c231b227db5f050509c87
|
|
| BLAKE2b-256 |
5e88cd3e7e855de7f0ba7d2fab0844fd2213189b6af5cfc8baad5828b0a86470
|
Provenance
The following attestation bundles were made for arvak_lite-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on hiq-lab/arvak-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arvak_lite-0.1.0-py3-none-any.whl -
Subject digest:
1d41a5f8a9e90555274f2a30fb1f87d8d2b6895b4f8785b9f582effa04f69e12 - Sigstore transparency entry: 1059658784
- Sigstore integration time:
-
Permalink:
hiq-lab/arvak-lite@bce4f6c6b84c0ee6e58bb9ebbc67cb9cf2d21da0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hiq-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bce4f6c6b84c0ee6e58bb9ebbc67cb9cf2d21da0 -
Trigger Event:
release
-
Statement type: