Skip to main content
Glama

WAI Quantum job service

Run a qudit job

run_qudit
Read-onlyIdempotent

Run a qudit job (wai.quantum.qudit/1, quantum-sim.md §9): a register of qudits of dimension 2, 3, 4 or 6, a program of shift, clock, fourier, csum and phase gates run on it from |0…0⟩ in whole numbers at 2^-30, and the register measured with a seed. The answer gives the counts keyed by the qudits' digits (highest qudit first), the amplitudes asked for as integers, the state's BLAKE3 and norm, the digest of the constants its dimension reads, the work, and the accuracy: bit-exact, the same integers on every host, with a bound on the state's distance from the ideal and on the outcomes' total variation. Sealed with the service's key; verify_quantum_receipt checks the seal, and anyone can run the request again for the same bits. A request past a bound is refused before anything runs (J090, J091, J092).

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": {
      "d": "<d>",
      "qudits": "<qudits>",
      "gates": "<gates>"
    },
    "name": "run_qudit"
  }
}

Input Schema

NameRequiredDescriptionDefault
dYesThe register's dimension, the levels of each qudit: 2, 3, 4 or 6, the dimensions whose roots of unity the engine holds exactly or to the nearest 2^-30 (quantum-sim.md §9).
seedNoThe seed the shots are drawn with (default 1).
gatesYesThe program, in order, from |0…0⟩: shift (X^power), clock (Z^power), fourier (F^power, power 0 to 3), csum (CSUM^power, qudits the control then the target), phase (level j takes ω^powers[j]). A power is below d (below 4 for fourier) and 1 when it is not given.
shotsNoShots to draw (default 1024).
intentNoWhat the counts must do, checked by the engine and sealed with them as the result's verdict (wai.quantum.verdict/1): one intent or a list, each of the counts: {"outcomes": ["00", "11"]} (the outcomes the samples may be), {"conserves": {"weight": 2}} or {"parity": 0} (the sum of an outcome's digits, or that sum modulo d), or {"counts": {"00": 0.5, "11": 0.5}, "test": "chi_squared", "alpha": 0.01} (the samples held to a distribution, by a test at a level or within a "tolerance" in total variation distance). Each is evidence about the samples returned, never proof.
quditsYesHow many qudits: d^qudits amplitudes, at most 2^24 (24 qubits, 15 qutrits, 12 ququarts, 9 of six levels).
amplitudesNoAmplitudes to give, each as the qudits' digits with the highest qudit first: the integers they are at 2^-30.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, it discloses determinism ("bit-exact, the same integers on every host"), reproducibility ("anyone can run the request again for the same bits"), the accuracy contract (bounds on state distance from ideal and on outcomes' total variation), sealing with the service's key, and that over-bound requests are refused before execution. Those are exactly the traits an agent cannot get from the annotations or schema.

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 identity and core contract are front-loaded, but the body is two very long comma-spliced sentences dense with spec references (quantum-sim.md §9, J090, wai.quantum.verdict/1) that an agent must parse past to extract the operational facts. Little is filler, yet the run-on structure costs readability.

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 a high-complexity simulation tool with a full output schema and safety annotations, the description is close to complete: determinism, bounds, refusal behavior, sealing and verification path are all covered. Minor gaps remain around what "the work" in the answer means and any cost or runtime expectations for large registers (up to 2^24 amplitudes).

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 the baseline is 3 and the schema already documents gates, powers, shots, seed, intent and amplitudes. The description adds interpretive context — ordering of digits (highest qudit first), amplitudes as 2^-30 integers, and that intent is sealed as a verdict and is evidence not proof — but does not extend the individual parameters materially 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?

Opens with a specific verb and resource and pins the domain precisely: a qudit register of dimension 2/3/4/6, a program of shift, clock, fourier, csum and phase gates, run from |0…0⟩ and measured with a seed. That gate set and dimension restriction implicitly separate it from generic circuit runners, but it never names a sibling it is *not* (e.g. run_quantum_circuit, dry_run_quantum_job), so sibling routing is left to inference.

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?

Usage is implied rather than stated: the description names the precondition of refusal for out-of-bounds requests (J090/J091/J092) and points at verify_quantum_receipt for seal checking, which tells the agent a follow-up path. It gives no when-to-use versus dry_run_quantum_job or the other run_* siblings, and no guidance on when a qudit simulation is the right choice over a qubit circuit tool.

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