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

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

  1. Detect the input framework from the circuit's type
  2. Convert to arvak.Circuit (Arvak's internal representation)
  3. Compile using Arvak's Rust-based optimizer
  4. 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


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.0.tar.gz (15.2 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.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

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

Hashes for arvak_lite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a19ad4cdb32b996534568f2adfaf0489354a2c03ec11eb016a183434eb7b222
MD5 d30ea026558a624f6720e83dd20bafdb
BLAKE2b-256 b54022e831512856f3777abdd982bb3acb96bb3574e3d11bc05a28b900c5d7c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arvak_lite-0.1.0.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.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

Hashes for arvak_lite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d41a5f8a9e90555274f2a30fb1f87d8d2b6895b4f8785b9f582effa04f69e12
MD5 62af7977d76c231b227db5f050509c87
BLAKE2b-256 5e88cd3e7e855de7f0ba7d2fab0844fd2213189b6af5cfc8baad5828b0a86470

See more details on using hashes here.

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

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