arazzo: 1.0.1 info: title: IBM Quantum Select Backend and Submit Job summary: List accessible backends, inspect a chosen backend's configuration, and submit a job to it. description: >- A backend-aware submission flow. The workflow enumerates every backend the service instance can reach, reads the chosen backend's configuration to confirm its qubit count and basis gates, and then submits a primitive job to that backend. Each request inlines its bearer token, Service-CRN, and IBM-API-Version headers so the flow can be read and executed without opening the underlying OpenAPI descriptions. version: 1.0.0 sourceDescriptions: - name: backendsApi url: ../openapi/ibm-quantum-runtime-backends-openapi.yml type: openapi - name: jobsApi url: ../openapi/ibm-quantum-runtime-jobs-openapi.yml type: openapi workflows: - workflowId: select-backend-and-submit-job summary: Discover backends, verify a backend's configuration, and submit a job to it. description: >- Lists backends, retrieves the chosen backend's configuration, and submits a primitive job to that backend. inputs: type: object required: - accessToken - serviceCrn - apiVersion - backend - programId - params properties: accessToken: type: string description: IBM Cloud IAM bearer token used in the Authorization header. serviceCrn: type: string description: IBM Cloud Service CRN identifying the Qiskit Runtime instance. apiVersion: type: string description: API version date sent in the IBM-API-Version header (e.g. 2026-03-15). backend: type: string description: Name of the backend to inspect and target (e.g. ibm_brisbane). programId: type: string description: ID of the primitive program to execute. params: type: object description: The primitive input params object. steps: - stepId: listBackends description: >- Enumerate all backends the service instance has access to, with their status and queue lengths. operationId: list_backends parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: Service-CRN in: header value: $inputs.serviceCrn - name: IBM-API-Version in: header value: $inputs.apiVersion successCriteria: - condition: $statusCode == 200 outputs: devices: $response.body#/devices - stepId: getBackendConfiguration description: >- Read the chosen backend's configuration to confirm its qubit count and basis gates before submitting an ISA circuit to it. operationId: get_backend_configuration parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: Service-CRN in: header value: $inputs.serviceCrn - name: IBM-API-Version in: header value: $inputs.apiVersion - name: id in: path value: $inputs.backend successCriteria: - condition: $statusCode == 200 outputs: nQubits: $response.body#/n_qubits basisGates: $response.body#/basis_gates - stepId: submitJob description: >- Submit the primitive job to the validated backend and capture the new job id. operationId: create_job parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: Service-CRN in: header value: $inputs.serviceCrn - name: IBM-API-Version in: header value: $inputs.apiVersion requestBody: contentType: application/json payload: program_id: $inputs.programId backend: $inputs.backend params: $inputs.params successCriteria: - condition: $statusCode == 200 outputs: jobId: $response.body#/id assignedBackend: $response.body#/backend outputs: devices: $steps.listBackends.outputs.devices nQubits: $steps.getBackendConfiguration.outputs.nQubits jobId: $steps.submitJob.outputs.jobId