Skip to main content

Quex

Initially, these are just a lot of big words!

A high-performance, backend-agnostic dispatcher for quantum circuit execution.

Quex aims to be the "JAX for Quantum Computing." Currently, many quantum simulators are tightly coupled to their frontend SDKs (e.g., Qiskit, Cirq). Quex completely divorces circuit construction from circuit execution.

By ingesting standard intermediate representations (like OpenQASM 3.0), Quex acts as an intelligent dispatcher, routing the heavy linear algebra required for quantum simulation to the most optimal, hardware-specific classical solver available on your machine—whether that is a multi-core CPU, an NVIDIA GPU (via cuQuantum), or an Apple Silicon unified memory architecture.

Core Architecture

  1. The Ingestion Layer: Parses hardware-agnostic formats (OpenQASM 3.0, and eventually QIR) into a lightweight internal Abstract Syntax Tree (AST).

  2. The Dispatcher (WIP): Analyzes circuit depth, qubit count, and host hardware to intelligently route execution.

  3. The Execution Engines (WIP): Wrappers around optimized, low-level linear algebra libraries (NumPy, SciPy Sparse, cuQuantum, etc.) to crunch the matrices efficiently.

Installation and Setup

Quex is managed using uv, the lightning-fast Python package manager written in Rust.

Prerequisites

If you don't have uv installed, we recommend the standalone installer:

curl -LsSf https://astral.sh/uv/install.sh | sh

Local Development Setup

To clone the repository and set up the development environment instantly:

# 1. Clone the repo
git clone https://github.com/rajarshitiwari/quex.git
cd quex

# 2. Sync dependencies (uv will automatically create a .venv and install the lockfile)
uv sync

# 3. (Optional) Run tests to ensure everything is working
uv run pytest

💻 Quick Start

Currently, Quex features a highly efficient (hopefully) parsing layer for OpenQASM 3.0 strings. Here is how to ingest a standard quantum circuit:

import quex as qx

# Instantiate a circuit
qc = qx.Circuit(num_qubits=2)

# Add standard operations
qc.add_operation('h', 0)
qc.add_operation('cx', [0, 1])

# Quex features a built-in topological visualizer
print("Circuit Topology:")
print(qc)

# We read a raw OpenQASM string from an external file/source
qasm_str = """
OPENQASM 3.0;
qubit[2] q;
h q[0];
rx(theta_0) q[1];
ry(gamma_1) q[0];
cx q[0], q[1];
"""
# Parse it
qc = qx.Circuit.from_qasm(qasm_str)

# Quex automatically found the variables and initialized them!
print("Auto-populated Parameters:")
print(qc.parameters) 
# Output: {'theta_0': 0.0, 'gamma_1': 0.0}

# Now attach a simulator, and run it.
qc.simulator = qx.NumpySimulator()
baseline_state = qc.run()

# The ML loop can just update the dictionary directly
qc.parameters['theta_0'] = 1.57
updated_state = qc.run()

Running Scripts Locally

Because uv handles virtual environments automatically, you do not need to manually activate your .venv. Simply prepend uv run to execute your scripts with all Quex dependencies loaded:

uv run your_script.py

🗺️ Roadmap

  • OpenQASM 3.0 Ingestion Layer
  • Internal Circuit Representation (DAG structure)
  • Baseline Classical Execution Engine (NumPy state-vector simulation)
  • Hardware Dispatcher Logic
  • Advanced Execution Engines (SciPy Sparse, cuQuantum integration)
  • LLVM-based QIR Ingestion

Contact

Contact rajarshi.tiwari @ ichec.ie, or @rajarshitiwari for any questions.

Metadata

Release files for quex 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quex 0.3.6
File Size Uploaded Provenance Actions
quex-0.3.6.tar.gz 201.2 kB With provenance Details for quex-0.3.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quex 0.3.6
File Interpreter ABI Platform Actions
quex-0.3.6-py3-none-any.whl Python 3 none any Details for quex-0.3.6-py3-none-any.whl

Total release size: 227.1 kB

Release files / quex-0.3.6.tar.gz

Download URL quex-0.3.6.tar.gz
Size 201.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b3abdd1a518698999cc05f59e692717bbba999a17eb18f5ac8948fea4a3f2e04
BLAKE2b-256 checksum
How to use checksums
d8cd743d32e86627d1fe12ad6a566a5f7b12bd5f6449e245a1664ac4f53f8465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / quex-0.3.6-py3-none-any.whl

Download URL quex-0.3.6-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e934e357c250485e54923e7879f7af6e293ce5413190082dafbc38c40993eb0
BLAKE2b-256 checksum
How to use checksums
00c28011642ab7e0717900be564c0d0a16657ba2723e50b7de0254d58a0f7572
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for quex 0.3.6

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for quex-0.3.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page