IBM Quantum · Arazzo Workflow

IBM Quantum Submit Job and Poll Results

Version 1.0.0

Submit a Qiskit Runtime primitive job, poll until it reaches a terminal state, and fetch the final result.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArazzoWorkflows

Provider

ibm-quantum

Workflows

submit-job-and-poll-results
Run a Qiskit Runtime primitive job on a backend and retrieve its results.
Checks the backend status, submits a primitive job, polls the job until it terminates, and returns the result payload.
4 steps inputs: accessToken, apiVersion, backend, params, programId, serviceCrn outputs: jobId, jobStatus, results
1
checkBackendStatus
Confirm the target backend is reachable and report its operational state and queue length before submitting work to it.
2
submitJob
Invoke the Qiskit Runtime primitive with the supplied program id, backend, and params. The returned job id is used to poll status and fetch results.
3
pollJobStatus
Read the job details and branch on its status. A terminal status ends the poll loop and routes to the result fetch; any non-terminal status loops back to poll again.
4
fetchResults
Retrieve the job's final result payload once the job has completed successfully.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: IBM Quantum Submit Job and Poll Results
  summary: Submit a Qiskit Runtime primitive job, poll until it reaches a terminal state, and fetch the final result.
  description: >-
    The canonical end-to-end Qiskit Runtime execution flow. The workflow first
    confirms the target backend is online and reports its queue depth, then
    invokes a Sampler or Estimator primitive with the supplied program id and
    PUBs, polls the job status until it reaches a terminal Completed, Failed, or
    Cancelled state, and finally retrieves the job's result payload. Every step
    spells out its request inline — including the 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-backends-api-openapi.yml
  type: openapi
- name: jobsApi
  url: ../openapi/ibm-quantum-jobs-api-openapi.yml
  type: openapi
workflows:
- workflowId: submit-job-and-poll-results
  summary: Run a Qiskit Runtime primitive job on a backend and retrieve its results.
  description: >-
    Checks the backend status, submits a primitive job, polls the job until it
    terminates, and returns the result payload.
  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 on which to run the program (e.g. ibm_brisbane).
      programId:
        type: string
        description: ID of the primitive program to execute (e.g. sampler or estimator).
      params:
        type: object
        description: The primitive input params object (e.g. Sampler pubs).
  steps:
  - stepId: checkBackendStatus
    description: >-
      Confirm the target backend is reachable and report its operational state
      and queue length before submitting work to it.
    operationId: get_backend_status
    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:
      backendState: $response.body#/state
      queueLength: $response.body#/length_queue
  - stepId: submitJob
    description: >-
      Invoke the Qiskit Runtime primitive with the supplied program id, backend,
      and params. The returned job id is used to poll status and fetch results.
    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
  - stepId: pollJobStatus
    description: >-
      Read the job details and branch on its status. A terminal status ends the
      poll loop and routes to the result fetch; any non-terminal status loops
      back to poll again.
    operationId: get_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
    - name: id
      in: path
      value: $steps.submitJob.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      jobStatus: $response.body#/status
    onSuccess:
    - name: jobCompleted
      type: goto
      stepId: fetchResults
      criteria:
      - context: $response.body
        condition: $.status == "Completed"
        type: jsonpath
    - name: jobStillRunning
      type: goto
      stepId: pollJobStatus
      criteria:
      - context: $response.body
        condition: $.status == "Queued" || $.status == "Running"
        type: jsonpath
  - stepId: fetchResults
    description: >-
      Retrieve the job's final result payload once the job has completed
      successfully.
    operationId: get_job_results_jid
    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: $steps.submitJob.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      results: $response.body
  outputs:
    jobId: $steps.submitJob.outputs.jobId
    jobStatus: $steps.pollJobStatus.outputs.jobStatus
    results: $steps.fetchResults.outputs.results

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/ibm-quantum-submit-job-and-poll-results-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.