API Reference:
qbraid.runtime.origin
Overview
Theqbraid.runtime.OriginProvider provides support for OriginQ’s quantum computing systems
through the OriginQ QCloud platform. This means you can write quantum programs using
PyQPanda3, and run them on OriginQ’s cloud-based simulators and quantum processors,
all from within the qBraid Runtime framework.
Getting started
Before you begin, make sure you have:- An OriginQ QCloud account and API key.
- Python >= 3.10
Set up the qBraid-SDK
Install qBraid with theorigin extra from PyPI using pip:
pyqpanda3.
Note: The qBraid-SDK requires Python 3.10 or greater. You can check your
Python version by running
python --version from the command line.Authentication
By default, qBraid will look for an environment variable namedORIGIN_API_KEY.
Set it from your command line:
OriginProvider() with no arguments and assume that qBraid
will automatically find your API key from the environment.
List available devices
Use theOriginProvider to list all devices to which you have access:
Available simulators
OriginQ provides several cloud-based quantum simulators:Submitting jobs
TheOriginProvider accepts quantum programs as PyQPanda3 QProg objects.
Create a program
Run a job
Usedevice.run() to submit a program:
Batch submission
Submit multiple programs in a single call:For simulator backends, batch inputs are submitted as individual jobs. For QPU
backends, batch inputs are submitted as a single job using the native batch
API.
Retrieving results
Depending on the backend, results may be returned as probabilities,
measurement counts, or both. Use
result.data.get_probabilities() to retrieve
probability distributions and result.data.measurement_counts for shot-based
counts.