Qrisp-Open Quantum Plugin
Beta. This plugin is in beta; its API and defaults may still change. Feedback is welcome in the Quantum Rings community.
A backend for the Qrisp quantum programming framework that submits circuits to the Open Quantum platform. Write high-level Qrisp programs and run them on real quantum hardware.
How it works
Qrisp already depends on Qiskit and can convert any circuit to a Qiskit circuit
(QuantumCircuit.to_qiskit()). This backend uses that bridge to reuse the Open
Quantum Qiskit plugin:
OpenQuantumServicehandles authentication and backend discovery.- The capability-aware
OpenQuantumBackend(a QiskitBackendV2) validates each circuit against the target device (gate set, coupling map, shot and qubit limits). export_circuit_to_qasmserialises to OpenQASM.
Submission runs through the framework-agnostic SchedulerClient in the core
SDK. No separate QASM serializer or auth code is reimplemented here.
Installation
# Plugin (and core SDK + Qiskit plugin)
pip install openquantum-sdk-qrisp
# or via extras:
pip install "openquantum-sdk[qrisp]"
This pulls in qrisp, openquantum-sdk, and openquantum-sdk-qiskit.
Quick Start
from qrisp import QuantumVariable, h, cx
from qrisp_openquantum import OpenQuantumBackend
oq = OpenQuantumBackend(
backend="ionq:aria-1",
shots=1024,
client_id="your_client_id",
client_secret="your_client_secret",
)
qv = QuantumVariable(2)
h(qv[0])
cx(qv[0], qv[1])
print(qv.get_measurement(backend=oq, shots=1024))
# {'00': 0.5, '11': 0.5}
get_measurement returns Qrisp's decoded outcomes as probabilities (its own
normalization, applied for every backend). To get integer shot counts, run a
raw QuantumCircuit directly:
from qrisp import QuantumCircuit
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1])
counts = qc.run(backend=oq, shots=1024)
# e.g. {'00': 518, '11': 506}
Authentication
Resolved in this order:
- Pre-built service — pass
service=OpenQuantumService(...)for full control (saved accounts, custom URLs, keyring). - Bearer token — pass
token=or setOPENQUANTUM_TOKEN. - Client credentials — pass
client_id=+client_secret=or setOPENQUANTUM_CLIENT_ID+OPENQUANTUM_CLIENT_SECRET.
| Parameter | Environment Variable | Description |
|---|---|---|
token |
OPENQUANTUM_TOKEN |
Bearer token |
client_id |
OPENQUANTUM_CLIENT_ID |
OAuth2 client ID |
client_secret |
OPENQUANTUM_CLIENT_SECRET |
OAuth2 client secret |
OPENQUANTUM_SDK_KEY |
Path to an SDK-key JSON file ({client_id, client_secret}) |
|
organization_id |
OPENQUANTUM_ORGANIZATION_ID |
Organization UUID (optional if single org) |
scheduler_url |
OPENQUANTUM_SCHEDULER_URL |
Scheduler API base, when the argument is omitted |
management_url |
OPENQUANTUM_MANAGEMENT_URL |
Management API base, when the argument is omitted |
keycloak_base |
OPENQUANTUM_KEYCLOAK_BASE |
Keycloak base, when the argument is omitted |
realm |
OPENQUANTUM_KEYCLOAK_REALM |
Keycloak realm, when the argument is omitted |
OpenQuantumService.from_env() raises AuthenticationError when no credential resolves. Circuits are serialized with the public export_circuit_to_qasm helper from openquantum_sdk_qiskit. The older OPENQUANTUM_*_BASE URL names are not read here; those remain an MCP-only fallback.
Configuration
| Parameter | Default | Description |
|---|---|---|
backend |
required | Backend class ID or short_code (e.g. "ionq:aria-1") |
shots |
1024 |
Default shots when a Qrisp call omits them |
job_subcategory_id |
"oth:oth" |
Workload subcategory (set the most specific match) |
execution_plan |
"auto" |
"auto", "public", "private", an enum, or a plan UUID. "auto" picks the cheapest plan |
queue_priority |
"auto" |
"auto", "standard", "priority", "instant", an enum, or a priority UUID. "auto" picks the cheapest priority |
export_format |
"qasm3" |
"qasm2" or "qasm3" |
configuration_data |
{} |
Backend-specific config passthrough (e.g. {"engine": "amber_quantum_rings"}) |
reverse_bits |
False |
Reverse returned bitstring order if a backend needs it |
verbose |
False |
Print submission progress and credit cost to stdout |
job_timeout_seconds |
86400 |
Max wait for job completion (1 day) |
Backend-specific configuration
Some backends require extra fields. The free Quantum Rings simulator
(qr:gpu-gb10) requires an engine:
oq = OpenQuantumBackend(
backend="qr:gpu-gb10",
shots=1024,
configuration_data={"engine": "amber_quantum_rings"},
)
Bit ordering
Qrisp reads the leftmost character of a bitstring as the most-significant bit.
The platform's counts are passed through unchanged by default. If a specific
backend returns counts in the opposite order, construct the backend with
reverse_bits=True.
License
Apache License 2.0
Metadata
Release files for openquantum-sdk-qrisp 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openquantum_sdk_qrisp-0.5.0.tar.gz | 12.5 kB | Without provenance | Details for openquantum_sdk_qrisp-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openquantum_sdk_qrisp-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for openquantum_sdk_qrisp-0.5.0-py3-none-any.whl |
Total release size: 21.9 kB
Release files / openquantum_sdk_qrisp-0.5.0.tar.gz
| Download URL | openquantum_sdk_qrisp-0.5.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e59dd2d43ca50bc2a0f0e8213b4f6910fbda1a1bc154beeb6cad281ff7614a4b
|
|
BLAKE2b-256 checksum How to use checksums |
c24488ca71d384b3083e37805f6186c7ec19456bb5302e6845e5fe1539430643
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / openquantum_sdk_qrisp-0.5.0-py3-none-any.whl
| Download URL | openquantum_sdk_qrisp-0.5.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73356cf9e64632042e27cca69b367d4f8256915a14a17ce11ab4f86b2bc47dc1
|
|
BLAKE2b-256 checksum How to use checksums |
8e277574a21e21b823cd6f9ea58c83f04955e6bd799b5a89587936a812fa1db6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for openquantum-sdk-qrisp 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.