Simulate

Run a quantum circuit simulation and return results. Supports three simulation methods: `qasm` (measurement sampling), `statevector` (full quantum state), and `density_matrix`. Choose between CPU (`aer`), GPU-accelerated (`cudaq`), or automatic backend selection (`auto`). Free-tier users are limited to the `aer` backend with a maximum of 16 qubits. Paid plans support GPU simulation up to 29 qubits.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
codestringRequired
Python code containing the quantum circuit
methodenumOptionalDefaults to qasm
Simulation method
Allowed values:
shotsintegerOptional1-100000Defaults to 1024
seed_simulatorinteger or nullOptional
backendenumOptionalDefaults to auto
Simulation backend
Allowed values:

Response

Successful Response
successboolean
methodstring
backendstring
shotsinteger
countsmap from strings to integers
probabilitiesmap from strings to doubles
statevectorlist of lists of doubles
density_matrixlist of lists of lists of doubles
circuit_depthinteger
circuit_gate_countinteger

Errors

422
Unprocessable Entity Error