Skip to content

Qrisp Plugin Overview

The openquantum-sdk[qrisp] plugin connects Qrisp to the Open Quantum platform, letting you run high-level Qrisp programs on real QPU hardware. It builds on the Core SDK (openquantum-sdk) for authentication and job submission, and on the Qiskit plugin for circuit conversion.

Eclipse Qrisp is a high-level quantum programming language released as an open-source project under the Eclipse Foundation. Learn more at the Qrisp website and the Qrisp GitHub repository.

Installation

pip install "openquantum-sdk[qrisp]"

This pulls in qrisp, openquantum-sdk, and openquantum-sdk-qiskit. There is no additional registration step; import OpenQuantumBackend and pass it to your Qrisp circuit.

What the Plugin Does

Qrisp has built-in Qiskit compatibility and can convert any program to a Qiskit circuit (QuantumCircuit.to_qiskit()). The plugin combines this feature with Open Quantum's Qiskit serializer to convert Qrisp to OpenQASM. When you call get_measurement (or qc.run) with an OpenQuantumBackend, the plugin:

  1. Compiles your Qrisp program to a Qiskit circuit.
  2. Flattens it onto a single quantum register.
  3. Validates it against the target backend's capabilities (gate set, coupling map, shot and qubit limits).
  4. Converts it to OpenQASM and submits it through the Core SDK scheduler.
  5. Returns results in Qrisp's native decoded form, so the rest of your program is unchanged.

Quick Example

from qrisp import QuantumVariable, h, cx
from qrisp_openquantum import OpenQuantumBackend

oq = OpenQuantumBackend(
    backend="rigetti:cepheus-1-108q",
    shots=1024,
    client_id="s_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.51, '11': 0.49}

Tip

Set OPENQUANTUM_CLIENT_ID and OPENQUANTUM_CLIENT_SECRET as environment variables to avoid passing credentials in code. See the Authentication guide.

Key Components

Component Description
OpenQuantumBackend Qrisp Backend subclass. Implements run_async() to execute programs on Open Quantum.
OpenQuantumJob Qrisp Job wrapper holding the completed counts.
Qiskit serializer export_circuit_to_qasm, imported from the public openquantum_sdk_qiskit package, converts circuits to OpenQASM.
Core session Shared OpenQuantumClient auth, token caching, and job submission.

Supported Backends

The plugin works with any backend on the Open Quantum platform, identified by its short_code (e.g. "ionq:forte-1", "rigetti:cepheus-1-108q"). Discover backends with the Core SDK, the Qiskit plugin, or the Open Quantum Portal.

Shot-Based Execution Only

Open Quantum is a shot-based platform. Every execution requires a finite number of shots, set via the backend's shots option or the shots= argument to get_measurement / run.

Next Steps