Skip to main content
API Reference: qbraid.runtime.rigetti
On-demand access to Rigetti quantum systems (Ankaa, Cepheus) is restricted. You must contact Rigetti to request access credentials before using this provider.

Prerequisites

Before getting started, ensure you have:
  1. A Rigetti QCS account with an active refresh token (contact Rigetti to obtain access).
  2. The Forest SDK installed locally — specifically the quilc compiler. The qvm simulator is optional.
  3. Python > 3.10 and < 3.13

Install the Forest SDK

The quilc compiler is required to compile Quil programs into the native gate set of the target QPU. Install it for your platform: Verify the installation:

Installation & Setup

Install the rigetti extra:
This installs the required dependencies: pyquil and qcs-sdk-python.

Authentication

The RigettiProvider authenticates with Rigetti QCS using an OAuth refresh token. Set it as an environment variable (required):
Then initialize the provider:

Optional Environment Variables

Provider Setup

After initializing the provider, call setup() to manage the local quilc compiler process. This ensures quilc is running and ready to compile programs:
The setup() method accepts the following keyword arguments:

Getting Available Devices

List all quantum processors available through your QCS account:
Get a specific device by its processor ID:

Submitting Jobs

The RigettiProvider 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

Use device.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

The device.run() method accepts an optional runtime_options dict to control compilation and translation behavior:

Options Reference

Full Example

A complete end-to-end workflow targeting the Ankaa-3 processor: