Skip to main content

A framework for analyzing and validating quantum code execution quality on quantum processing units (QPUs)

Project description

QWARD - Quantum Circuit Analysis and Runtime Development

Platform Python Qiskit Code style: Black DOI

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()

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

For Users

For Developers

🎯 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
  • 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:

🧪 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:

  1. black --check . - Code formatting
  2. pylint -rn --disable=C,R --ignore-paths=qward/examples qward tests - Linting
  3. mypy --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


QWARD is designed to help quantum developers and researchers understand and optimize their quantum algorithms through comprehensive analysis and visualization tools.

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

qiskit_qward-0.26.1.tar.gz (587.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qiskit_qward-0.26.1-py3-none-any.whl (568.0 kB view details)

Uploaded Python 3

File details

Details for the file qiskit_qward-0.26.1.tar.gz.

File metadata

  • Download URL: qiskit_qward-0.26.1.tar.gz
  • Upload date:
  • Size: 587.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qiskit_qward-0.26.1.tar.gz
Algorithm Hash digest
SHA256 51f7ab54e5de807da3b540dac0e79f60dc62f720a4774de1b773ef9d1203d84a
MD5 2247bc1ada598422be1a27e8577d3861
BLAKE2b-256 9da16a6d0bafbe0476986f61f37b7f0fe65f49c5eeeca443075769a432daf08a

See more details on using hashes here.

File details

Details for the file qiskit_qward-0.26.1-py3-none-any.whl.

File metadata

  • Download URL: qiskit_qward-0.26.1-py3-none-any.whl
  • Upload date:
  • Size: 568.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qiskit_qward-0.26.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1171f1d78026ba7dc06e8e43ea8da9ad01812254be63e94595597f5808ae114b
MD5 2e877a01f0352da3251a7e499ea7894d
BLAKE2b-256 f10b072ea677641ac949c1b9406cf30fc9c088006571f15ac0d1ee8d38aebdb5

See more details on using hashes here.

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