Skip to main content

PyPI - Version Python Version License Tests Documentation Ruff

SuperQuantX

One API across quantum SDKs, with a classical baseline for every result.

SuperQuantX is an experimental, open-source toolkit for quantum machine learning and optimisation research by Superagentic AI. The same circuits and algorithms run on PennyLane, Qiskit, Cirq, Amazon Braket, pytket and a built-in simulator, and every algorithm reports a classical reference so you can see whether the quantum part earns its keep.

📖 Documentation · 🎬 Showcase with real output

Research software. Everything below runs on classically simulated quantum circuits. Nothing here demonstrates quantum advantage, and the library is designed to tell you when a quantum model does not beat a classical one.

What works today

Backend Runs on Status
simulator built-in NumPy statevector ✅ tested
pennylane default.qubit ✅ tested
qiskit Qiskit Aer ✅ tested
cirq Cirq simulator ✅ tested
braket Amazon Braket LocalSimulator ✅ tested
tket pytket local simulator ✅ tested
ocean D-Wave Ocean (QUBO/Ising only) ⚠️ annealing only, hardware needs a Leap token
IBM Quantum, Braket devices (IonQ, Rigetti), Quantinuum H-Series via qiskit, braket, tket ⚠️ untested, needs your own credentials
Azure Quantum, Rigetti Forest, cuQuantum, TensorFlow Quantum 🚧 planned, not implemented

"Tested" means the unit tests run a Bell state, a qubit-order check, exact expectation values and the fidelity kernel on that backend. Check your own install with superquantx list-backends.

Algorithm Classical check it reports
VQE (RealAmplitudes, EfficientSU2) exact ground energy (H2 STO-3G built in)
QAOA for MaxCut brute-force optimum and approximation ratio
QuantumSVM (fidelity kernel) tuned RBF SVM and logistic regression via compare_to_classical
QuantumNN (parameter-shift gradients) compare_to_classical works with any sklearn-style classifier
QuantumPortfolioAgent (CVaR-VQE) brute-force optimal selection and a Markowitz reference
QuantumClassificationAgent compare_to_classical verdict and p-value

Quick start

git clone https://github.com/SuperagenticAI/superquantx.git
cd superquantx
uv sync --extra all-backends      # or: pip install -e ".[all-backends]"

uv run superquantx list-backends  # Bell-state check on every backend
uv run python examples/showcase.py

Install the 0.3.0 release from PyPI (Python 3.11+):

pip install "superquantx==0.3.0"                     # built-in simulator
pip install "superquantx[mcp,qiskit,pennylane]==0.3.0"  # MCP and SDKs

AI assistants and automatic encodings

The MCP server exposes six tools over stdio for circuits, backend checks, classification and MaxCut. Start it with superquantx-mcp or python -m superquantx.mcp from your MCP client.

QuantumSVM(backend="simulator", feature_map="auto") selects an implemented encoding at fit time using a local heuristic. The optional Qmes recommender is installed separately; see the design and limitations. Inspect selected_feature_map_ and feature_map_recommendation_ after fitting.

A quantum classifier, honestly benchmarked

import superquantx as sqx
from sklearn.datasets import make_moons

X, y = make_moons(n_samples=100, noise=0.2, random_state=0)
result = sqx.compare_to_classical(X, y, sqx.QuantumSVM(backend="pennylane"), cv=5)
print(result.table())
model                                      accuracy  wall time  grid  QPU circuits
----------------------------------------------------------------------------------
QuantumSVM (PennyLane), tuned       0.930 +/- 0.051      3.43s    25       119,000
QuantumSVM (PennyLane), untuned     0.670 +/- 0.125      0.58s     1             -
SVC (RBF), tuned C and gamma        0.950 +/- 0.055      0.85s    25             -
Logistic regression, tuned C        0.860 +/- 0.097      0.19s     4             -
----------------------------------------------------------------------------------
100 samples, 2 features, 5-fold stratified CV (identical folds for every model), seed=0
quantum minus best classical: -0.020; no significant difference from SVC (RBF), tuned C and gamma (p=0.54)

This follows the protocol of arXiv:2610.42029: equal tuning budgets, identical folds, per-fold preprocessing and the Nadeau-Bengio corrected t-test. As that paper reports, a tuned quantum kernel is statistically indistinguishable from a tuned RBF SVM here, and bandwidth tuning (0.67 to 0.93) matters more than the circuit. See Benchmarking.

VQE and QAOA with exact answers

import numpy as np
import superquantx as sqx

vqe = sqx.create_vqe_for_molecule("H2", backend="qiskit")
print(vqe.find_ground_state(), vqe.exact_ground_energy())   # both -1.857275 Ha

W = np.array([[0, 1, 1, 0, 1], [1, 0, 1, 1, 0], [1, 1, 0, 1, 0],
              [0, 1, 1, 0, 1], [1, 0, 0, 1, 0]], dtype=float)
r = sqx.QAOA(backend="cirq", p=2, seed=7).solve(W)
print(r["cut_value"], r["classical_optimum"], r["approximation_ratio"])

Agents that show their work

import numpy as np
import superquantx as sqx

returns = np.random.default_rng(0).normal(0.01, 0.02, size=(250, 6))
res = sqx.QuantumPortfolioAgent(backend="simulator", n_select=3, seed=0).solve(returns)
print(res.result["selected_assets"], res.result["classical_selected_assets"],
      res.result["matches_classical_optimum"])

examples/quantum_agents_demo.py runs the portfolio and classification agents end to end.

Command line

superquantx -v version        # versions of installed backend SDKs
superquantx list-backends     # real Bell-state check per backend
superquantx benchmark -d moons -b pennylane   # quantum kernel vs tuned classical
superquantx run qsvm --data iris -b simulator

Development

uv sync --extra all-backends --extra dev
uv run pytest tests/unit tests/integration
uv run ruff check src tests

Contributions are welcome: open an issue or read the contributing guide. Python 3.11+ is required; see backend compatibility for version floors.

License

Apache License 2.0. See LICENSE.

Built by Superagentic AI

Metadata

Release files for superquantx 0.3.0

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

Source distribution (sdist)

Source distribution for superquantx 0.3.0
File Size Uploaded Provenance Actions
superquantx-0.3.0.tar.gz 3.2 MB Without provenance Details for superquantx-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 3.4 MB

Release files / superquantx-0.3.0.tar.gz

Download URL superquantx-0.3.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
1997d8553b0507cc469fec1fa4ad3e76a640d998a8db7ee8e8882328c76f958f
BLAKE2b-256 checksum
How to use checksums
3339b022ac17e69aeb57c1ee762b0bd9f5b24a6b458f6640c7345ce5ae933f3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / superquantx-0.3.0-py3-none-any.whl

Download URL superquantx-0.3.0-py3-none-any.whl
Size 203.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8e362272e6f4d9ba8f4cfcae6f9745e0c94c5c8fa71ce878b625735fc8ac7d6
BLAKE2b-256 checksum
How to use checksums
852f388539ce3406aca07c307c95a0607c3179588278554c3154c7816282f05b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for superquantx 0.3.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.

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