QWARD - Quantum Circuit Analysis and Runtime Development
QWARD is a comprehensive framework for analyzing quantum circuits and validating quantum code execution quality on quantum processing units (QPUs). It provides tools to analyze circuit complexity, measure performance metrics, and visualize quantum algorithm behavior.
🚀 Quick Start
from qiskit import QuantumCircuit
from qward import Scanner
# Create a quantum circuit
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
# Analyze with all metrics in one line
Scanner(circuit).scan().summary()
Predict how a circuit will run, and what it will cost, before spending any QPU time:
from qiskit_ibm_runtime.fake_provider import FakeFez
from qward.qaqs import predict
measured = circuit.copy()
measured.measure_all()
result = predict(measured, FakeFez()) # or a real backend: service.backend("ibm_fez")
result.quality["ibm_fez/success"].value # predicted success rate, with its validation score
result.cost.resource_units # predicted billed QPU time in IBM resource units
See Quality and Cost Prediction for what is predicted and how far to trust it.
Full Control
from qward import Scanner
from qward.metrics import QiskitMetrics, ComplexityMetrics
from qward.visualization import Visualizer
# Build scanner and visualizer explicitly
scanner = Scanner(circuit=circuit, strategies=[QiskitMetrics, ComplexityMetrics])
metrics = scanner.calculate_metrics()
visualizer = Visualizer(scanner=scanner)
dashboards = visualizer.create_dashboard(save=True)
📚 Documentation
Thesis experiments and dataset
Thesis collection scripts, datasets, reproduction instructions, and the research website are maintained in estimating-quantum-circuit. Explore the experiment dashboard. QWARD provides the reusable circuit-analysis library used by that repository. Existing manuscript/report files remain here pending a separate migration.
For Users
- Project Overview - Learn about QWARD's goals and capabilities
- Installation Guide - Get QWARD up and running
- Beginner's Guide - Start here if you're new to QWARD
- Quickstart Guide - Jump right into using QWARD
- Architecture Overview - Understand QWARD's design and components
- Visualization Guide - Learn about QWARD's visualization capabilities
- Quality and Cost Prediction - Predict how a circuit will run and what it will cost before you run it
For Developers
- Developer Guide - Development setup and code quality standards
- Technical Documentation - Deep dive into QWARD's implementation
- Contribution Guidelines - How to contribute to QWARD
- API Documentation - Complete API reference
🎯 Key Features
- Circuit Analysis: Comprehensive metrics for quantum circuit complexity and structure
- Performance Monitoring: Track success rates, fidelity, and execution statistics
- Dual Primitive Support: Automatic detection of Sampler (counts) and Estimator (expectation values) results
- Quality and Cost Prediction: Predict execution quality (success rate, fidelity, TVD) on IBM Fez and Kingston, and billed QPU cost, from the circuit alone with
qward.qaqs.predict— no QPU time needed - Visualization: Rich, interactive plots and dashboards for metric analysis
- Schema Validation: Type-safe metrics with Pydantic-based validation
- Extensible Architecture: Plugin-based system for custom metrics and visualizations
- Multi-Backend Support: Works with Qiskit Aer, IBM Quantum, and other providers
- Job Retrieval: Analyze completed IBM Quantum jobs by ID with
scan_job
🛠️ Installation
# Install from PyPI (when available)
pip install qward
# Install with development tools (black, pylint, mypy)
pip install qward[dev]
# Or install from source
git clone https://github.com/your-org/qiskit-qward.git
cd qiskit-qward
pip install -e . # runtime only
pip install -e ".[dev]" # with dev tools
📖 Examples
Explore comprehensive examples in the qward/examples/ directory:
- Basic Usage - Complete workflow examples
- Circuit Performance - Performance analysis
- Visualization Demo - Visualization capabilities
- Aer Integration - Using QWARD with Qiskit Aer
- Estimator on IBM QPU - Estimator primitive with real hardware
- Predict quality and cost - Frozen thesis models: predictions with validation scores, before running
🧪 Development & Linting
Quick Local Check
Use verify.sh for a fast local validation against your active Python environment:
./verify.sh
Replicating CI Exactly
CI runs tox -elint with Python 3.11 in an isolated environment. To replicate this locally:
# Requires Python 3.11 available via pyenv
PYENV_VERSION=3.11 pyenv exec tox -elint
This creates the same isolated environment as CI (same Python version, same pinned tool versions, no extra packages like IPython) and runs:
black --check .- Code formattingpylint -rn --disable=C,R --ignore-paths=qward/examples qward tests- Lintingmypy --exclude qward/examples qward- Type checking
Running Tests
# Quick local test run
python -m pytest tests/ -v
# Full CI-equivalent test run with tox
PYENV_VERSION=3.11 pyenv exec tox -epy311
🤝 Contributing
We welcome contributions! Please see our Contribution Guidelines for details on:
- Setting up the development environment
- Code style and quality standards
- Testing requirements
- Submitting pull requests
📝 How to Cite
If you use QWARD in your research, please cite it as follows:
Márquez, Cristian and Sierra-Sosa, Daniel and Garcés, Kelly. (2026). xthecapx/qiskit-qward (v0.18.0). Zenodo. https://doi.org/10.5281/zenodo.18773713
BibTeX:
@software{qward2026,
author = {Márquez, Cristian and Sierra-Sosa, Daniel and Garcés, Kelly},
title = {xthecapx/qiskit-qward},
year = {2026},
publisher = {Zenodo},
version = {v0.18.0},
doi = {10.5281/zenodo.18773713},
url = {https://doi.org/10.5281/zenodo.18773713}
}
📄 License
This project is licensed under the Apache License 2.0.
🔗 Links
- Documentation: docs/
- Examples: qward/examples/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
QWARD is designed to help quantum developers and researchers understand and optimize their quantum algorithms through comprehensive analysis and visualization tools.
Metadata
Release files for qiskit-qward 0.31.1
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 |
|---|---|---|---|---|
| qiskit_qward-0.31.1.tar.gz | 1.9 MB | Without provenance | Details for qiskit_qward-0.31.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qiskit_qward-0.31.1-py3-none-any.whl | Python 3 | none | any | Details for qiskit_qward-0.31.1-py3-none-any.whl |
Total release size: 3.8 MB
Release files / qiskit_qward-0.31.1.tar.gz
| Download URL | qiskit_qward-0.31.1.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9e46dda0e48db9a0fb8cc5ffb1fab4674368910b5300df63c377cd6ceda46ff
|
|
BLAKE2b-256 checksum How to use checksums |
582d3b77e908ec9f3c29927ee6a4259de1e31bc4b5a8e5421595376feb368618
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / qiskit_qward-0.31.1-py3-none-any.whl
| Download URL | qiskit_qward-0.31.1-py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e7d8fdfde2bc496acdfcd30830277ee0d6f2bd5087706a8c88cc4a28faa9cd5
|
|
BLAKE2b-256 checksum How to use checksums |
1164acb8cf91bc4f540eafe396ccde528ec6f69453a630d3ed13adc6b0b00651
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for qiskit-qward 0.31.1
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.