Skip to main content
Glama

Run your own circuit (Qiskit / OpenQASM)

quantum_run_circuit

Bring your own quantum circuit. Paste the OpenQASM that Qiskit writes and Privi runs it on IBM Quantum, IonQ, Amazon Braket or its own simulator, picked by price or speed, then seals the measurement counts with a post-quantum signature anchored on chain. Standard Qiskit gates are rewritten exactly into h, rz, rx, cx; all qubits are measured at the end. Poll with quantum_hardware_job. Free on free backends; paid QPUs need a Quantum Mandate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "qasm": "<qasm>"
    },
    "name": "quantum_run_circuit"
  }
}

Input Schema

NameRequiredDescriptionDefault
qasmYesOpenQASM 2.0 or 3.0 text, e.g. from Qiskit: qiskit.qasm2.dumps(circuit) or qiskit.qasm3.dumps(circuit)
labelNoOptional short name for the run (kept in the sealed record)
shotsNoShots (1-10000)
policyNoWith backend='auto': cheapest | fastest | hardware (real QPUs only)cheapest
backendNo'auto' or a backend id from quantum_backends (local, ionq:simulator, ionq:qpu.forte-1, ibm:<name>, braket:<name>)auto
mandate_idNoqm_... Quantum Mandate (required for paid backends)
privi_passNoYour Privi pass (ppass_...); required with a mandate
max_cost_usdNoRefuse if the estimated price is above this

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (which only say it's a non-idempotent, non-destructive, open-world write), it discloses exactly what happens to the input — standard Qiskit gates are rewritten into h/rz/rx/cx and all qubits are measured at the end — plus that results are sealed with a post-quantum signature anchored on chain. It also names the auth/cost precondition (mandate + pass for paid QPUs).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with what the tool does, followed by the transformation semantics, the polling handoff, and the billing/auth condition — each sentence carries distinct information with no repetition of schema text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter async submission tool with no output schema, it covers the gate normalization constraint, the follow-up polling tool, and the payment gate. It stops short of saying what the immediate call returns (a job/run id) or whether circuit size/qubit limits apply.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: `policy` is explained as choosing by price or speed and only applying to auto/hardware routing, and `backend`'s auto-vs-explicit behavior is spelled out. It doesn't add anything for shots or max_cost beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Bring your own quantum circuit" plus the specific action of executing OpenQASM on named providers is a clear verb+resource statement. It implicitly separates itself from quantum_run_hardware (which would run a pre-built problem), but never names that sibling, so the differentiation is inferential rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete conditions: paste QASM exported from Qiskit, poll afterwards with quantum_hardware_job, and paid QPUs require a Quantum Mandate while free backends do not. What's missing is an explicit statement of when to pick this over quantum_run_hardware or quantum_optimize.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.