Skip to main content
Glama

Qasmguard for OpenQASM lint, simulation, routing & FTQC

q_equivalence_check

Read-onlyIdempotent

Metered ($0.005): Exact unitary (<=6Q), multi-probe statevector (<=12Q), and Clifford Heisenberg (<=256Q) circuit equivalence checker with global-phase and endianness-reversal diagnostics.

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": {
      "qasmA": "<qasmA>",
      "qasmB": "<qasmB>"
    },
    "name": "q_equivalence_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoPRNG seed for 7-12Q multi-probe checks (default 42).
qasmAYesReference OpenQASM 2.0/3.0 circuit.
qasmBYesCandidate OpenQASM 2.0/3.0 circuit.
toleranceNoAmplitude error tolerance in (0, 1) (default 1e-9).
checkEndiannessNoDetect q[k]<->q[n-1-k] endianness reversal (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the description is not needed for the safety profile. It nonetheless adds real value beyond them: a specific price point ($0.005 metered), the three algorithmic tiers with hard qubit limits, and the presence of global-phase and endianness-reversal diagnostics — all facts an agent cannot read off the annotations.

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

Conciseness4/5

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

A single front-loaded sentence that leads with the cost, the one fact that gates a metered call, then capability tiers, then diagnostics. No filler sentences. It is dense with specialist jargon ("multi-probe statevector", "Clifford Heisenberg") which slightly hurts scannability but every token carries information.

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?

With no output schema, the description carries the burden of describing results, and it does so partially: it discloses that global-phase and endianness-reversal diagnostics are produced, implying a verdict-plus-diagnostics result. It does not state the shape of the success/failure verdict or what happens for non-equivalent circuits, which is the main remaining gap for a checker with five parameters.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters (qasmA, qasmB, tolerance, seed, checkEndianness) are already documented in structured form; that sets the baseline at 3. The description adds only an indirect gloss — mentioning endianness-reversal diagnostics, which loosely motivates checkEndianness — and says nothing about tolerance or seed semantics beyond what the schema states.

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

Purpose5/5

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

The description names a specific verb+resource ("circuit equivalence checker") and qualifies it with three named verification modes and their qubit ceilings (6Q exact unitary, 12Q multi-probe statevector, 256Q Clifford Heisenberg). That is far more concrete than any sibling (q_simulate, q_lint_qasm, q_transpile_route), so an agent can tell this is a dedicated equivalence-verification tool without opening the schema.

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

Usage Guidelines3/5

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

Applicability is implied rather than stated: the qubit caps tell the agent the tool becomes unusable above 256 qubits, and the mode tiers hint at which path applies at a given size, but there is no explicit when-to-use vs. when-to-use-a-sibling guidance and no exclusions. The caller must infer that q_simulate is the right tool when they want amplitudes rather than an equivalence verdict.

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.