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.22.0.tar.gz (556.5 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.22.0-py3-none-any.whl (547.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qiskit_qward-0.22.0.tar.gz
  • Upload date:
  • Size: 556.5 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.22.0.tar.gz
Algorithm Hash digest
SHA256 731df9b18b82de4781436ef24a00664f5378558ee6f6de575d01314e169dbc54
MD5 ef5324412f9d78f53ffe6554d0be90e4
BLAKE2b-256 8ca7fe9bac7bc879c69fa8f28770f2ea7c29368c2815275d65150cd33e7b5f35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qiskit_qward-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 547.5 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.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0595c7a3eec64048e6df0d26492deb93ba0701e9638b59eea0610f3a0b92c49c
MD5 1dfea6ca7c53224620f67de80f90c4ec
BLAKE2b-256 b3879e6df17507d2abacac6c0b548fa13249fb9d1c0f5b91e92e63f2fb33faf1

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