# Q-CTRL MCP tools

> Every tool your AI app can call, with its inputs and outputs

Source: https://docs.q-ctrl.com/agent-resources/mcp/q-ctrl-mcp-tools

Your AI app sees the tools below once you [connect it to Q-CTRL MCP](https://docs.q-ctrl.com/agent-resources/mcp/how-to-connect-your-ai-app-to-q-ctrl-mcp.md).
Each tool has badges that tell you what it does:

- **Read only**: the tool only reads data.
- **Deletes data**: the tool removes data, such as a saved credential.
- **Uses hardware time**: the tool runs circuits on your hardware provider account. Your app should ask you before it calls it.

## Account

### Who am I

`qctrl_whoami` · Read only

Show who the agent is signed in as: the user's name and email, the organization they're working in, their other organizations, and which Q-CTRL products each organization can use.
Call this when another tool says the organization is missing or access is denied.
NOT for listing quantum computers, jobs or results.

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user` | User | Yes | The signed-in user. |
| `user.id` | string | Yes | The user's Q-CTRL user ID. |
| `user.email` | string | Yes | The user's email address. |
| `user.username` | string | Yes | The user's username, if set. |
| `user.first_name` | string | Yes | The user's first name, if set. |
| `user.last_name` | string | Yes | The user's last name, if set. |
| `user.status` | string | Yes | The status of the user's account. |
| `selected_organization` | OrganizationSummary | Yes | The organization the user works in now, or null if none. |
| `selected_organization.id` | string | Yes | The organization ID. |
| `selected_organization.name` | string | Yes | The organization's display name. |
| `selected_organization.slug` | string | Yes | The organization's short URL name. |
| `organizations` | array of Organization | Yes | All organizations the user is a member of. |
| `organizations[].id` | string | Yes | The organization ID. |
| `organizations[].name` | string | Yes | The organization's display name. |
| `organizations[].slug` | string | Yes | The organization's short URL name. |
| `organizations[].products` | array of Product | Yes | The Q-CTRL products the organization can use. |
| `organizations[].products[].name` | string | Yes | The product name. |
| `organizations[].products[].active` | boolean | Yes | True if the organization can use the product now. |
| `organizations[].products[].roles` | array of string | Yes | The product roles in this organization. |

## Hardware credentials

### Add hardware credential

`qctrl_add_credential`

Ask the user to add a quantum hardware provider credential (IBM Cloud, Amazon Braket or IonQ) for Fire Opal.
The user enters the credential on a secure Q-CTRL page, not in the chat. Never ask the user to paste a token or key into the chat.
You do not need to call this before a Fire Opal tool: those tools ask for a credential themselves when the user has none.
NOT for listing or removing credentials: use qctrl_list_credentials or qctrl_remove_credentials.

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The credential name, for credential_name in Fire Opal tools. |
| `provider` | "ibm_cloud" \| "braket" \| "ionq" | Yes | The hardware provider: ibm_cloud, braket or ionq. |
| `expires_at` | string | Yes | When the server deletes the credential, in UTC: 1 hour, 24 hours or 30 days after saving, as the user chose. |

### List hardware credentials

`qctrl_list_credentials` · Read only

List the user's saved quantum hardware provider credentials for Fire Opal: the name, provider and expiry time of each.
Use a name as credential_name in Fire Opal tools, or with qctrl_remove_credentials. Secrets are never shown.
NOT for adding a credential (use qctrl_add_credential) or for checking that a credential works.

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `credentials` | array of Credential | Yes | The user's saved credentials, sorted by name. |
| `credentials[].name` | string | Yes | The credential name, unique for the user. |
| `credentials[].provider` | "ibm_cloud" \| "braket" \| "ionq" | Yes | The hardware provider: ibm_cloud, braket or ionq. |
| `credentials[].expires_at` | string | Yes | When the server deletes the credential, in UTC. |

### Remove hardware credentials

`qctrl_remove_credentials` · Deletes data

Remove saved quantum hardware provider credentials for Fire Opal, by name.
Get the names from qctrl_list_credentials. This cannot be undone; the user must add the credential again to use it.
NOT for replacing a credential: run qctrl_add_credential and save with the same name on the credential page.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `names` | array of string | Yes | The names of the credentials to remove, from qctrl_list_credentials. 1 to 50 names. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `removed` | array of string | Yes | The names of the deleted credentials. |
| `not_found` | array of string | Yes | The names the user has no credential for. Nothing was deleted for them. |

## Fire Opal

### Show supported devices

`qctrl_fire_opal_show_supported_devices` · Read only

List the quantum computers (backends) the user can run Fire Opal on with one of their saved hardware credentials, for example ibm_fez or ibm_torino.
Call this before any Fire Opal submit tool to choose a valid backend_name. Free; uses no hardware time.
NOT for the results of a past job (use qctrl_get_job). Get credential_name from qctrl_list_credentials.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `credential_name` | string | Yes | The saved credential the list is for. |
| `provider` | "ibm_cloud" \| "braket" \| "ionq" | Yes | The credential's hardware provider. |
| `devices` | array of string | Yes | The backend names Fire Opal can run with this credential, sorted. Pass one as backend_name to the other Fire Opal tools. |

### Validate circuits

`qctrl_fire_opal_validate` · Read only

Check OpenQASM circuits for a Fire Opal backend without running them. Returns whether they are valid, what to fix if not (Fire Opal stops at the first invalid circuit), and warnings that may hurt performance.
Call this before qctrl_fire_opal_execute when you wrote or changed a circuit, with the same parameters you will run. Free; uses no hardware time. Needs an IBM Cloud or Amazon Braket credential.
NOT for qctrl_fire_opal_solve_qaoa, qctrl_fire_opal_simulate_dynamics or qctrl_fire_opal_integrate_monte_carlo, which build their own circuits.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `circuits` | array of string | Yes | The circuits, as OpenQASM 2.0 or 3 text, 1 to 300, counted from 0 in messages. Each starts with "OPENQASM 2.0;" or "OPENQASM 3.0;" and is under 1 MB. |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |
| `run_options` | RunOptions | No |  |
| `run_options.session_id` | string | No | An open IBM session to run in. |
| `run_options.job_tags` | array of string | No | Tags to add to the IBM jobs, at most 50. |
| `run_options.reduce_approximation` | boolean | No | Ask Fire Opal to reduce circuit approximation. |
| `parameters` | array of object | No | Values for parametric circuits: one set per circuit, in the same order, each mapping a parameter name to its value. Not for braket credentials. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `backend_name` | string | Yes | The backend the circuits were checked for. |
| `circuit_count` | integer | Yes | How many circuits were checked. |
| `valid` | boolean | Yes | True if every circuit can run on the backend. |
| `problems` | array of string | Yes | What to fix, empty when valid: every problem the server's own checks found, or Fire Opal's message for the first invalid circuit. Check again after fixing it. Circuits are counted from 0. |
| `warnings` | array of string | Yes | Issues that do not stop the circuits from running but may hurt performance. |

### Execute circuits

`qctrl_fire_opal_execute` · Uses hardware time

Run OpenQASM circuits on quantum hardware (or a provider simulator) with Fire Opal error suppression. The circuits are validated first, and nothing runs if one is invalid. Returns a job_id straight away; then call qctrl_get_job until it shows SUCCESS, and read each circuit's bitstrings with qctrl_fire_opal_get_circuit_results.
This uses hardware time on the user's provider account (IBM Cloud or Amazon Braket), so call it only after the user confirms the backend, number of circuits and shots.
NOT for expectation values (use qctrl_fire_opal_estimate_expectation) or variational loops (use qctrl_fire_opal_iterate).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `circuits` | array of string | Yes | The circuits, as OpenQASM 2.0 or 3 text, 1 to 300, counted from 0 in messages. Each starts with "OPENQASM 2.0;" or "OPENQASM 3.0;" and is under 1 MB. |
| `shot_count` | integer | Yes | How many times to run each circuit, 1 to 100000. |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |
| `parameters` | array of object | No | Values for parametric circuits: one set per circuit, in the same order, each mapping a parameter name to its value. Not for braket credentials. |
| `run_options` | RunOptions | No |  |
| `run_options.session_id` | string | No | An open IBM session to run in. |
| `run_options.job_tags` | array of string | No | Tags to add to the IBM jobs, at most 50. |
| `run_options.reduce_approximation` | boolean | No | Ask Fire Opal to reduce circuit approximation. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `status` | string | Yes | The job's status when it started, usually PENDING. |
| `workflow` | string | Yes | The Fire Opal workflow the job runs. |
| `backend_name` | string | Yes | The backend the job runs on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the job runs in. |
| `warnings` | array of string | No | Fire Opal's warnings about the circuits that may hurt performance, from validation; empty for jobs whose circuits Fire Opal builds. The job still runs. |
| `next_step` | string | Yes | What to call next to follow the job. |
| `circuit_count` | integer | Yes | How many circuits the job runs. |
| `shot_count` | integer | Yes | How many times each circuit runs. |

### Estimate expectation values

`qctrl_fire_opal_estimate_expectation` · Uses hardware time

Run OpenQASM circuits on a real quantum computer with Fire Opal and estimate expectation values of Pauli observables, such as the energy of a Hamiltonian, instead of raw bitstrings. The circuits are validated first, and nothing runs if one is invalid. Returns a job_id straight away; then call qctrl_get_job until it shows SUCCESS, and read the values with qctrl_fire_opal_get_circuit_results (expectation_values field).
This uses hardware time on the user's IBM Cloud account, so call it only after the user confirms the backend, circuits, observables and shots.
NOT for raw bitstrings (use qctrl_fire_opal_execute) or a step in an optimization loop (use qctrl_fire_opal_iterate_expectation).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `circuits` | array of string | Yes | The circuits, as OpenQASM 2.0 or 3 text, 1 to 300, counted from 0 in messages. Each starts with "OPENQASM 2.0;" or "OPENQASM 3.0;" and is under 1 MB. |
| `observables` | array of PauliOperator | Yes | The observables, 1 to 1000. Fire Opal estimates every observable on every circuit. To get one value per term, such as each edge of a max-cut, give each term as its own observable; to get one total, such as an energy, give one observable with all the terms. |
| `observables[].paulis` | array of string | Yes | The Pauli strings, 1 to 1000: one letter (I, X, Y or Z) per qubit of the circuits, so each is as long as the circuits' qubit count. In Qiskit order: the rightmost letter acts on qubit 0, so on 3 qubits "ZZI" is Z on qubits 1 and 2. |
| `observables[].coefficients` | array of number | Yes | The real weight of each Pauli string, in the same order. |
| `shot_count` | integer | Yes | How many times to run each circuit, 1 to 100000. |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |
| `parameters` | array of object | No | Values for parametric circuits: one set per circuit, in the same order, each mapping a parameter name to its value. Not for braket credentials. |
| `run_options` | RunOptions | No |  |
| `run_options.session_id` | string | No | An open IBM session to run in. |
| `run_options.job_tags` | array of string | No | Tags to add to the IBM jobs, at most 50. |
| `run_options.reduce_approximation` | boolean | No | Ask Fire Opal to reduce circuit approximation. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `status` | string | Yes | The job's status when it started, usually PENDING. |
| `workflow` | string | Yes | The Fire Opal workflow the job runs. |
| `backend_name` | string | Yes | The backend the job runs on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the job runs in. |
| `warnings` | array of string | No | Fire Opal's warnings about the circuits that may hurt performance, from validation; empty for jobs whose circuits Fire Opal builds. The job still runs. |
| `next_step` | string | Yes | What to call next to follow the job. |
| `circuit_count` | integer | Yes | How many circuits the job runs. |
| `shot_count` | integer | Yes | How many times each circuit runs. |

### Get circuit results

`qctrl_fire_opal_get_circuit_results` · Read only

Get the results of one circuit in a finished Fire Opal job: the most likely bitstrings with their probabilities, or the expectation values for expectation jobs.
Call this after qctrl_get_job shows SUCCESS. Circuit IDs are 0 to the number of circuits submitted minus 1, in the order they were submitted.
NOT for QAOA, Monte Carlo or dynamics jobs (use qctrl_fire_opal_get_qaoa_results, qctrl_fire_opal_get_monte_carlo_results or qctrl_fire_opal_get_dynamics_results). For the full data in a script, use qctrl_get_results_link.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The Fire Opal job ID (digits only). |
| `circuit_id` | integer | Yes | The circuit's position in the submitted list, from 0 to the number of circuits minus 1. |
| `top` | integer | No | How many of the most likely outcomes to return, 1 to 100. Ignored for expectation jobs. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `circuit_id` | integer | Yes | The circuit's position in the submitted list, from 0. |
| `circuit_count` | integer | Yes | How many circuits the job's result has. |
| `histogram` | array of Outcome | Yes | The most likely outcomes, at most `top`, sorted by probability, then by bitstring. Empty for expectation jobs. |
| `histogram[].bitstring` | string | Yes | The measured bitstring. |
| `histogram[].probability` | number | Yes | The bitstring's probability, from 0 to 1. |
| `histogram_total_outcomes` | integer | Yes | How many distinct outcomes the full histogram has. |
| `other_outcomes_probability` | number | Yes | The total probability of the outcomes not in histogram, rounded to 6 decimal places. |
| `expectation_values` | array of number | Yes | The circuit's expectation values, for expectation jobs only. At most the first 200; expectation_value_count says how many there are. |
| `standard_deviations` | array of number | Yes | The standard deviations of expectation_values, when the job has them. At most the first 200. |
| `expectation_value_count` | integer | Yes | How many expectation values the circuit has, including any not in expectation_values. 0 for counts jobs. |

### Get dynamics results

`qctrl_fire_opal_get_dynamics_results` · Read only

Get the result of a finished Fire Opal dynamics simulation job: one time series of expectation values per requested observable, from time 0 to the final evolved state.
Call this after qctrl_get_job shows SUCCESS for a job from qctrl_fire_opal_simulate_dynamics.
NOT for other job types (use qctrl_get_job to see which results tool fits).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The Fire Opal job ID (digits only). |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `series` | array of ObservableSeries | Yes | One time series per submitted observable, in the submitted order, at most 100. |
| `series[].observable_index` | integer | Yes | The observable's position in the submitted observables list, from 0. |
| `series[].values` | array of number | Yes | The observable's expectation values from time 0: the initial state, then one value after each time step, at most 101. |
| `observable_count` | integer | Yes | How many observables the job returned. More than the series listed when they were cut to 100. |
| `point_count` | integer | Yes | How many values the job returned per observable: one for time 0 and one per time step. More than each series lists when they were cut to 101. |
| `provider_job_ids` | array of string | Yes | The hardware provider's job IDs, at most 50, each cut to 100 characters. |
| `warnings` | array of string | Yes | Fire Opal's warnings about the run, at most 10. |

### Get Monte Carlo results

`qctrl_fire_opal_get_monte_carlo_results` · Read only

Get the result of a finished Fire Opal Monte Carlo integration job: the estimate, its variance and the number of iterations.
Call this after qctrl_get_job shows SUCCESS for a job from qctrl_fire_opal_integrate_monte_carlo.
NOT for other job types (use qctrl_get_job to see which results tool fits).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The Fire Opal job ID (digits only). |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job the result is for. |
| `estimate` | number | Yes | The final estimate of the expected value. |
| `variance` | number | Yes | The variance of the estimate. |
| `standard_deviation` | number | Yes | The square root of the variance, in the estimate's units. |
| `iteration_count` | integer | Yes | How many iterations the job ran. |
| `iterations` | array of MonteCarloIteration | Yes | The estimate after each iteration, at most the last 50, in order. Null unless the job was submitted with full_output. |
| `iterations[].estimate` | number | Yes | The estimate after this iteration. |
| `iterations[].variance` | number | Yes | The variance of that estimate. |
| `iterations[].iteration_count` | integer | Yes | The iterations run so far. |

### Get QAOA results

`qctrl_fire_opal_get_qaoa_results` · Read only

Get the results of a finished Fire Opal QAOA job: the best bitstring and its cost, the QAOA parameters that found it, and the most likely measured outcomes.
Call this after qctrl_get_job shows SUCCESS for a job from qctrl_fire_opal_solve_qaoa.
NOT for other Fire Opal jobs: for circuit jobs use qctrl_fire_opal_get_circuit_results, for Monte Carlo jobs qctrl_fire_opal_get_monte_carlo_results, and for dynamics jobs qctrl_fire_opal_get_dynamics_results.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The Fire Opal job ID (digits only). |
| `top` | integer | No | How many of the most likely outcomes to return, 1 to 100. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The Fire Opal job ID. |
| `solution_bitstring` | string | Yes | The bitstring with the lowest cost that Fire Opal found. |
| `solution_cost` | number | Yes | The cost of solution_bitstring. Lower is better. |
| `best_parameters` | array of number | Yes | The optimized QAOA beta and gamma values that found the solution. |
| `iteration_count` | integer | Yes | How many optimizer iterations the job ran. |
| `variables_to_bitstring_index_map` | object | Yes | Which bitstring position (from 0) holds each problem variable. Empty when the map has more than 200 entries; the summary then says so. |
| `outcomes` | array of QaoaOutcome | Yes | The most likely measured outcomes, by count (ties by bitstring), at most top of them. |
| `outcomes[].bitstring` | string | Yes | The measured bitstring. |
| `outcomes[].count` | integer | Yes | How many shots measured this bitstring. |
| `outcomes[].probability` | number | Yes | count over the total shots in the final distribution, 0 to 1. |
| `outcomes[].cost` | number | Yes | The bitstring's cost from the job's cost map, or null if it has none. Lower is better: Fire Opal minimizes the cost. Only the returned outcomes' costs are kept; get every cost with qctrl_get_results_link. |
| `outcomes[].is_solution` | boolean | Yes | True if this is the best solution. |
| `total_outcomes` | integer | Yes | How many distinct bitstrings were measured, outcomes included. |
| `other_outcomes_probability` | number | Yes | The share of shots, 0 to 1, that measured a bitstring not in outcomes. |
| `warnings` | array of string | Yes | Fire Opal's warnings about the job, at most 10. |
| `variable_count` | integer | Yes | How many problem variables the job had. When it is more than 200, variables_to_bitstring_index_map is empty; get the full map with qctrl_get_results_link. |

## Jobs

### Get a job

`qctrl_get_job` · Read only

Get the status of one Q-CTRL job: PENDING, STARTED, SUCCESS, FAILURE and so on, with its workflow, progress and timestamps, and which tool reads its results.
Call this after a submit tool to check progress. If the job is still running, wait before checking again (start at 10 seconds; hardware queues can take minutes or hours) and tell the user it is running.
NOT for results themselves: use the tool named in next_step.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID (digits only), as a submit tool returned it. |
| `product` | "fire-opal" \| "boulder-opal" | No | The Q-CTRL product the job belongs to. Pass boulder-opal for a Boulder Opal job: with the default, it gets Fire Opal's errors and results tools. The lookup is the same for both. Defaults to fire-opal. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `product` | "fire-opal" \| "boulder-opal" | Yes | The product the job was looked up for. The API does not say which product ran a job, so this is the product that was asked for. |
| `workflow_type` | string | Yes | The workflow the job runs, without the _workflow suffix, for example compile_and_run, or null if the API does not say. |
| `status` | "PENDING" \| "RECEIVED" \| "STARTED" \| "RETRY" \| "SUCCESS" \| "FAILURE" \| "REVOKED" or string | Yes | The job status: PENDING, RECEIVED, STARTED, RETRY, SUCCESS, FAILURE or REVOKED. A status the server does not know passes through. |
| `created_at` | string | Yes | When the job was created, or null if the API does not say. |
| `updated_at` | string | Yes | When the job last changed, or null if the API does not say. |
| `progress` | number | Yes | The fraction of the job's tasks that have finished, from 0 to 1 (1 once the job ends), or null if the API cannot calculate it. |
| `errors` | array of string | Yes | Why a failed job failed, written for the user. Empty when the job did not fail or the error holds nothing safe to show. |
| `is_finished` | boolean | Yes | True once the job is SUCCESS, FAILURE or REVOKED. |
| `next_step` | string | Yes | What to do next, and which tool to call. |

### List jobs

`qctrl_list_jobs` · Read only

List the user's own Q-CTRL jobs, newest first, with each job's ID, Fire Opal workflow type, status, progress, and creation and update times. Filter by product, status or Fire Opal workflow type, and page through with limit and offset.
A job's product is known only when the call filters by product; otherwise it is null. Filter by product when you need it, and pass the same product to qctrl_get_job.
Call this to find a job_id, or to see what is still running.
NOT for one job's status or results: use qctrl_get_job.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `product` | "fire-opal" \| "boulder-opal" | No | Only this product's jobs. Leave it out for every product. |
| `status` | "PENDING" \| "RECEIVED" \| "STARTED" \| "RETRY" \| "SUCCESS" \| "FAILURE" \| "REVOKED" | No | Only jobs with this status. Leave it out for every status. |
| `workflow_type` | string | No | Only Fire Opal jobs of this workflow, by its short name, for example compile_and_run or solve_qaoa. Not for Boulder Opal. |
| `limit` | integer | No | How many jobs to return, 1 to 100. |
| `offset` | integer | No | How many of the newest jobs to skip, for the next page. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `jobs` | array of JobSummary | Yes | The jobs on this page, newest first. |
| `jobs[].job_id` | string | Yes | The job ID, for the tools that read one job or its results. |
| `jobs[].product` | "fire-opal" \| "boulder-opal" | Yes | The product that ran the job, known only when the call filters by product, otherwise null. Filter by product when you need it, and pass the same product to qctrl_get_job. |
| `jobs[].workflow_type` | string | Yes | The job's workflow, without the _workflow suffix, for example compile_and_run for Fire Opal, or null if the job has none. |
| `jobs[].status` | "PENDING" \| "RECEIVED" \| "STARTED" \| "RETRY" \| "SUCCESS" \| "FAILURE" \| "REVOKED" or string | Yes | PENDING or RECEIVED (queued), STARTED or RETRY (running), SUCCESS, FAILURE or REVOKED. A newer status passes through as is. |
| `jobs[].progress` | number | Yes | The fraction of the job's tasks that have finished, from 0 to 1 (1 once the job ends), or null if the API cannot calculate it. |
| `jobs[].created_at` | string | Yes | When the job was created, if known. |
| `jobs[].updated_at` | string | Yes | When the job last changed, if known. |
| `total` | integer | Yes | How many of the user's jobs match the filters. |
| `has_more` | boolean | Yes | True if more jobs match after this page. |
| `next_offset` | integer | Yes | The offset for the next page, or null if this is the last. |

### Get results link

`qctrl_get_results_link` · Read only

Get a short-lived download link for the full results of a finished Fire Opal job, as JSON. Boulder Opal jobs never have a link.
Use it when you need all the data in a script, for example to plot, export or analyse it. The link expires soon, so use it right away and do not show it to the user as a permanent link.
NOT for a quick look at results: use the results tool that qctrl_get_job names in next_step, which returns a summary.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID (digits only), as a submit tool returned it. |
| `product` | "fire-opal" \| "boulder-opal" | No | The Q-CTRL product the job belongs to. Pass boulder-opal for a Boulder Opal job: with the default, it gets Fire Opal's errors and results tools. The lookup is the same for both. Defaults to fire-opal. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job whose results the link downloads. |
| `url` | string | Yes | The HTTPS download link. It carries its own access, so send no token with it. It expires soon: download it right away. |
| `expires_at` | string | Yes | When the link stops working, in UTC: 10 minutes after it was made. Download before then, or call this tool again for a new link. |
| `format` | string | Yes | The format of the results file. |

### Read Q-CTRL doc

`qctrl_get_doc` · Read only

Read a page of the official, current Q-CTRL documentation at docs.q-ctrl.com as markdown, or only one section of it. Long content is cut: the result gives a next_offset to read on, and lists the page's sections so you can read the one you need.
Call this with a path and section from qctrl_search_docs. Pass a section when you can: it is shorter than the whole page.
NOT for web pages outside the Q-CTRL docs.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `path` | string | Yes | The page path, such as /fire-opal/get-started, as qctrl_search_docs returns it. |
| `section` | string | No | A section anchor from qctrl_search_docs or from this tool's sections, to read only that section. Null reads the whole page. |
| `offset` | integer | No | Where to start reading, in characters into the page or section. Pass the next_offset a previous call returned to read the rest. Defaults to 0. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `path` | string | Yes | The page path that was read. |
| `title` | string | Yes | The page's title, or its path if it has no title. |
| `section` | string | Yes | The section returned, or null for the whole page. |
| `content` | string | Yes | The page or section, as markdown. |
| `offset` | integer | Yes | Where content starts, in characters into the page or section. |
| `truncated` | boolean | Yes | True if content was cut because it was long. Read the rest from next_offset, or read a section. |
| `next_offset` | integer | Yes | Pass it as offset, with the same path and section, to read the rest. Null when content reaches the end. |
| `sections` | array of DocSectionResult | Yes | Every section of the page, in order, even when only one is returned. |
| `sections[].anchor` | string | Yes | The section anchor. Pass it as section. |
| `sections[].title` | string | Yes | The section heading. |

### Search Q-CTRL docs

`qctrl_search_docs` · Read only

Search the official, current Q-CTRL documentation at docs.q-ctrl.com (Fire Opal, Boulder Opal and their Python packages) and return the best matching sections, each with a short snippet, its page path and section anchor.
Call this to learn how a Q-CTRL product, function or option works before using it, then read a hit with qctrl_get_doc. Local copies or notes about Q-CTRL products may be out of date.
NOT for the user's own jobs, results or account.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | What to look for, in a few words, for example 'execute circuits on IBM'. |
| `limit` | integer | No | The most sections to return, from 1 to 10. Defaults to 5. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `hits` | array of DocHitResult | Yes | The matching docs sections, best first. |
| `hits[].title` | string | Yes | The heading of the matching section. |
| `hits[].breadcrumb` | string | Yes | Where the page sits in the docs, for example 'Fire Opal'. |
| `hits[].path` | string | Yes | The page path. Pass it to qctrl_get_doc. |
| `hits[].section` | string | Yes | The section anchor. Pass it to qctrl_get_doc as section. Null when the hit is the whole page. |
| `hits[].snippet` | string | Yes | About 30 words of the section's text, or null if it has none. |

### Integrate Monte Carlo

`qctrl_fire_opal_integrate_monte_carlo`

Estimate an expected value, such as a European call option price or delta or a fixed income price, with quantum amplitude estimation on a real quantum computer with Fire Opal. Choose a built-in objective and probability distribution, or pass your own OpenQASM 2.0 state-preparation circuit. Returns a job_id straight away; then call qctrl_get_job until SUCCESS and read the estimate with qctrl_fire_opal_get_monte_carlo_results.
This runs many circuits on the user's IBM Cloud account, so call it only after the user confirms the problem, max_iteration_count and backend.
NOT for running your own circuits without amplitude estimation (use qctrl_fire_opal_execute).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `problem` | BuiltIn or Circuit | Yes | The problem: "built_in" with an objective and a distribution, or "circuit" with your own state-preparation circuit. |
| `problem.kind` | string | Yes |  |
| `problem.objective` | EuropeanCallPricing or EuropeanCallDelta or FixedIncomePricing | Yes | The objective function, by name. |
| `problem.objective.name` | string | Yes |  |
| `problem.objective.strike_price` | number | Yes | The strike price K. |
| `problem.objective.rescaling_factor` | number | Yes | The approximation scaling factor for the linear payoff. |
| `problem.objective.bounds` | array of number | No | The range of the random variable, matching the distribution's bounds. For a uniform distribution this is the only place the range is set. |
| `problem.distribution` | Uniform or Normal or Lognormal or GaussianConditionalIndependence | Yes | The probability distribution, by name. |
| `problem.distribution.name` | string | Yes |  |
| `problem.distribution.uncertainty` | integer | Yes | How many discrete points, 2 to 4096. Qubits grow as log2. |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `max_iteration_count` | integer | Yes | The most amplitude estimation iterations, 1 to 100. Agree it with the user before you call: each iteration runs more circuits, and the package recommends at most 20. |
| `integrator_options` | Options | No |  |
| `integrator_options.target_variance` | number | No | Stop once the estimate's variance is below this. |
| `integrator_options.full_output` | boolean | No | Return each iteration's estimate in the metadata. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |
| `run_options` | RunOptions | No |  |
| `run_options.session_id` | string | No | An open IBM session to run in. |
| `run_options.job_tags` | array of string | No | Tags to add to the IBM jobs, at most 50. |
| `run_options.reduce_approximation` | boolean | No | Ask Fire Opal to reduce circuit approximation. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `status` | string | Yes | The job's status when it started, usually PENDING. |
| `workflow` | string | Yes | The Fire Opal workflow the job runs. |
| `backend_name` | string | Yes | The backend the job runs on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the job runs in. |
| `warnings` | array of string | No | Fire Opal's warnings about the circuits that may hurt performance, from validation; empty for jobs whose circuits Fire Opal builds. The job still runs. |
| `next_step` | string | Yes | What to call next to follow the job. |
| `circuit_count` | null | No | Always null: Fire Opal builds the circuits. |
| `problem` | string | Yes | What was submitted, in a few words. |
| `shot_count` | integer | No | How many times each circuit runs, or null when Fire Opal picks it. |
| `max_iteration_count` | integer | Yes | The most iterations asked for, as passed in. |

### Run variational loop step

`qctrl_fire_opal_iterate`

Run one step of a variational (hybrid quantum-classical) loop on real hardware with Fire Opal, returning a job_id straight away. Fire Opal keeps a hardware session open between steps, so ALWAYS call qctrl_fire_opal_stop_iterate when the loop ends, fails or the user stops it.
Call this once per step, after agreeing a maximum number of steps with the user, and pass step and max_steps; each step uses hardware time on the user's IBM Cloud account. Between steps, call qctrl_get_job until SUCCESS, read the bitstrings with qctrl_fire_opal_get_circuit_results and choose new parameters yourself.
NOT for a single run (use qctrl_fire_opal_execute) or expectation values (use qctrl_fire_opal_iterate_expectation).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `circuits` | array of string | Yes | The circuits, as OpenQASM 2.0 or 3 text, 1 to 300, counted from 0 in messages. Each starts with "OPENQASM 2.0;" or "OPENQASM 3.0;" and is under 1 MB. |
| `shot_count` | integer | Yes | How many times to run each circuit, 1 to 100000. |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |
| `parameters` | array of object | No | Values for parametric circuits: one set per circuit, in the same order, each mapping a parameter name to its value. Not for braket credentials. |
| `run_options` | RunOptions | No |  |
| `run_options.session_id` | string | No | An open IBM session to run in. |
| `run_options.job_tags` | array of string | No | Tags to add to the IBM jobs, at most 50. |
| `run_options.reduce_approximation` | boolean | No | Ask Fire Opal to reduce circuit approximation. |
| `step` | integer | No | The loop step this call runs, counted from 1. Circuits are validated on step 1 (or when left out) only, so on later steps keep the same circuits as step 1 and change only parameters. The step limit applies only when you pass both step and max_steps. |
| `max_steps` | integer | No | The most steps the user agreed to, 1 to 500. Pass the same value on every step; a step above it runs nothing. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `status` | string | Yes | The job's status when it started, usually PENDING. |
| `workflow` | string | Yes | The Fire Opal workflow the job runs. |
| `backend_name` | string | Yes | The backend the job runs on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the job runs in. |
| `warnings` | array of string | No | Fire Opal's warnings about the circuits that may hurt performance, from validation; empty for jobs whose circuits Fire Opal builds. The job still runs. |
| `next_step` | string | Yes | What to call next to follow the job. |
| `circuit_count` | integer | Yes | How many circuits the job runs. |
| `shot_count` | integer | Yes | How many times each circuit runs. |
| `credential_name` | string | Yes | The saved credential the loop runs with. Pass it, with backend_name, to qctrl_fire_opal_stop_iterate. |
| `step` | integer | No | The loop step this job runs, as passed in. |
| `max_steps` | integer | No | The step limit the user agreed, as passed in. |

### Run expectation loop step

`qctrl_fire_opal_iterate_expectation`

Run one step of a variational loop on real hardware with Fire Opal and estimate expectation values of Pauli observables, for example the energy in VQE. Returns a job_id straight away. Fire Opal keeps a hardware session open between steps, so ALWAYS call qctrl_fire_opal_stop_iterate when the loop ends, fails or the user stops it.
Call this once per step, after agreeing a maximum number of steps with the user, and pass step and max_steps; each step uses hardware time on the user's IBM Cloud account. Between steps, call qctrl_get_job until SUCCESS, read expectation_values with qctrl_fire_opal_get_circuit_results and choose new parameters yourself.
NOT for a single estimate (use qctrl_fire_opal_estimate_expectation) or raw bitstrings (use qctrl_fire_opal_iterate).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `circuits` | array of string | Yes | The circuits, as OpenQASM 2.0 or 3 text, 1 to 300, counted from 0 in messages. Each starts with "OPENQASM 2.0;" or "OPENQASM 3.0;" and is under 1 MB. |
| `observables` | array of PauliOperator | Yes | The observables, 1 to 1000. Fire Opal estimates every observable on every circuit. To get one value per term, such as each edge of a max-cut, give each term as its own observable; to get one total, such as an energy, give one observable with all the terms. |
| `observables[].paulis` | array of string | Yes | The Pauli strings, 1 to 1000: one letter (I, X, Y or Z) per qubit of the circuits, so each is as long as the circuits' qubit count. In Qiskit order: the rightmost letter acts on qubit 0, so on 3 qubits "ZZI" is Z on qubits 1 and 2. |
| `observables[].coefficients` | array of number | Yes | The real weight of each Pauli string, in the same order. |
| `shot_count` | integer | Yes | How many times to run each circuit, 1 to 100000. |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |
| `parameters` | array of object | No | Values for parametric circuits: one set per circuit, in the same order, each mapping a parameter name to its value. Not for braket credentials. |
| `run_options` | RunOptions | No |  |
| `run_options.session_id` | string | No | An open IBM session to run in. |
| `run_options.job_tags` | array of string | No | Tags to add to the IBM jobs, at most 50. |
| `run_options.reduce_approximation` | boolean | No | Ask Fire Opal to reduce circuit approximation. |
| `step` | integer | No | The loop step this call runs, counted from 1. Circuits are validated on step 1 (or when left out) only, so on later steps keep the same circuits as step 1 and change only parameters. The step limit applies only when you pass both step and max_steps. |
| `max_steps` | integer | No | The most steps the user agreed to, 1 to 500. Pass the same value on every step; a step above it runs nothing. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `status` | string | Yes | The job's status when it started, usually PENDING. |
| `workflow` | string | Yes | The Fire Opal workflow the job runs. |
| `backend_name` | string | Yes | The backend the job runs on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the job runs in. |
| `warnings` | array of string | No | Fire Opal's warnings about the circuits that may hurt performance, from validation; empty for jobs whose circuits Fire Opal builds. The job still runs. |
| `next_step` | string | Yes | What to call next to follow the job. |
| `circuit_count` | integer | Yes | How many circuits the job runs. |
| `shot_count` | integer | Yes | How many times each circuit runs. |
| `credential_name` | string | Yes | The saved credential the loop runs with. Pass it, with backend_name, to qctrl_fire_opal_stop_iterate. |
| `step` | integer | No | The loop step this job runs, as passed in. |
| `max_steps` | integer | No | The step limit the user agreed, as passed in. |

### Simulate dynamics

`qctrl_fire_opal_simulate_dynamics`

Simulate how a 1D Fermi-Hubbard chain of up to 64 sites evolves in time on a real quantum computer with Fire Opal, and estimate occupation-number observables at each Trotter step, from time 0. Fire Opal builds the circuits from the model, initial state and Trotter steps. Returns a job_id straight away; then call qctrl_get_job until SUCCESS and read the observable time series with qctrl_fire_opal_get_dynamics_results.
This uses hardware time on the user's IBM Cloud account, which grows with step_count and the chain size (2 qubits per site), so call it only after the user confirms the chain size, number of steps, shots and backend.
NOT for running your own circuits (use qctrl_fire_opal_execute).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `model` | Model | Yes | A 1D Fermi-Hubbard chain with open ends, the only model Fire Opal has. |
| `model.hopping_amplitude` | number or array of number | Yes | The hopping amplitude t: one number for every bond, or one per bond (one fewer than the sites). List index i is the bond between sites i and i+1, so lists run from site 0, the reverse of initial_state. |
| `model.on_site_interaction` | number or array of number | Yes | The on-site interaction U: one number for every site, or one per site, from site 0. |
| `model.chemical_potential` | number or array of number | No | The chemical potential mu: one number for every site, or one per site, from site 0. Defaults to 0. |
| `initial_state` | string | Yes | The starting occupation of each site, one character per site, 1 to 64 sites: e (empty), u (spin up), d (spin down) or b (both). The rightmost character is site 0, so "eeeu" puts one spin-up fermion on site 0 of a 4-site chain. |
| `simulation` | Simulation | Yes | Trotter time evolution. |
| `simulation.time_step` | number | Yes | The time step dt, in inverse units of the model's energies. |
| `simulation.step_count` | integer | Yes | How many Trotter steps of time_step, 1 to 100. The total time is step_count * time_step, and Fire Opal reports each observable at step_count + 1 times, from 0. |
| `observables` | array of Observable | Yes | The observables to estimate at each step, 1 to 100. |
| `observables[].operators` | array of array of Occupation | Yes | The operators: each is a product of occupations, for example [{"spin": "Nup", "site": 3}] for n(3, up). |
| `observables[].coefficients` | array of number | Yes | The weight of each operator, in the same order. |
| `shot_count` | integer | Yes | How many times to run each circuit, 1 to 100000. |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `status` | string | Yes | The job's status when it started, usually PENDING. |
| `workflow` | string | Yes | The Fire Opal workflow the job runs. |
| `backend_name` | string | Yes | The backend the job runs on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the job runs in. |
| `warnings` | array of string | No | Fire Opal's warnings about the circuits that may hurt performance, from validation; empty for jobs whose circuits Fire Opal builds. The job still runs. |
| `next_step` | string | Yes | What to call next to follow the job. |
| `circuit_count` | null | No | Always null: Fire Opal builds the circuits. |
| `problem` | string | Yes | What was submitted, in a few words. |
| `shot_count` | integer | No | How many times each circuit runs, or null when Fire Opal picks it. |

### Solve with QAOA

`qctrl_fire_opal_solve_qaoa`

Solve a combinatorial optimization problem on a real quantum computer with the Fire Opal QAOA solver, which builds and tunes the circuits itself. Give a graph with problem_type ("maxcut" or "max-<k>-cut"), a QUBO/HUBO cost function to minimize as a list of terms over binary variables, or a diagonal Ising Hamiltonian as Pauli strings of I and Z. Returns a job_id straight away; then call qctrl_get_job until SUCCESS (QAOA jobs can take many minutes) and read the answer with qctrl_fire_opal_get_qaoa_results.
This runs many circuits on the user's IBM Cloud or IonQ account, so call it only after the user confirms the problem size and backend.
NOT for running your own circuits (use qctrl_fire_opal_execute) or expectation values (use qctrl_fire_opal_estimate_expectation).

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `problem` | Graph or Polynomial or IsingHamiltonian | Yes | The problem, by kind: "graph", "polynomial" (QUBO/HUBO) or "pauli" (diagonal Ising Hamiltonian). |
| `problem.kind` | string | Yes |  |
| `problem.nodes` | integer or array of integer | Yes | The nodes: a count n for nodes 0 to n-1, or the node numbers. At least 2. QAOA needs one qubit per node, so keep the count within the backend's qubits (for example 156 on IBM Heron); a larger graph is rejected when the job runs. |
| `problem.edges` | array of Edge | Yes | The edges, each once, between nodes in nodes. |
| `problem.edges[].source` | integer | Yes | One node of the edge. |
| `problem.edges[].target` | integer | Yes | The other node of the edge. |
| `problem.edges[].weight` | number | No | The edge weight. Leave it out for weight 1. |
| `problem.problem_type` | string | Yes | The graph problem: "maxcut", or "max-<k>-cut" with k of 2 or more, for example "max-3-cut". |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `constraints` | array of array of integer or string | No | One-hot constraints: each group lists variables of which exactly one is 1 in the answer. Name graph nodes by number, cost function variables by name, and Ising qubits by index (0 is the rightmost letter). Leave it out for an unconstrained problem, and for max-<k>-cut with k above 2, where Fire Opal builds them. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |
| `run_options` | RunOptions | No |  |
| `run_options.session_id` | string | No | An open IBM session to run in. |
| `run_options.job_tags` | array of string | No | Tags to add to the IBM jobs, at most 50. |
| `run_options.reduce_approximation` | boolean | No | Ask Fire Opal to reduce circuit approximation. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | Yes | The job ID. |
| `status` | string | Yes | The job's status when it started, usually PENDING. |
| `workflow` | string | Yes | The Fire Opal workflow the job runs. |
| `backend_name` | string | Yes | The backend the job runs on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the job runs in. |
| `warnings` | array of string | No | Fire Opal's warnings about the circuits that may hurt performance, from validation; empty for jobs whose circuits Fire Opal builds. The job still runs. |
| `next_step` | string | Yes | What to call next to follow the job. |
| `circuit_count` | null | No | Always null: Fire Opal builds the circuits. |
| `problem` | string | Yes | What was submitted, in a few words. |
| `shot_count` | integer | No | How many times each circuit runs, or null when Fire Opal picks it. |

### Stop iterate

`qctrl_fire_opal_stop_iterate` · Deletes data

Close the hardware session that qctrl_fire_opal_iterate or qctrl_fire_opal_iterate_expectation keeps open on a backend for a credential, so it stops holding the user's hardware time. Fire Opal keys the session by backend and credential: loops on the same backend with the same credential share it, and this closes it for all of them, so do not call it while another such loop is still running.
Call this when a variational loop finishes, fails or the user stops it, with the backend_name, credential_name and organization the loop used. Safe to call more than once, and when no session is open. Uses no hardware time.
NOT for cancelling a single job: the server cannot cancel jobs yet.

Inputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `backend_name` | string | Yes | The backend name, for example ibm_fez, from qctrl_fire_opal_show_supported_devices. |
| `credential_name` | string | No | The saved credential to use, from qctrl_list_credentials. Leave it out to use the user's only credential, or to ask the user. |
| `organization` | string | No | The Q-CTRL organization to run in, by slug, from qctrl_whoami. Leave it out to use the user's only organization with Fire Opal, or to ask the user. Once the user picks one, pass it on later Fire Opal calls. |

Outputs:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `backend_name` | string | Yes | The backend the session was on. |
| `organization` | string | Yes | The slug of the Q-CTRL organization the call ran in. |
