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

To OpenQASM 3

POST
https://api.conductorquantum.com/v0/coda/tools/to-openqasm3
POST
/v0/coda/tools/to-openqasm3
1from conductorquantum import ConductorQuantum
2
3client = ConductorQuantum(token="<token>")
4result = client.coda.tools.to_openqasm3(code="from qiskit import QuantumCircuit\nqc = QuantumCircuit(2)\nqc.h(0)\nqc.cx(0, 1)")
5print(result)
1{
2 "success": true,
3 "openqasm3": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[2] q;\nh q[0];\ncx q[0], q[1];",
4 "circuit_depth": 2,
5 "circuit_gate_count": 2
6}
Convert a Qiskit quantum circuit to the OpenQASM 3.0 standard.
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

Response

Successful Response
successboolean
openqasm3string
circuit_depthinteger
circuit_gate_countinteger

Errors

422
Unprocessable Entity Error