Documentation Index
Fetch the complete documentation index at: https://docs.qbraid.com/llms.txt
Use this file to discover all available pages before exploring further.
API Reference:
qbraid.runtime.rigetti
Prerequisites
Before getting started, ensure you have:- A Rigetti QCS account with an active refresh token (contact Rigetti to obtain access).
- The Forest SDK installed locally — specifically the
quilccompiler. Theqvmsimulator is optional. - Python > 3.10 and < 3.13
Install the Forest SDK
Thequilc compiler is required to compile Quil programs into the native gate set of the target QPU. Install it for your platform:
- macOS / Linux: Download from qcs.rigetti.com/sdk-downloads
- Docker:
docker run --rm -p 5555:5555 rigetti/quilc -S
Installation & Setup
Install therigetti extra:
pyquil and qcs-sdk-python.
Authentication
TheRigettiProvider authenticates with Rigetti QCS using an OAuth refresh token. Set it as an environment variable (required):
Optional Environment Variables
| Variable | Description | Default |
|---|---|---|
RIGETTI_CLIENT_ID | Custom OAuth client ID | Rigetti default |
RIGETTI_ISSUER | Custom OAuth issuer URL | Rigetti default |
QCS_GRPC_ENDPOINT | QCS gRPC API endpoint | https://grpc.qcs.rigetti.com |
QCS_QUILC_ENDPOINT | quilc compiler endpoint | tcp://127.0.0.1:5555 |
QCS_QVM_ENDPOINT | QVM simulator endpoint | http://127.0.0.1:5000 |
Provider Setup
After initializing the provider, callsetup() to manage the local quilc compiler process. This ensures quilc is running and ready to compile programs:
setup() method accepts the following keyword arguments:
| Parameter | Type | Default | Description |
|---|---|---|---|
quilc_endpoint | str | None | Pre-existing quilc endpoint. Skips local process start. |
qvm_endpoint | str | None | Pre-existing QVM endpoint. Skips local process start. |
grpc_endpoint | str | None | Override for the QCS gRPC endpoint. |
start_quilc | bool | True | Auto-start local quilc if not already running. |
start_qvm | bool | False | Auto-start local QVM if not already running. |
Getting Available Devices
List all quantum processors available through your QCS account:Submitting Jobs
TheRigettiProvider accepts programs written in Quil using the pyquil library. Programs are compiled via quilc before submission to the QPU.
Create a Program
Run a Job
Usedevice.run() to compile and submit in one step:
Batch Submission
Submit multiple programs in a single call:Retrieving Results
Check Job Status
Cancel a Job
Cancellation is best-effort. Jobs already in a terminal state (
COMPLETED,
FAILED, CANCELLED) cannot be cancelled.Runtime Options
Thedevice.run() method accepts an optional runtime_options dict to control compilation
and translation behavior:
Options Reference
| Parameter | Type | Description |
|---|---|---|
compiler_timeout | float | quilc compilation timeout in seconds. |
prepend_default_calibrations | bool | Prepend default calibration pulses during translation. |
passive_reset_delay_seconds | float | Delay between passive resets. |
allow_unchecked_pointer_arithmetic | bool | Disable runtime memory bounds checking (authorized access). |
allow_frame_redefinition | bool | Allow frame definitions that differ from Rigetti defaults (authorized access). |
