Skip to main content

QDSV Bridge

PyPI Python License: MIT Status Qiskit Ecosystem

Source/package version: 0.6.1. See the PyPI badge for publication status.

QDSV Bridge is a lightweight Python client SDK that converts supported semantic problem specifications into executable OpenQASM/Qiskit-compatible circuit artifacts or validated expert construction packages.

Circuit delivery is conditional on capability and resource validation. Bridge does not execute circuits, generate arbitrary circuits or embed precomputed answers.

Status And Scope

QDSV Bridge is a Developer Preview for bounded, problem-first circuit construction. The public service is provided without an SLA and may change or be temporarily unavailable.

Bridge validates the semantic-to-circuit construction path and reports the resources required by the generated artifact. It can also derive an exact, target-independent logical optimization and recommend it when contractual replay passes and protected logical metrics do not regress. It does not validate the user's domain assumptions, execute on a simulator or QPU, choose a provider, manage credentials, mitigate noise or interpret experimental results.

The public SDK supports Python 3.9 and later. Before 1.0, minor releases may introduce contract changes; deprecations and migration notes are recorded in the changelog.

Installation

Install the client:

pip install qdsv-bridge

Install the optional Qiskit inspection dependencies:

pip install "qdsv-bridge[qiskit]"

The Qiskit extra is capped at qiskit>=2,<3 to preserve compatibility with the currently tested Qiskit major version.

Quickstart

The public Developer Preview does not require an API key:

from qdsv_bridge import QDSVBridgeClient, select_recommended_artifact

client = QDSVBridgeClient()

spec = {
    "state_space": {
        "kind": "finite_candidates",
        "candidate_count": 2,
        "candidate_id": "candidate",
    },
    "signals": ["eligibility_score"],
    "prepared_candidates": [
        {"eligibility_score": 0},
        {"eligibility_score": 1},
    ],
    "goal": {
        "kind": "marking",
        "threshold": 1,
        "criteria": [
            {"signal": "eligibility_score", "importance": 1, "priority": 1}
        ],
    },
    "target": {"format": "qasm3", "backend_family": "qiskit"},
    "limits": {"max_qubits": 8, "max_depth": 160},
}

result = client.generate(spec)
recommended = select_recommended_artifact(result)

print(result["status"])
print(result["artifact"]["role"])  # Canonical source of truth.
print(result["recommended_artifact_role"])
print(recommended["format"])
print(recommended["content"])
print(result["construction_verification"])

When materialization succeeds within the supported capability and resource limits, generate() returns the completed canonical circuit and loading guidance. Bridge also attempts the frozen qiskit_structural_exact_v1 logical profile by default. The canonical artifact is never replaced silently; select_recommended_artifact() returns the accepted optimized artifact when available and otherwise returns the canonical artifact.

The optimization is exact and target-independent. It does not perform layout, routing, scheduling, calibration-aware selection, noise suppression, mitigation or hardware execution. Those operations remain in Runtime/HSP.

For a minimal multi-criteria ScoreModel example, run examples/score_model_v2.py. Prepared metrics and the cutoff use one declared scale, and priority represents a domain priority, not the position of a criterion. The SDK example does not reproduce private ScoreModel aggregation or compiler rules.

Compound Business Predicates

Use build_predicate_spec() when the business rule is already an explicit, public predicate. The helper supports nested boolean composition and field-to-field comparisons while preserving candidate order. It translates the declared rule; it does not evaluate it or add expected answers.

from qdsv_bridge import QDSVBridgeClient, build_predicate_spec

rows = [
    {"quality": 800, "delivery": 700, "compliance": 1},
    {"quality": 720, "delivery": 600, "compliance": 1},
]
predicate = {
    "op": "and",
    "args": [
        {
            "op": "gte",
            "left": {"op": "field", "name": "quality"},
            "right": {"op": "const", "value": 700},
        },
        {
            "op": "gte",
            "left": {"op": "field", "name": "delivery"},
            "right": {"op": "const", "value": 650},
        },
        {
            "op": "eq",
            "left": {"op": "field", "name": "compliance"},
            "right": {"op": "const", "value": 1},
        },
    ],
}

spec = build_predicate_spec(rows=rows, predicate=predicate)
result = QDSVBridgeClient().generate(spec)

The complete runnable example is examples/compound_business_predicate.py. Do not include labels, expected decisions or precomputed predicate results in rows; only provide the prepared business inputs referenced by the predicate.

Ideal Circuit And Hardware Handoff

When Bridge materializes a circuit, the response includes a backend-neutral circuit_realization_package. It links the logical circuit to the canonical semantic, quantum and reversible-plan digests and includes the public result, measurement and decoder contracts.

package = result["circuit_realization_package"]

print(package["canonical_identity"])
print(package["logical_realization"])
print(package["validation"])
print(result["target_handoff"])

This package establishes what the canonical ideal circuit represents; it is not evidence that a specific QPU will preserve the ideal result. target_handoff states the remaining work for a real backend, including target transpilation, physical-resource review and any supported mitigation. Bridge does not apply those target-specific adjustments or execute the circuit.

For managed IBM execution, send the package through QDSV Runtime/HSP or Qruba's hardware flow. If you choose to run the artifact yourself, Bridge's handoff means: this is the ideal logical circuit; for IBM real hardware you must use Runtime/HSP or an equivalent user-controlled physical workflow.

Ideal dynamic replay is reported only when it was actually performed. resource_limited, not_run or unsupported remain explicit evidence states and are never promoted to passed.

Canonical And Optimized Logical Artifacts

result["artifact"] remains the immutable canonical artifact for backward compatibility and auditability. The optional result["optimized_logical_artifact"] is a child artifact linked to it by digest. Bridge recommends the child only when exact full-state replay, register and measurement preservation, valid-domain checks and the Pareto no-regression policy all pass.

canonical = result["artifact"]
recommended = select_recommended_artifact(result)

print(result["logical_optimization"]["resources_before"])
print(result["logical_optimization"]["resources_after"])
print(result["recommended_artifact_role"])

Set target.logical_optimization to false only when byte-for-byte canonical delivery is required. Basic users do not need to configure passes, logical bases or seeds.

Reproducible benchmarks can freeze the public profile explicitly. The bounded-predicate helper accepts the same contract:

spec = build_predicate_spec(
    rows=rows,
    predicate=predicate,
    logical_optimization={
        "mode": "auto",
        "profile": "qiskit_structural_exact_v1",
        "acceptance_policy": "pareto_no_regression_v1",
    },
)

mode, rather than an enabled field, is the versioned public switch. Custom passes, physical targets, layouts, routing and approximation settings are intentionally rejected.

Delivery Modes

Bridge uses one specification and offers four output depths:

Method Intended user Result
generate() A user who needs the quantum core without designing it Completed circuit, loading guidance, measurement meaning, resources and construction evidence, when materialization succeeds
build() A developer integrating QASM or Qiskit Editable circuit artifact, public construction summaries, resources and digests, when materialization succeeds
prepare() An expert designing a custom circuit Validated construction requirements and capability gaps without forcing a final circuit
evaluate() An expert reviewing a construction Materialization evidence and clearly labeled construction alternatives

evaluate() evaluates construction evidence. It does not execute the circuit on a simulator or QPU and does not compare runtime results.

Start By User Type

All four modes reuse the spec from the Quickstart. Users can begin with one call and move to a deeper delivery mode without redefining the problem.

Basic user - receive the completed quantum core and loading guidance:

result = client.generate(spec)
recommended = select_recommended_artifact(result)
print(recommended["content"])
print(result["ready_to_run_example"])

Intermediate developer - receive editable QASM/Qiskit artifacts and digests:

package = client.build(spec)
print(package["editable_artifacts"]["artifact_content"])
print(package["editable_artifacts"]["oracle_spec"])
print(package["digests"])

Expert constructor - receive the validated construction package without forcing a circuit:

prepared = client.prepare(spec)
inputs = prepared["expert_inputs"]
print(inputs["construction_status"])
print(inputs["relevant_variables"])
print(inputs["missing_capabilities"])
print(inputs["encoding_suggestions"])

Expert evaluator - review construction evidence and labeled alternatives without executing the circuit:

review = client.evaluate(spec)
print(review["construction_verification"])
print(review["materialization_evidence"])
print(review["construction_alternatives"])
print(review["comparison"]["comparative_execution_performed"])

Outputs And Outcomes

Supported public artifact targets are:

Target Output
qasm2 Completed OpenQASM 2 circuit
qasm3 Completed OpenQASM 3 circuit
qiskit_blueprint Python loader generated from the completed canonical QASM circuit; it is not a partial circuit blueprint
oracle_spec Public expert construction contract
problem_spec Normalized public problem specification
ir Stable public summary, not the private compiler representation

Circuit-oriented targets are returned only when the full supported construction succeeds. Typical outcomes are:

Outcome SDK behavior
Materialized circuit Successful generate() or build() response with artifact, resources and evidence
Expert construction package Successful prepare() response without a forced circuit
Unsupported capability QDSVBridgeHTTPError with the API error payload
Resource limit exceeded QDSVBridgeHTTPError with the required resource details
Invalid specification QDSVBridgeHTTPError with validation details
Transport or service failure QDSVBridgeAPIError

Handle API rejections explicitly:

from qdsv_bridge import QDSVBridgeAPIError, QDSVBridgeHTTPError

try:
    result = client.generate(spec)
except QDSVBridgeHTTPError as error:
    print(error.status_code)
    print(error.payload)
except QDSVBridgeAPIError as error:
    print(f"Bridge service unavailable: {error}")

The current operation catalog and service limits are available from:

catalog = client.capabilities()

For the detailed operation contract and ScoreModel v2 capabilities, see the technical documentation and ScoreModel tutorial.

Limits And Privacy

Bridge accepts compact semantic specifications and bounded prepared numeric inputs. It is not a bulk-data service and does not accept raw datasets or hardware-execution requests.

Public Preview limits are configurable and include payload, compilation time, artifact size, qubit and depth ceilings. A semantically valid problem may still be rejected when its materialized circuit exceeds the active resource limits. Query client.capabilities() for the current deployment contract.

Do not submit personal, confidential, regulated or security-sensitive data to the public preview. The public preview provides no contractual retention guarantee. Use a private deployment for sensitive workloads and review the security policy before reporting a vulnerability.

Default public endpoint:

client = QDSVBridgeClient()  # https://api.qdsv.cloud/api

Private/local endpoint for an existing QDSV Docker deployment:

client = QDSVBridgeClient.local()  # http://localhost:18080/api

Tested Compatibility

Component Tested/supported boundary
Python >=3.9
Qiskit SDK >=2,<3
Qiskit Aer >=0.17,<0.18
Qiskit QASM 3 importer >=0.5,<0.7
OpenQASM QASM 2 and QASM 3 artifacts generated by Bridge
Amazon Braket SDK Optional OpenQASM conversion tested with LocalSimulator; not version-pinned and not an official Amazon Braket integration

Bridge does not provide managed IBM Quantum or Amazon Braket hardware execution.

Integrations And Examples

The notebooks cover problem-first circuit delivery, expert construction inputs, Qiskit inspection and the tested Braket LocalSimulator conversion flow.

Reports

Bridge can render the same public construction evidence as JSON, Markdown or HTML:

report = client.report(spec, mode="build", format="markdown")
print(report["content"])

Reports identify the accepted specification, delivered artifact, warnings, resource evidence and digests. They do not claim simulator or hardware execution.

Support And Security

License

The client SDK, examples, documentation and tests in this repository are licensed under the MIT License.

QDSV, QIntent and Qruba names and marks belong to their respective owners. The MIT License does not grant trademark rights.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qdsv_bridge-0.6.1.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

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

qdsv_bridge-0.6.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file qdsv_bridge-0.6.1.tar.gz.

File metadata

  • Download URL: qdsv_bridge-0.6.1.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for qdsv_bridge-0.6.1.tar.gz
Algorithm Hash digest
SHA256 684e1030f4bffd986c8c79c5a622626305332945dfe1ad5af822173954e1f41b
MD5 fb166e33088025c01be2199dad331172
BLAKE2b-256 f90f138947294b5c7bef0b8da8588f7cd70816ab9c2e78408a65bb31dbe249f1

See more details on using hashes here.

File details

Details for the file qdsv_bridge-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: qdsv_bridge-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for qdsv_bridge-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 794eb0a7cfb3f0721f8672bc9e43f5b0c1244a07b69ebf54a53ad49985b9dd46
MD5 a73c6d5a7e4c924bcf603ac7d984cd1b
BLAKE2b-256 7450ae6cc122d3e0fd328fc04c8b6957a01efa0b0174f55a60ccb2776a52ece6

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