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.21.0.tar.gz (530.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.21.0-py3-none-any.whl (504.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qiskit_qward-0.21.0.tar.gz
  • Upload date:
  • Size: 530.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.21.0.tar.gz
Algorithm Hash digest
SHA256 1d9cf6ef2586024a992ac33095f0b34f592a4e7b1235d7ab69703cc7adc41131
MD5 d8cae0382e07d63ae565f61d6782a402
BLAKE2b-256 7863e2825bc497ad6c774b824681912baff3c0493860185beafa9034ba919d26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qiskit_qward-0.21.0-py3-none-any.whl
  • Upload date:
  • Size: 504.1 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.21.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bda87805c423b645e3662770aee721687663901af90af7041ae65981a0087b0
MD5 27daacaac72a34084f9b5edcf038230d
BLAKE2b-256 bdfd5797eecfaa6fcc95521df78255a37b329b96fecb27dd05db0cddd0d75dc7

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