Metadata-Version: 2.4
Name: qdsv-bridge
Version: 0.7.0
Summary: Public domain-to-quantum SDK for portable QDSV Bridge artifacts.
Project-URL: Homepage, https://qdsv.cloud
Project-URL: Documentation, https://qdsvquantum-afk.github.io/qdsv-bridge/
Project-URL: Source, https://github.com/qdsvquantum-afk/qdsv-bridge
Project-URL: Changelog, https://github.com/qdsvquantum-afk/qdsv-bridge/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/qdsvquantum-afk/qdsv-bridge/issues
Project-URL: Security, https://github.com/qdsvquantum-afk/qdsv-bridge/blob/main/SECURITY.md
Author: QDSV / Qruba
License-Expression: MIT
License-File: LICENSE
Keywords: circuit,conformance,qasm,qdsv,quantum,sdk,semantic-computation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: requests>=2.31
Provides-Extra: docs
Requires-Dist: myst-parser>=2.0; extra == 'docs'
Requires-Dist: qiskit-sphinx-theme>=2.0; extra == 'docs'
Requires-Dist: sphinx>=7.0; extra == 'docs'
Provides-Extra: qiskit
Requires-Dist: qiskit-aer<0.18,>=0.17; extra == 'qiskit'
Requires-Dist: qiskit-qasm3-import<0.7,>=0.5; extra == 'qiskit'
Requires-Dist: qiskit<3,>=2.3; extra == 'qiskit'
Description-Content-Type: text/markdown

# QDSV Bridge

QDSV Bridge is the QDSV interoperability service for circuit-based quantum
workflows. Applications submit a bounded decision request and receive a
portable OpenQASM or Qiskit-ready artifact when the request is within the
service's supported scope.

Version `0.7.0` introduces a deliberately narrow public boundary. The SDK
contains domain request builders, an HTTP client and artifact adapters. The
QDSV translation and implementation that derive an artifact run only in the
Bridge service.

- [Documentation](https://qdsvquantum-afk.github.io/qdsv-bridge/)
- [PyPI](https://pypi.org/project/qdsv-bridge/)
- [Source](https://github.com/qdsvquantum-afk/qdsv-bridge)

## Business-First Quickstart

Describe the prepared candidates and decision rule; Bridge returns a portable
artifact without requiring the application to author a quantum circuit.

```python
from qdsv_bridge import (
    QDSVBridge,
    const,
    field,
    predicate_request,
)

suppliers = [
    {"supplier_id": 101, "quality": 820, "compliance": 1},
    {"supplier_id": 102, "quality": 680, "compliance": 1},
    {"supplier_id": 103, "quality": 760, "compliance": 0},
]

request = predicate_request(
    candidates=suppliers,
    rule={
        "op": "and",
        "args": [
            {"op": "gte", "left": field("quality"), "right": const(700)},
            {"op": "eq", "left": field("compliance"), "right": const(1)},
        ],
    },
    format="qasm2",
)

artifact = QDSVBridge().export(request)

print(artifact.format)
print(artifact.artifact_digest)
```

The candidates keep their business identifiers. The SDK sends the bounded
public request to Bridge; it does not construct a circuit locally.

## Qiskit integration

Install the optional adapter:

```bash
pip install "qdsv-bridge[qiskit]"
```

Then load the recommended artifact into your own Qiskit workflow:

```python
from qdsv_bridge import QDSVBridge

bridge = QDSVBridge()
artifact = bridge.export(request)
qc = artifact.to_quantum_circuit()
```

``export()`` is explicit: it sends only the public domain request to Bridge.
Before Qiskit parses anything, the adapter confirms that ``artifact_digest``
matches the exact returned OpenQASM bytes and that the public verification
status passed. ``to_quantum_circuit()`` makes no network request.

Bridge does not select a backend, transpile for a device, execute a simulator
or QPU, or interpret execution results. Those remain under the user's Qiskit
or provider workflow. The SDK has no local construction or circuit-generation
fallback.

## Public boundary

The SDK's stable contracts are `qdsv_bridge_domain.v1` for requests and
`qdsv_bridge_public.v1` for responses. The Qiskit adapter accepts `qasm2` and
`qasm3` artifacts.

The public service does not return internal intermediate representations,
lowering plans, private build identities, or compilation diagnostics. Do not
send confidential, regulated or secret data to a public endpoint.

The distributable wheel and source package are checked before release against
the 0.7 public-distribution policy. The check fails when an unexpected module,
historical documentation, implementation marker or unapproved package file is
present.

## Migration from 0.6.x

Release `0.7.0` is intentionally breaking. Replace legacy request builders
with `predicate_request()` or `score_request()`, and receive a verified public
artifact through `QDSVBridge().export(request)`. See the 0.7 migration guide
in the documentation before upgrading an existing integration.
