Skip to main content
API Reference: qbraid.runtime.azure

Installation & Setup

To interface with Azure Quantum supported devices, install the azure extra:
Then, follow the Azure Quantum setup instructions to create a workspace and get your credentials.

Authentication Methods

The AzureQuantumProvider integrates with Azure Quantum via the azure-quantum package. It connects to an Azure Quantum Workspace, which manages your quantum resources.

Using a Connection String

You can authenticate using an Azure connection string, which provides a direct way to access your workspace. First, retrieve your connection string by following these instructions. Then, use it to initialize a Workspace object and pass it to AzureQuantumProvider:

Using Environment Variables

To avoid hardcoding credentials in your code, you can store the connection string as an environment variable instead:
Then, initialize AzureQuantumProvider without passing explicit credentials:

Basic Usage

Submit a Quantum Task to an Azure Quantum device using the AzureQuantumProvider:
Now that we’ve instantiated our device, in this case the IonQ simulator on Azure Quantum, we can construct a quantum circuit and submit a task using the .run method:
We now have job which is of type AzureQuantumTask, which inherits from QuantumJob. To see the results:
See how to visualize these results in the Visualization section.

Supported Providers

Azure Quantum provides access to quantum hardware and simulators from several providers:
  • IonQ
  • Quantinuum
  • Rigetti
  • Pasqal
Each provider may have different requirements and capabilities. Refer to the Azure Quantum documentation for more details about specific providers.

Runtime Options

The AzureQuantumDevice.run() and .submit() methods accept an input_params keyword argument that is passed through to the Azure Quantum backend. Each hardware provider supports different options.

Quantinuum

Quantinuum emulators and hardware support several input parameters for controlling simulation type, noise models, and compiler optimization.

Simulator type

Quantinuum emulators support both state-vector (default) and stabilizer simulation:

Noise model

Disable the emulator’s noise model for ideal simulation:
Customize individual noise parameters:

Compiler options

Control TKET optimization level or disable optimization entirely:
See Quantinuum provider for full details.

IonQ

IonQ devices on Azure support error mitigation and noise model simulation.

Error mitigation

Debiasing is enabled by default on Aria and Forte systems. To explicitly control it:

Noise model simulation

Run on the IonQ simulator with a hardware noise profile:
Set "model": "ideal" for noiseless simulation (up to 29 qubits). See IonQ provider for full details.

Rigetti

Rigetti devices on Azure support compiler control and parameter substitutions.

Skip quilc compilation

When using native Quil or Quil-T programs, you can bypass the quilc compiler:

Parameter substitutions

For parametrized Quil programs, provide values for declared variables:
See Rigetti provider for full details.

Options Reference

Via qBraid Runtime API

When submitting jobs through the QbraidProvider, these same options can be passed via the runtimeOptions field. The runtime API forwards them as input_params to the Azure device.run() or device.submit() call: