# How a run works

> What happens between pressing Run and reading the result: sizing, the quote, the credit hold, execution, settlement and the run record you can open afterwards.

Source: https://qsolve.omlabs.co/docs/start/how-it-works
Updated: 2026-11-12

A run is sized, quoted, queued, executed and settled. You see the quote before any credits are spent and pay only for what the run used.

## 1. You submit

On a workflow page you enter an input, choose a machine (the **target**), optionally adjust the solver settings, and set a **spend limit**. Press **Run**. The input is checked against the workflow's input schema first, so a malformed input is rejected before anything is queued.

## 2. Qsolve sizes the run

The status pill shows **Sizing**. Qsolve starts the workflow in estimate mode, which executes no quantum circuits. The workflow reports how many qubits, circuits and shots your input needs on the chosen target and how long it expects to take. This takes a few seconds.

If the predicted time is longer than the workflow's time limit, the run fails here with "This run would take longer than the workflow allows. Nothing was charged." Reduce the problem size or the settings that drive run time, such as optimiser iterations or circuit depth.

## 3. You get a quote

From the estimate, Qsolve computes two numbers in credits (1 credit = 1 USD):

- The **quote**: the expected cost.
- The **hold**: the most the run can cost. On simulators it equals the quote. On a quantum computer it is 1.5 times the quote, because the provider meters quantum time and it can vary.

Qsolve compares the hold with your spend limit:

| Situation | What happens |
|---|---|
| Hold is within your spend limit and balance | The credits are held and the run is queued |
| Hold is above your spend limit | **Needs your OK**. Confirm with **Run for up to X credits** or **Cancel**. An unconfirmed quote expires after 15 minutes |
| Balance too low, or a run cap or monthly cap would be passed | The run fails with a clear message and nothing is held |

[Credits and pricing](/docs/use/credits-and-pricing) has the formulas and worked examples.

## 4. The run executes

The status pill shows **Queued** until a machine is free, then **Running**. The workflow's code runs in an isolated environment with no network access, so it cannot send your input anywhere. When it wants to run a quantum circuit, the circuit goes to the target (a simulator or a quantum computer) through Qsolve, which counts every circuit and shot and returns the counts.

Because Qsolve sees every circuit and every count, the circuit size, shot count and fidelity do not depend on what the workflow says about itself. See [Data and privacy](/docs/use/data-and-privacy).

You can press **Stop** at any time. A run that has not started ends at once and its hold is released. A run already executing is stopped and billed for what it used.

## 5. The run settles

When the workflow finishes, Qsolve checks that the quantum work it metered matches what the workflow's result accounts for. If the run used more than its result accounts for, it fails as an integrity mismatch and its numbers are discarded. Otherwise:

- **Charge.** On simulators you pay the quote. On a quantum computer you pay the actual cost, based on the quantum seconds the provider reported. The charge is never more than the hold.
- **Release.** The rest of the hold returns to your balance. **Usage** lists both entries, "Held for a run" and "Returned after a run".
- **Record.** The run page shows the answer, the comparison with the baseline, the quality of the quantum run, the circuits and a receipt. See [Run records](/docs/use/run-records).
