> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.conductorquantum.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conductorquantum.com/_mcp/server.

# Simulation

The simulation endpoint runs a quantum circuit and returns measurement results, statevectors, or density matrices depending on the chosen method.

## Backends

| Backend | Description                            | Availability  |
| ------- | -------------------------------------- | ------------- |
| `aer`   | CPU-based Qiskit Aer simulator         | All plans     |
| `cudaq` | GPU-accelerated CUDA-Q simulator       | Pro and above |
| `auto`  | Automatically selects the best backend | Pro and above |

Free-tier users are limited to the `aer` backend with a maximum of 16 qubits. Paid plans support GPU simulation up to 29 qubits.

## Simulation methods

| Method           | Description                                                     |
| ---------------- | --------------------------------------------------------------- |
| `qasm`           | Executes the circuit with measurement sampling. Returns counts. |
| `statevector`    | Returns the full quantum state as a complex vector.             |
| `density_matrix` | Returns the density matrix representation.                      |

## Example

```python
from conductorquantum import ConductorQuantum

client = ConductorQuantum(token="<your-api-key>")
result = client.coda.simulate(
    code="from qiskit import QuantumCircuit\nqc = QuantumCircuit(2)\nqc.h(0)\nqc.cx(0, 1)\nqc.measure_all()",
    method="qasm",
    shots=1024,
)
print(result)
```

## Related endpoints

* `POST /simulate`: run a circuit simulation
* `POST /estimate-resources`: analyse circuit complexity before simulating
* `POST /split-circuit`: split large circuits using circuit cutting

See the [Coda API Reference](/api-reference/coda-api) for full request and response schemas.