Runs

Price a run without submitting it

Validates and prices exactly the run POST /v1/runs would create — same engine, same per-shot rate (including any negotiated org pricing), same shot-range and circuit checks — and charges nothing. POST /v1/quote is the same handler under the path the SDKs called first; both stay.

post/v1/runs/quote

Request

  • Base URL: https://api.roroquantum.com
  • URL: https://api.roroquantum.com/v1/runs/quote
  • Auth: HTTP bearer

Request body

machineTargetIdstring required

The target's targetId (codename). targetId below is an accepted alias; send one or the other (both only if they agree).

targetIdstring

Alias for machineTargetId — same meaning, same value.

shotsinteger required

Also bounded by the machine's own minShots..maxShots (see properties).

qasmstring required

OpenQASM 2.0 source for the circuit. A run must carry a circuit: omitting the field is not rejected server-side (the simulators execute a demo Bell circuit and charge for it), which is why every SDK refuses to submit without one.

tagsobject nullable

Optional origin labels for an application submitting on behalf of its own users (opaque ids only, e.g. {"user": "u_42", "job": "nightly"}). Stored for the operator view, never billed on, never used for authorisation, and never echoed back — a run's tags cannot be read from the API. Invalid entries are dropped, not rejected; a label can never fail a paid run.

Example request

{
  "machineTargetId": "roro.sim.sv",
  "targetId": "roro.sim.sv",
  "shots": 5000,
  "qasm": "OPENQASM 2.0; include \"qelib1.inc\"; qreg q[2]; creg c[2]; h q[0]; cx q[0],q[1]; measure q -> c;",
  "tags": {
    "user": "u_42"
  },
  "resilience": {
    "level": 1,
    "zne": {
      "observable": "ZZ"
    }
  }
}

Response

The price and validity of the run, and whether your balance covers it

machineTargetIdstring
machineNamestring
shotsinteger
perShotMilliinteger

Per-shot price in milli-credits (your org's negotiated rate when one exists; always 0 on a free machine).

costMilliinteger

Total price in milli-credits.

costCreditsnumber double

Total price in credits (costMilli / 1000) — what POST /v1/runs would debit.

freeboolean

The run charges nothing: the machine is free by catalogue policy (RoRo's own simulators) or by the plan of the organization it bills. A free run needs no balance, so sufficient is true at any balance whenever valid is; a free run can still be refused (valid false, with the reason in validationError), for example when an institution's daily cloud-simulator allowance is used up.

validboolean

False when the run would be rejected (see validationError).

validationErrorstring nullable

Why the run would be rejected — bad shots, empty or malformed circuit, shots outside the machine's range, or a resilience set this machine does not offer (the same text POST /v1/runs answers with).

balanceCreditsnumber double

The best single account that could fund the run.

sufficientboolean

valid and the balance covers costCredits (always true for a 0-cost run).

effectiveShotsinteger

Shot-equivalents priced. On a per-shot quote, costMilli == effectiveShots × perShotMilli; equal to shots for a plain run.

circuitsinteger

Circuits in the set (1 for a plain run).

baseCostMilliinteger

What the run costs without resilience.

priceModel'free' | 'per-shot' | 'per-second' | 'per-job'

Which basis priced this quote.

estimatedSecondsnumber double nullable

On a per-second quote, the quantum-seconds the price assumed (billed in whole seconds, rounded up). The charge is this quote's costMilli; the provider's own seconds are recorded after the run and never re-billed.

perSecondMilliinteger

Milli-credits per quantum-second (0 on a machine without a time rate).

perJobMilliinteger

Milli-credits added per job (0 when none).

minJobMilliinteger

The least the job costs, in milli-credits (0 when there is no floor). On a per-second quote costMilli = max(minJobMilli, perJobMilli + effectiveShots × perShotMilli + ceil(estimatedSeconds) × perSecondMilli).

Example response

{
  "machineTargetId": "roro.sim.sv",
  "machineName": "RoRo Statevector Simulator",
  "shots": 1000,
  "free": true,
  "valid": true,
  "balanceCredits": 100,
  "sufficient": true,
  "effectiveShots": 1000,
  "circuits": 1,
  "resilience": {
    "circuits": 5,
    "effectiveShots": 11264
  },
  "preflight": {
    "state": "ok",
    "qubits": 2,
    "depth": 3,
    "gateCount": 2,
    "twoQubitGates": 1,
    "warnings": []
  },
  "priceModel": "per-shot"
}

Changes

No recorded changes to this operation across all 1 revision of this API.