Estimating job cost
Any quantum circuit run on an IonQ QPU will consume an amount of compute credit. The credit used by a job is subtracted from the available project budget and organization balance when the job runs. Your particular rates, credit units, and cost model may vary depending on your access agreement with IonQ - please reach out to [email protected] if you have specific questions regarding job cost. All calculations are estimates only and are not binding on either you or IonQ; your actual job costs may be higher or lower than these estimates.From gate and shot counts
Job cost can be estimated via the /jobs/estimate API endpoint, which uses your API key to select the correct rate and cost model for your organization. Depending on your organization’s specific cost model, the level of uncertainty in this estimate may vary. In general, actual job costs may not exactly reflect these estimates. This estimator uses the number of one-qubit gate operations (1Q gates) and two-qubit gate operations (2Q gates) in the circuit, along with the number of shots. For gates with 3 or more qubits, use the formula 6(N-2) to express an N-qubit gate as an equivalent number of 2Q gates before running the estimation. In Python, an example API request for this job cost estimator would look like:233.75.
In addition to the estimated cost, the full response output also specifies the cost units (USD in this example) and includes a record of the input parameters, along with the time the estimate was performed, the organization and its rate information, and estimated execution and queue time.
You can also run this estimator within our API docs here or by clicking “Try it” on the Get job estimate page. You’ll need to generate or copy an API key and paste apiKey abc123 (where abc123 is your API key) in the “Authorization” box, then enter the parameters for your estimate and click “Send”.
In some cases, there is a minimum per-circuit cost. For small jobs within a certain size range, the cost will always be rounded up to this minimum value. Above this range, the cost will increase when increasing the number of gates or shots. Note that this minimum value is different for jobs run with or without debiasing, our built-in error mitigation, which is enabled by default for jobs with 500 or more shots. The job size threshold and minimum cost are lower when debiasing is turned off, so turning off debiasing may reduce job cost for jobs in a certain size range. For larger jobs, however, debiasing will not affect the cost.
In some cases, the cost for a specific circuit may be significantly lower or higher than the estimate from this tool, based on the efficiency of circuit transpilation and optimization. For a more accurate, circuit-specific estimate, we recommend using dry-run jobs to predict cost, as described below.
Predicting cost via dry-run jobs
If you have already built your quantum circuits or run jobs on IonQ’s cloud simulators, submitting a dry-run job to an IonQ QPU is recommended for cost estimation as well as general debugging. A dry-run job will pass through our usual compilation process and all preflight checks and calculations, but it will not enter the queue or be executed on a QPU. To submit a dry-run job via the IonQ Quantum Cloud API v0.4, include"dry_run": True in the job request data.
For qiskit-ionq v1.0.3 and later, you can include dry_run=True in your backend.run() call.
For qiskit-ionq v1.0.2 and earlier, include extra_query_params={'dry_run': True'} in your backend.run() call.
For qiskit-ionq versions prior to 0.6.1, dry-run functionality is not available.
IONQ_API_KEY, this looks like:
Get job cost
completed status and cost, this cost has not been charged and is not counted towards the project or organization-level usage. Similarly, failed and canceled jobs may display predicted costs, but these costs are not charged.
Other job types
For multicircuit jobs, the total cost is the sum of individual child circuit job costs. For quantum-function jobs, the cost is the sum of individual circuit jobs spawned by the quantum function. For jobs run during billable reservations, the individual job cost will show as zero, but there is a separate charge for the reserved time.Budget and quota errors
If you submit a job and receiveQuotaExhaustedError with an error message like: “Budget exhausted for project with ID …” or “Exhausted spending quota of type: project”, the predicted cost of the job exceeds the amount of available credit in the project where the job was submitted.
If the predicted cost of the job appears to be smaller than the amount of credit available to the project, check whether there are other queued (“ready”) jobs in the project. Credit is reserved for these jobs when they are submitted, and the check for available credit considers this amount as unavailable for additional job submissions. Canceling queued jobs will free up their reserved credit.
In general, if you receive an error related to your project budget, you may need to reduce the job size (and cost) or ask your organization admin to increase your project budget.
Less commonly, you may receive a similar error regarding your organization budget. This may occur even if your project budget indicates that sufficient compute credit is available. If you are an organization admin, you may view the available credit on the Organization Spend page, including the timeline for issuance and expiration of any additional credit, if applicable. Note that users cannot view the organization-level credit information directly.

