Skip to main content

Lightweight quantum circuit compiler. Drop-in replacement for Qiskit transpile, Cirq optimize, and more. Powered by Arvak.

Project description

arvak-lite

Lightweight quantum circuit compiler wrapping Arvak. Takes circuits from any major framework, compiles them, and returns the same type.

from arvak_lite import transpile

compiled = transpile(circuit)

Also registers as a Qiskit transpiler plugin:

from qiskit.compiler import transpile

compiled = transpile(circuit, optimization_method="arvak")

Installation

pip install arvak-lite

With framework extras:

pip install arvak-lite[qiskit]      # Qiskit + transpiler plugin
pip install arvak-lite[cirq]        # Cirq
pip install arvak-lite[pennylane]   # PennyLane
pip install arvak-lite[pulser]      # Pulser (Pasqal)
pip install arvak-lite[qrisp]       # Qrisp
pip install arvak-lite[qbraid]      # qBraid multi-backend
pip install arvak-lite[all]         # Everything

Usage

Any framework

from arvak_lite import transpile

compiled = transpile(circuit)  # Qiskit in → Qiskit out, Cirq in → Cirq out, etc.

Qiskit transpiler plugin

Once installed, arvak is available as a named plugin in Qiskit's transpile():

from qiskit.compiler import transpile

# Use Arvak for optimization
compiled = transpile(circuit, optimization_method="arvak")

# Use Arvak for routing
compiled = transpile(circuit, coupling_map=coupling, routing_method="arvak")

# Or via pass manager
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
pm = generate_preset_pass_manager(optimization_level=3, optimization_method="arvak")
compiled = pm.run(circuit)

With metrics

compiled, metrics = transpile(circuit, return_metrics=True)
print(f"{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
    return_metrics=True,              # Return (circuit, metrics) tuple
)

Supported frameworks

Framework Type Round-trip
Qiskit QuantumCircuit Yes
Cirq cirq.Circuit Yes
PennyLane QNode / tape Yes
Pulser Sequence (digital) QASM output
Qrisp QuantumCircuit / QuantumSession Yes
OpenQASM str (2.0 / 3.0) Yes
Arvak arvak.Circuit Yes

How it works

arvak-lite is a thin Python wrapper (~12 KB). The actual compilation happens in Arvak, a Rust-native compiler exposed via PyO3. The full compiler fits in a ~600 KB wheel — no LLVM, no JVM, no heavy runtime. The speed comes from Rust, not from skipping optimization passes.

  1. Detect the input framework from the circuit's type
  2. Convert to arvak.Circuit
  3. Compile in Rust (gate decomposition, routing, optimization)
  4. Convert back to the original framework type

License

LGPL-3.0-or-later. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arvak_lite-0.1.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arvak_lite-0.1.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file arvak_lite-0.1.1.tar.gz.

File metadata

  • Download URL: arvak_lite-0.1.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arvak_lite-0.1.1.tar.gz
Algorithm Hash digest
SHA256 94c61744c74cafafc26c245172b5ef9346eb02f535bd96ac3f53f224f00426a6
MD5 5a585933e113c04a3abafbeb634e694b
BLAKE2b-256 b3357752cbe7dac80978ba170c13f0effdfc4f01d5741f46eb0ff365393eb2b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arvak_lite-0.1.1.tar.gz:

Publisher: publish.yml on hiq-lab/arvak-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arvak_lite-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: arvak_lite-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arvak_lite-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95ed995adb8480e66bdcd2a7f5367d11c14f0ace45f2821a7c8588f083cec6c6
MD5 05c91852945e2463e2cbbbba64f3a2e9
BLAKE2b-256 e9431b5191c72d1600c3fddbd9af3bb2b92fd5b294b2306e2d015d2a53c15cc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for arvak_lite-0.1.1-py3-none-any.whl:

Publisher: publish.yml on hiq-lab/arvak-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page