Skip to main content
Glama

WAI Quantum job service

Learn a detector error model's rates from detection events

qec_learn
Read-onlyIdempotent

Learn every mechanism's rate of a detector error model from detection events alone; observable flips are never read. The model's structure is bb ({code, cycles, p, basis}: a bivariate-bicycle memory at circuit level), memory ({distance, rounds, p}: the rotated surface-code memory experiment), circuit (the circuit text) or model (detector error model text). The events are records (each shot's fired detectors) or shots sampled with seed, from the circuit (source circuit, the default) or from the model itself, every mechanism independent at its rate (source model). Mechanisms that light the same detectors are one class, and only their combined rate is seen. Each class's θ = −ln(1 − 2p) is inverted from the logarithms of the shots' parity means on its detectors and one detector of each class that contains it, with its standard error by the delta method; a class whose detectors and separators exceed max_support (default 16) keeps its given rate and says why. against_given scores the estimates against the model's own rates, an accuracy only when the events were drawn from that model; rates: false leaves the list of classes out. Sealed with the service's key. Quote each rate with its standard error.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "qec_learn"
  }
}

Input Schema

NameRequiredDescriptionDefault
bbNoA bivariate-bicycle memory at circuit level: the code (bb:72 to bb:288, gross), noisy cycles, the uniform circuit-level rate and the basis.
seedNoThe sampling seed (default 1).
modelNoA detector error model in its text: the structure, and the rates the estimates are scored against.
ratesNoGive every class's rate (default true), or only the summary.
shotsNoSample this many shots instead of giving records.
memoryNoThe rotated surface-code memory experiment at circuit level.
sourceNoSample from the circuit (the default) or from the model, every mechanism independent at its rate.
circuitNoA noisy Clifford circuit in the circuit text.
recordsNoDetection records: each shot's fired detectors (a detector named twice in a shot cancels).
max_supportNoThe most detectors one class's estimate reads (default 16).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only and idempotent behavior, but the description adds substantial context beyond them: mechanisms sharing detectors are merged and only their combined rate is observable, estimation uses θ = −ln(1 − 2p) from parity means with delta-method standard errors, oversized classes keep their given rate, and results are sealed with the service's key.

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?

The description is front-loaded with the core purpose and proceeds logically from inputs to estimation to output controls. It is dense and written as one long paragraph, but for a 10-parameter statistical tool most of the detail earns its place.

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

Completeness5/5

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

Given the nested schema, high parameter count, and presence of an output schema, the description supplies the necessary conceptual model, estimation method, caveats, and output control. An agent has enough information to invoke it correctly without needing return-value documentation.

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 conceptual meaning for the model structures (bb, memory, circuit, model), source semantics, records/shots/seed behavior, and max_support's fallback. It appropriately leaves finer leaf-field documentation to the schema rather than repeating it.

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?

States a specific verb and resource: 'Learn every mechanism's rate of a detector error model from detection events alone,' with the added constraint that observable flips are never read. This clearly distinguishes the estimation task from sibling decoding or threshold operations.

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?

Gives clear context for when options apply: sampling from circuit versus model, against_given being an accuracy only when events were drawn from that model, and rates=false omitting the class list. It does not explicitly name qec_decode or qec_threshold as alternatives, so it falls short of a 5.

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