qedclib
A quantum program execution engine with built-in performance monitoring. Execute quantum circuits at scale across multiple backends with automatic metrics collection, parallel GPU execution, and detailed per-circuit timing.
Install
pip install qedclib
Quick Example
import qedclib
# Initialize with the quantum computing API
qedclib.initialize("qiskit")
ex = qedclib.execute
# Configure the execution backend
ex.set_execution_target(backend_id="qasm_simulator")
# Build and execute circuits
from qiskit import QuantumCircuit
circuits = []
for n in [3, 5, 8]:
qc = QuantumCircuit(n, n)
qc.h(0)
for i in range(n - 1):
qc.cx(i, i + 1)
qc.measure(range(n), range(n))
circuits.append(qc)
job_id, result = ex.execute_circuits(circuits, num_shots=1000)
for i, counts in enumerate(result.get_counts()):
print(f"Circuit {i}: {sorted(counts.items(), key=lambda x: -x[1])[:3]}")
Features
- Multi-backend execution — run circuits on Qiskit simulators (Aer), IBM hardware, IonQ, IQM, and CUDA-Q (local GPU, multi-GPU, NVIDIA Quantum Cloud) through a single API
- Automatic performance metrics — execution time, elapsed time, circuit depth, gate counts, and fidelity metrics are collected per-circuit and aggregated per-group, with standard deviations
- Per-circuit timing — accurate individual circuit timing extracted from backend-specific result objects (simulator metadata, IBM execution spans, hardware elapsed time)
- Batched execution — memory-efficient execution for large sweeps via
max_batch_size, with automatic create-execute alternation to control memory pressure on GPU backends - Multi-GPU parallel execution — distribute circuits across GPUs using MPI with configurable modes (one GPU per circuit, multiple GPUs per circuit, or hybrid)
- Robust job management — automatic retry with configurable limits, job status polling with comfort indicators, result count validation, and graceful handling of cancelled or failed jobs
- Result handlers — plug in custom per-circuit processing (fidelity computation, expectation values, etc.) that runs automatically as results arrive
- Volumetric benchmarking plots — built-in visualization of performance across circuit widths and depths
Documentation
- qedclib Guide — API reference, execution paths, metrics flow, and backend configuration
- Full Documentation — includes the benchmark suite, setup guides, and platform-specific instructions
Examples
See qedclib-examples for standalone usage examples including parameter sweeps, backend switching, batch scaling, and metrics collection.
Part of the QED-C Benchmarks
qedclib is the execution engine behind the QED-C Application-Oriented Benchmarks suite. If you want the full benchmark suite (17 benchmarks, notebooks, and examples), clone the repository:
git clone https://github.com/SRI-International/QC-App-Oriented-Benchmarks.git
cd QC-App-Oriented-Benchmarks
pip install -e .
License
Apache 2.0
Metadata
Release files for qedclib 2.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qedclib-2.0.8.tar.gz | 161.9 kB | Without provenance | Details for qedclib-2.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qedclib-2.0.8-py3-none-any.whl | Python 3 | none | any | Details for qedclib-2.0.8-py3-none-any.whl |
Total release size: 341.7 kB
Release files / qedclib-2.0.8.tar.gz
| Download URL | qedclib-2.0.8.tar.gz |
|---|---|
| Size | 161.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b2ea8582b47e9d929b0194c02f069554a7306135b5cab5d4801c1369b0bb1d8
|
|
BLAKE2b-256 checksum How to use checksums |
91158fa5337a60f36192a707dbecdcca615ec34648b774f43d229f9e3f3dd330
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Release files / qedclib-2.0.8-py3-none-any.whl
| Download URL | qedclib-2.0.8-py3-none-any.whl |
|---|---|
| Size | 179.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4857a2ba95311ce12c0340ebb1587e3dec8fcea25d034961176c9c936512fa4
|
|
BLAKE2b-256 checksum How to use checksums |
4600d495e234a090fffa968d44472d2f8f7f164434d83260d4f441fc40f73738
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Security for qedclib 2.0.8
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.