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

🛠️ 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.24.0.tar.gz (576.3 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.24.0-py3-none-any.whl (560.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qiskit_qward-0.24.0.tar.gz
  • Upload date:
  • Size: 576.3 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.24.0.tar.gz
Algorithm Hash digest
SHA256 846ba792ec84c6773dbbbc986d559a0e889b7b4135da53332982af0442914d1b
MD5 2adf8432bdd3a2a986d2cfec89544971
BLAKE2b-256 a05675f6b5b297fed4281b79cb2f3efd78a19f6cd0efc7c305006ab5f59acd83

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qiskit_qward-0.24.0-py3-none-any.whl
  • Upload date:
  • Size: 560.9 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.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a17c0d34cf5c8bf12e5f8384c1979252016e1777f2c7d42dd1371f90b7fd632
MD5 3f19d41e1b452efbeb904fc08c497058
BLAKE2b-256 7585ac5a002e049358bcdaea302f9eea29a8b45ec07c231f951d0cee597bd589

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