Runtime Overview
The qBraid Runtime framework defines essential abstractions for sessions, providers, devices, jobs, and results, integrating them into a complete client-side software pipeline. Leveraging device and domain-specific requirements outlined by each provider, it generates coherent target “profiles,” program “specs,” and compilation “schemes”. These elements, referred to as Universal Pipeline Components (UPCs), form the foundational building blocks for constructing scalable quantum software pipelines. Each UPC plays a unique and distinct role, utilizing quantum and/or classical resources. Collectively, these components optimize the management of the entire quantum job lifecycle—from defining quantum programs to dispatching jobs to remote servers to post-processing results—and ensure the efficient production of outputs for diverse computational tasks.Building Pipelines
Theqbraid.runtime
module provides the following Universal Pipeline Components (UPCs):
- TargetProfile: Specifies domain and device-specific runtime instructions to tailor quantum executions to particular hardware configurations.
- QuantumProvider: Converts device metadata into accessible Python objects, facilitating interaction with diverse quantum computing resources.
- QuantumDevice: Describes the unique parameters and operational settings necessary for executing quantum programs on specific hardware.
- QuantumJob: Represents the transitional states of quantum programs, managing both ongoing and completed quantum computations.
- Result: Captures and structures the output from quantum computations, including histograms and raw data, for analysis and interpretation.
GET
/devices
(or similar) - To retrieve metadata about available quantum devices.POST
/jobs
(or similar) - To submit a quantum job for execution on a specified device.GET
/jobs
(or similar) - To retrieve the status and results of an executed quantum job.
Quantum Job Submission Process
When aQuantumDevice.run
method is called, the following steps are performed to process a quantum program and submit it as a job to a remote API:
- Transpile: Performs a “program type conversion” according to the
ProgramSpec
(s) specified by the device’sTargetProfile
- Transform: Applies any device-specific passes (e.g., gate decompositions to map the circuit to a
TargetProfile.basis_gates
set). - Validate: Verify that the run input satisfies all criteria for submitting to the given device (e.g., ensuring the number of qubits in the circuit does not exceed the device’s capacity).
- Prepare: Serializes the run input or converts it to any lower-level IR required for submission to the remote API (e.g., string, JSON, or bytecode format).
- Submit: Sends
POST
request (or equivalent) with program and all runtime parameters to the remote API, and returns aQuantumJob
instance.