API Reference:
qbraid.runtime.azure
Installation & Setup
To interface with Azure Quantum supported devices, install theazure extra:
Authentication Methods
TheAzureQuantumProvider 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 aWorkspace 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:AzureQuantumProvider without passing explicit credentials:
Related Content
- Access Keys - Azure Quantum | Microsoft Learn
- Connect to your Azure Quantum workspace with the azure-quantum Python package
- Authenticate Python apps to Azure services by using the Azure SDK for Python
Basic Usage
Submit a Quantum Task to an Azure Quantum device using theAzureQuantumProvider:
.run method:
job which is of type AzureQuantumTask, which inherits from QuantumJob. To see the results:
Supported Providers
Azure Quantum provides access to quantum hardware and simulators from several providers:- IonQ
- Quantinuum
- Rigetti
- Pasqal
Runtime Options
TheAzureQuantumDevice.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:Compiler options
Control TKET optimization level or disable optimization entirely: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:"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:Options Reference
| Provider | Parameter | Type | Description |
|---|---|---|---|
| Quantinuum | simulator | str | "stabilizer" or "state-vector" (default) |
| Quantinuum | error-model | bool | Enable/disable noise model (default True) |
| Quantinuum | error-params | dict | Custom noise parameters |
| Quantinuum | tket-opt-level | int | TKET optimization level (0-2) |
| Quantinuum | no-opt | bool | Disable compiler optimization |
| IonQ | error-mitigation | dict | {"debias": True/False} |
| IonQ | noise | dict | {"model": "aria-1", "seed": int} |
| Rigetti | skipQuilc | bool | Skip quilc compiler |
| Rigetti | substitutions | dict | Parameter values for Quil programs |
Via qBraid Runtime API
When submitting jobs through the QbraidProvider, these same options can be passed via theruntimeOptions field. The runtime API forwards them as input_params
to the Azure device.run() or device.submit() call:
