api reference

One key, one call.

Create an account, mint a key in the console, and send a circuit. Errors name the thing that is wrong and how to fix it.

1. Mint a key

Keys are created in the console, which also runs a verification without a key so you can see the exact value before wiring CI. The full key is displayed once, at creation, and is not recoverable afterwards. Up to ten active keys per account; revoke from the same view.

cq_live_a1b2c3d4e5f6_…

2. Verify a circuit

Send OpenQASM 2 or 3 with the observable you care about. The response carries the exact value and what the run cost.

curl -X POST https://catalyst-q.strategic-innovations.ai/api/v1/execute \
  -H "Authorization: Bearer $CATALYST_Q_KEY" \
  -H "content-type: application/json" \
  -d '{
    "qasm": "OPENQASM 3.0;\nqubit[4] q;\nh q[0];\ncx q[0], q[1];",
    "observable": { "type": "expectation", "pauli": "ZZ" }
  }'
{
  "ok": true,
  "result": { "status": "completed", "exact": true, "value": 1 },
  "usage": {
    "declared_qubits": 4,
    "credits_charged": 2,
    "credits_remaining": 98,
    "duration_ms": 91
  },
  "account": { "tier": "free", "key_id": "a1b2c3d4e5f6" }
}

3. Certified observables

Send a circuit and up to 16 observables. Each value returns with its certificate; a job whose bundle would exceed your tier's word budget is refused with the size it reached and charges nothing.

curl -X POST https://catalyst-q.strategic-innovations.ai/api/v1/observables \
  -H "Authorization: Bearer $CATALYST_Q_KEY" \
  -H "content-type: application/json" \
  -d '{
    "qasm": "OPENQASM 3.0;\nqubit[12] q;\nrx(-0.05) q;\nrzz(-0.1) q[0], q[1];\nrx(-0.05) q;",
    "observables": [ { "type": "mean_z" }, { "pauli": "ZZ", "qubits": [0, 1] }, { "pauli": "Y", "qubits": [5] } ],
    "initial": "0",
    "tau": 1e-8
  }'
{
  "ok": true,
  "result": {
    "status": "completed",
    "values": [
      { "observable": "mean_z", "value": 0.9950041652780258, "certificate": 0, "exact": true, "words_max": 24, "support_qubits": 12 },
      { "observable": "ZZ[0,1]", "value": 0.9900332889206208, "certificate": 0, "exact": true, "words_max": 4, "support_qubits": 2 },
      { "observable": "Y[5]", "value": 0.09983341664682815, "certificate": 0, "exact": true, "words_max": 2, "support_qubits": 1 }
    ],
    "front": { "tau": 1e-8, "word_budget": 60000, "gates": 25, "declared_qubits": 12 }
  },
  "usage": { "declared_qubits": 12, "credits_charged": 3, "credits_remaining": 97, "duration_ms": 4 }
}

Chart selection. If the circuit is a nearest-neighbour matchgate circuit from a Fock or uniform |+⟩ product state, the job runs in the fermionic chart and the response carries "chart": "fermionic" with every value exact at one credit each; otherwise "chart": "pauli_front". Pass "chart": "pauli_front" to force the bundle, or "fermionic" to refuse anything else. Every successful job returns record_id and permalink — a public page at /r/<id> with the values, certificate, circuit and a BibTeX entry, and JSON at /api/v1/records/<id>.

Supported gates: h x y z s sdg t tdg sx sxdg rx ry rz p u1 u2 u3 u cx cz cy ch swap iswap sqrt_iswap rzz rxx ryy cp cu1 crz crx cry ccx ccz cswap. Anything else — including measure, reset and custom gate definitions — is refused by name. Parameters are evaluated exactly (pi/4 is π/4). initial is one letter for all qubits or one per qubit from 0 1 + - r l. A gate-list body (circuit + qubits) is accepted too.

4. Coherent-error logical channel

curl -X POST https://catalyst-q.strategic-innovations.ai/api/v1/qec/coherent \
  -H "Authorization: Bearer $CATALYST_Q_KEY" \
  -H "content-type: application/json" \
  -d '{ "distance": 5, "epsilons": [0.05, 0.1, 0.2] }'
{
  "ok": true,
  "result": {
    "code": "rotated_surface_code",
    "rows": [ { "d": 5, "n": 25, "syndromes": 4096, "epsilon": 0.1,
                "p_logical_coherent": 1.892e-5, "p_logical_twirled": 4.470e-6, "ratio": 4.23,
                "coherent_offdiagonal": 9.32e-5, "normalization": 1 } ]
  },
  "usage": { "credits_charged": 6, "credits_remaining": 91 }
}

4b. Threshold sweeps

curl -X POST https://catalyst-q.strategic-innovations.ai/api/v1/qec/threshold \
  -H "Authorization: Bearer $CATALYST_Q_KEY" -H "content-type: application/json" \
  -d '{ "distances": [3, 5, 7], "ps": [0.04, 0.08, 0.12], "shots": 1000, "noise": "code_capacity" }'

Union-find decoder, rotated surface code, d ≤ 11, up to 24 (distance, p) points and 4,000 shots per point per call; noise is code_capacity or phenomenological (d rounds with measurement errors). One credit per 500 shot-rounds per point. A call that passes the 15-second wall returns the rows it finished with status: "partial".

4c. Certified jobs above the budget

curl -X POST https://catalyst-q.strategic-innovations.ai/api/v1/jobs -H "Authorization: Bearer $CATALYST_Q_KEY" -H "content-type: application/json" \
  -d '{ "kind": "fermionic_large", "summary": "TFIM quench, 400 sites, T=8, mean Z and ZZ", "payload": { "n": 400 } }'

Kinds: observables_large, fermionic_large, qec_coherent_d7, verification, other. We reply by email with a scope and a fixed price; nothing is charged at request time. GET /api/v1/jobs lists your requests.

5. Verify a circuit at width

The width-side route from the first record: operator identity at a million declared qubits.

curl -X POST https://catalyst-q.strategic-innovations.ai/api/v1/execute -H "Authorization: Bearer $CATALYST_Q_KEY" \
  -H "content-type: application/json" -d '{ "qasm": "...", "observable": { "type": "expectation", "pauli": "ZZ" } }'

6. Check your balance

curl https://catalyst-q.strategic-innovations.ai/api/v1/usage \
  -H "Authorization: Bearer $CATALYST_Q_KEY"

Errors

Every error names the problem and the fix, and carries a docs link.

CodeHTTPWhat to do
authentication_required401Send the key as Authorization: Bearer or x-api-key.
invalid_api_key401The key is unknown or revoked. Mint a new one.
width_not_declared400Declare the register: qubit[N] q;, qreg q[N];, or a qubits field.
width_over_tier_limit402The response states your width and your ceiling. Raise the tier or narrow the circuit.
insufficient_credits402The response states the cost and the balance.
budget_exceeded402The bundle would exceed your tier's word budget. The response names the size reached and the gate. Raise τ, raise the tier, or ask for a lighter observable. Nothing was charged.
unsupported_construct / unknown_gate400The reader refuses what it cannot apply, by name. Send a pure unitary circuit from the supported gate set.
execution_failed502The engine returned no result. Credits for that run are not charged.

Scope

These routes return typed observables with certificates. None of them returns shot counts — read the published scope before integrating.