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

Installation & Setup

To interface with the qBraid QIR simulator or any of the 10+ quantum devices supported by qBraid’s managed access, install the relevant qbraid runtime extra(s) based on your device(s) of choice:
qbraid versions <0.11 are not compatible with qBraid API V2. See migration guide.To ensure compatibility with the new platform, use qbraid ≥ 0.11.0.
Next, obtain your qBraid API key:
  1. Login or create an account at account.qbraid.com.
  2. Navigate to Account > API Keys in the left-sidebar, and then click “Create API Key”.

Save account to disk

Once you have your API key, you can save it locally in a configuration file ~/.qbraid/qbraidrc, where ~ corresponds to your home ($HOME) directory:
Account credentials are saved in plain text, so only do so if you are using a trusted device.
Once the account is saved on disk, you can instantiate the provider without any arguments:

Load account from environment variables

Alternatively, the qBraid-SDK can discover credentials from environment variables:

Basic Usage

Given a device “QRN” (qBraid Resource Name), a QbraidDevice object can be created as follows:
From here, class methods are available to get information about the device, execute quantum programs, access the wrapped device object directly, and more.
Then you can submit quantum jobs to the device.
See how to visualize these results in the Visualization section.

Runtime Options

When submitting jobs through the QbraidProvider, you can pass provider-specific options using the runtime_options keyword argument. These options are forwarded directly to the underlying cloud provider’s submission API, giving you access to device-specific features without needing to configure provider credentials yourself.
The runtime_options dictionary is passed through as-is to the provider backend:
  • Amazon Braket devices: options are unpacked as keyword arguments to the Braket device.run() call
  • Azure Quantum devices: options are passed as input_params to the Azure device.run() or device.submit() call
  • qBraid devices: options are merged into the job submission payload

Amazon Braket Examples

Enable experimental capabilities on supported devices:
Disable qubit rewiring for verbatim compilation on Rigetti:
See BraketProvider - Runtime Options for the full list of supported options.

Azure Quantum Examples

Use the stabilizer simulator on Quantinuum emulators:
Disable noise model and compiler optimization:
See AzureQuantumProvider - Runtime Options for provider-specific options.

IonQ Examples

Run with a hardware noise profile on the IonQ simulator:
“Noise” options include: ideal, harmony, harmony-1, harmony-2, aria-1, aria-2, forte-1, forte-enterprise-1

Next Steps

See Job Execution for single job submission, group jobs, and cross-device workflows.