For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
OverviewCodaControlAPI ReferenceChangelog
OverviewCodaControlAPI ReferenceChangelog
  • Coda API
      • GETList Tools
      • POSTTranspile
      • POSTSimulate
      • POSTTo OpenQASM 3
      • POSTEstimate Resources
      • POSTSplit Circuit
  • Control API
  • Stanza API
    • stanza
    • cli
    • context
    • device
    • exceptions
    • models
    • pyvisa
    • registry
    • timing
    • utils
LogoLogo
Coda APITools

Simulate

POST
https://api.conductorquantum.com/v0/coda/tools/simulate
POST
/v0/coda/tools/simulate
1from conductorquantum import ConductorQuantum
2
3client = ConductorQuantum(token="<token>")
4result = client.coda.tools.simulate(
5 code="from qiskit import QuantumCircuit\nqc = QuantumCircuit(2)\nqc.h(0)\nqc.cx(0, 1)\nqc.measure_all()",
6 method="qasm",
7 shots=1024,
8)
9print(result)
1{
2 "success": true,
3 "method": "qasm",
4 "backend": "aer",
5 "shots": 1024,
6 "counts": {
7 "11": 515,
8 "00": 509
9 },
10 "probabilities": {
11 "11": 0.5029,
12 "00": 0.4971
13 },
14 "circuit_depth": 3,
15 "circuit_gate_count": 3,
16 "plan": "free"
17}

Run a quantum circuit simulation and return results. Supports qasm (sampling), statevector, and density_matrix methods with CPU or GPU backends.

Was this page helpful?
Built with

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