Skip to main content
Glama

WAI Quantum job service

Compile a quantum program, every pass checked

compile_qasm
Read-only

Compile an OpenQASM program through named passes (lowering, checked rewrites, phase folding, one- and two-qubit resynthesis, and every rotation off the multiples of π/4 written as a Clifford+T word within its share of the ε budget), each checked where it acts. Returns the compiled program and a certificate sealed with the service's key: each pass's counts before and after, its check and verdict (proof, exact or approximate with its distance), the budget and the bound the distances add to. verify_quantum_receipt checks it. Quote the bound; an approximate compile is not exact. A large or very fine compile is refused with the local command.

Input Schema

NameRequiredDescriptionDefault
qasmYes
basisNoclifford_t (default): every rotation off the multiples of π/4 written as a Clifford+T word within its share of epsilon; standard: nothing approximated.
levelNo0: lower and approximate; 1 (default): also checked rewrites and phase folding; 2: also one- and two-qubit resynthesis.
epsilonNoThe most the output may differ from the program in the operator norm, up to a global phase, shared by its rotations (default 1e-6).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Despite a thin readOnlyHint annotation, the description discloses substantive behavior: it returns both the compiled program and a key-sealed certificate detailing per-pass counts, checks, verdicts, distances, and the aggregate bound, plus a refusal path for large or very fine compiles. It does not cover determinism, latency, or what 'the local command' means, which keeps it below a 5.

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

Conciseness3/5

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

The purpose is front-loaded in the opening clause, but the first sentence is an enormous run-on with nested parentheticals that an agent must parse mid-call. The later sentences (certificate contents, verify_quantum_receipt, bound warning, refusal) are purposeful, but overall it is denser than needed.

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?

Given an output schema already exists, the description need not itemize return fields, yet it still describes the certificate, the bound, the verification path, and the refusal case. Missing pieces are minor: what determines 'large or very fine', and any note on determinism or cost.

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 coverage is 75%, so the schema already explains basis, level, and epsilon. The description adds modest gloss—mapping basis=clifford_t to Clifford+T approximation within the ε budget and naming the passes that level selects—but largely restates schema meaning rather than adding syntax or edge-case guidance.

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 first sentence names a concrete verb (Compile) and resource (OpenQASM program), then enumerates the pass pipeline (lowering, checked rewrites, phase folding, resynthesis, rotation synthesis), so an agent knows this is a checked compiler, not a runner or linter. That distinguishes it cleanly from siblings such as run_quantum_circuit, critique_qasm, and check_equivalent.

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?

It points to verify_quantum_receipt for checking the certificate and warns that an approximate compile is not exact and that oversized/fine compiles are refused, which is useful routing. But it never states when an agent should choose compile_qasm over siblings like improve_qasm, repair_qasm, or dry_run_quantum_job; that choice is left to inference.

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.

Resources