Qecguard for Stim DEM lint, decode, threshold & shield

Free Stim DEM lint, inspect, synth & sample. Metered decode, threshold sweep & drift shield.

Should I use this

Quality & Safety

A
Description quality
93%
Schema completeness
96%
Naming quality
80%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Findings (1)

  • LOWTool 'qec_drift_shield' description lacks action verbin qec_drift_shield

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~2,646Tokens (tool definitions)
~3.3 KBTypical response size
Significant attention impact (2.07% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "qecguard": {
      "url": "https://qecguard-mcp.raymond-deoliveira.workers.dev/mcp"
    }
  }
}

Remote endpoints

https://qecguard-mcp.raymond-deoliveira.workers.dev/mcpstreamable-http

What it can do

Tool inventory

Tools (7)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢qec_lint_dem(dem, strict, maxErrors)

Free tier: Stim .dem v1.15 static preflight validator (probabilities, undeclared D#/L# targets, cancelling duplicates, orphaned hyperedges).

Input Schema

{
  "type": "object",
  "properties": {
    "dem": {
      "type": "string",
      "minLength": 1,
      "description": "Stim .dem v1.15 detector error model text (<= 262,144 bytes)."
    },
    "strict": {
      "type": "boolean",
      "description": "When true, warnings mark valid=false (default false)."
    },
    "maxErrors": {
      "type": "integer",
      "minimum": 1,
      "maximum": 256,
      "description": "Maximum errors/warnings returned per category (1..256, default 256)."
    }
  },
  "required": [
    "dem"
  ],
  "additionalProperties": false
}
🟢qec_inspect_dem(dem, includeComponents)

Free tier: Detector-error-model graph/hypergraph inspector reporting detector/observable counts, maxDegree, connected components, graphlike fraction, and dEffLowerBound.

Input Schema

{
  "type": "object",
  "properties": {
    "dem": {
      "type": "string",
      "minLength": 1,
      "description": "Stim .dem v1.15 detector error model text."
    },
    "includeComponents": {
      "type": "boolean",
      "description": "Include per-component detector indices and error counts (default false)."
    }
  },
  "required": [
    "dem"
  ],
  "additionalProperties": false
}
🟢qec_synth_dem(code, distance, rounds, preset, physicalErrorRate, ...)

Free tier: Deterministic rotated-surface and repetition Stim .dem v1.15 synthesizer calibrated to willow-105, sycamore-54, or ibm-heron-133 presets.

Input Schema

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "enum": [
        "rotated-surface",
        "repetition"
      ],
      "description": "QEC code family: rotated-surface or repetition (default rotated-surface)."
    },
    "distance": {
      "type": "integer",
      "minimum": 3,
      "maximum": 11,
      "description": "Odd code distance in [3, 11] (default 3)."
    },
    "rounds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "Syndrome measurement rounds in [1, 100] (default distance)."
    },
    "preset": {
      "type": "string",
      "enum": [
        "willow-105",
        "sycamore-54",
        "ibm-heron-133"
      ],
      "description": "Hardware noise and qubit preset (default willow-105)."
    },
    "physicalErrorRate": {
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 0.5,
      "description": "Optional physical error rate override in (0, 0.5)."
    },
    "seed": {
      "type": "integer",
      "description": "Deterministic Mulberry32 PRNG seed (default 0)."
    }
  },
  "additionalProperties": false
}
🟢qec_sample_syndromes(dem, shots, seed, includeRawSamples)

Free tier: Seeded Mulberry32 deterministic syndrome & observable-flip sampler with trigger rates and optional raw sample rows.

Input Schema

{
  "type": "object",
  "properties": {
    "dem": {
      "type": "string",
      "minLength": 1,
      "description": "Stim .dem v1.15 detector error model text."
    },
    "shots": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000,
      "description": "Shot count in [1, 100000] (default 1000)."
    },
    "seed": {
      "type": "integer",
      "description": "Deterministic Mulberry32 PRNG seed (default 0)."
    },
    "includeRawSamples": {
      "type": "boolean",
      "description": "Return per-shot detector/observable vectors (<= 4096 shots, <= 524288 bits)."
    }
  },
  "required": [
    "dem"
  ],
  "additionalProperties": false
}
🟢qec_decode_benchmark(dem, decoder, shots, seed, syndromes, ...)

Metered ($0.005): Deterministic Union-Find and lightweight MWPM-approx syndrome decoder benchmark on DEM + explicit syndromes or seeded shots.

Input Schema

{
  "type": "object",
  "properties": {
    "dem": {
      "type": "string",
      "minLength": 1,
      "description": "Stim .dem v1.15 detector error model text."
    },
    "decoder": {
      "type": "string",
      "enum": [
        "uf",
        "mwpm-approx",
        "both"
      ],
      "description": "Decoder algorithm: uf, mwpm-approx, or both (default uf)."
    },
    "shots": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50000,
      "description": "Simulated shots in [1, 50000] when syndromes omitted (default 1000)."
    },
    "seed": {
      "type": "integer",
      "description": "Deterministic Mulberry32 PRNG seed (default 0)."
    },
    "syndromes": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50000,
      "description": "Optional explicit 2D binary detector syndrome rows.",
      "items": {
        "type": "array",
        "items": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "observables": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50000,
      "description": "Optional explicit 2D binary observable flip rows matching syndromes.",
      "items": {
        "type": "array",
        "items": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1
        }
      }
    }
  },
  "required": [
    "dem"
  ],
  "additionalProperties": false
}
🟢qec_threshold_sweep(code, distances, noiseScales, rounds, shotsPerPoint, ...)

Metered ($0.015): Multi-distance and multi-noise-scale sweep fitting Lambda error-suppression, threshold crossing, and Willow baseline comparison.

Input Schema

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "enum": [
        "rotated-surface",
        "repetition"
      ],
      "description": "Code family (default rotated-surface)."
    },
    "distances": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5,
      "items": {
        "type": "integer",
        "minimum": 3,
        "maximum": 11
      },
      "description": "Unique odd code distances in [3, 11] (default [3, 5, 7])."
    },
    "noiseScales": {
      "type": "array",
      "minItems": 1,
      "maxItems": 36,
      "items": {
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 100
      },
      "description": "Positive noise scale multipliers in (0, 100] (default [0.5, 1.0, 2.0])."
    },
    "rounds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "description": "Syndrome rounds in [1, 25] (default 3)."
    },
    "shotsPerPoint": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000,
      "description": "Shots per (distance, scale) point (default 300)."
    },
    "preset": {
      "type": "string",
      "enum": [
        "willow-105",
        "sycamore-54",
        "ibm-heron-133"
      ],
      "description": "Hardware preset (default willow-105)."
    },
    "decoder": {
      "type": "string",
      "enum": [
        "uf",
        "mwpm-approx"
      ],
      "description": "Decoder algorithm (default uf)."
    },
    "seed": {
      "type": "integer",
      "description": "Deterministic Mulberry32 PRNG seed (default 0)."
    }
  },
  "additionalProperties": false
}
🟢qec_drift_shield(preset, baseline, current, distance, patchQubits)

Metered ($0.010): Calibration drift safety shield comparing baseline vs current QPU snapshots for threshold breach, Lambda regression, and hotspot couplers.

Input Schema

{
  "type": "object",
  "properties": {
    "preset": {
      "type": "string",
      "enum": [
        "willow-105",
        "sycamore-54",
        "ibm-heron-133"
      ],
      "description": "Hardware baseline preset (default willow-105)."
    },
    "baseline": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "error1Q",
        "error2Q",
        "readoutError"
      ],
      "properties": {
        "timestampUtc": {
          "type": "string",
          "description": "Optional ISO-8601 snapshot timestamp."
        },
        "error1Q": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 0.5,
          "description": "Single-qubit gate error rate in [0, 0.5)."
        },
        "error2Q": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 0.5,
          "description": "Two-qubit gate error rate in [0, 0.5)."
        },
        "readoutError": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 0.5,
          "description": "Readout assignment error rate in [0, 0.5)."
        },
        "cycleTimeUs": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Syndrome cycle duration in microseconds (> 0)."
        },
        "cycleUs": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Alias for cycleTimeUs in microseconds (> 0)."
        },
        "t1Us": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "T1 relaxation time in microseconds (> 0)."
        },
        "t2Us": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "T2 coherence time in microseconds (> 0)."
        },
        "couplers": {
          "type": "array",
          "maxItems": 512,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "edge",
              "error2Q"
            ],
            "properties": {
              "edge": {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "items": {
                  "type": "integer",
                  "minimum": 0
                },
                "description": "Qubit pair [u, v]."
              },
              "error2Q": {
                "type": "number",
                "minimum": 0,
                "exclusiveMaximum": 0.5,
                "description": "Two-qubit gate error rate in [0, 0.5)."
              },
              "readoutError": {
                "type": "number",
                "minimum": 0,
                "exclusiveMaximum": 0.5,
                "description": "Optional readout error rate in [0, 0.5)."
              }
            }
          },
          "description": "Optional per-coupler 2Q error readings."
        }
      }
    },
    "current": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "error1Q",
        "error2Q",
        "readoutError"
      ],
      "properties": {
        "timestampUtc": {
          "type": "string",
          "description": "Optional ISO-8601 snapshot timestamp."
        },
        "error1Q": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 0.5,
          "description": "Single-qubit gate error rate in [0, 0.5)."
        },
        "error2Q": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 0.5,
          "description": "Two-qubit gate error rate in [0, 0.5)."
        },
        "readoutError": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 0.5,
          "description": "Readout assignment error rate in [0, 0.5)."
        },
        "cycleTimeUs": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Syndrome cycle duration in microseconds (> 0)."
        },
        "cycleUs": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Alias for cycleTimeUs in microseconds (> 0)."
        },
        "t1Us": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "T1 relaxation time in microseconds (> 0)."
        },
        "t2Us": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "T2 coherence time in microseconds (> 0)."
        },
        "couplers": {
          "type": "array",
          "maxItems": 512,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "edge",
              "error2Q"
            ],
            "properties": {
              "edge": {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "items": {
                  "type": "integer",
                  "minimum": 0
                },
                "description": "Qubit pair [u, v]."
              },
              "error2Q": {
                "type": "number",
                "minimum": 0,
                "exclusiveMaximum": 0.5,
                "description": "Two-qubit gate error rate in [0, 0.5)."
              },
              "readoutError": {
                "type": "number",
                "minimum": 0,
                "exclusiveMaximum": 0.5,
                "description": "Optional readout error rate in [0, 0.5)."
              }
            }
          },
          "description": "Optional per-coupler 2Q error readings."
        }
      }
    },
    "distance": {
      "type": "integer",
      "minimum": 3,
      "maximum": 11,
      "description": "Odd code distance in [3, 11] (default 5)."
    },
    "patchQubits": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "integer",
        "minimum": 0
      },
      "description": "Optional active physical qubit indices."
    }
  },
  "required": [
    "baseline",
    "current"
  ],
  "additionalProperties": false
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded7 tools