mitiq-error-mitigation

mitiq-error-mitigation is a skill for Claude Code, Codex from xi-zhao/OpenQuantum. It costs 48 tokens per session (1,343 once invoked), scanned A, original, MIT.

A local experiment runner for testing four ways to reduce errors in sampled quantum circuits: zero-noise extrapolation, readout correction, probabilistic error cancellation, and Clifford data regression. It compares noisy and mitigated results under the same sampling budget.

In plain words
What is it for?
Use it to run supported small circuits with depolarizing gate noise, readout flips, or the method-specific noise assumptions, then compare error, variance, and sampling cost. The supported circuit gates and observable forms are limited by the tool.
Why use it?
It helps measure whether an error-mitigation method improves an observable, and whether any improvement costs more samples or adds variance. It does not model real hardware or general quantum error correction.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to run supported small circuits with depolarizing gate noise, readout flips, or the method-specific noise assumptions, then compare error, variance, and sampling cost. The supported circuit gates and observable forms are limited by the tool.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xi-zhao/openquantum/mitiq-error-mitigation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xi-zhao/OpenQuantum --skill mitiq-error-mitigation
Clone the repo
git clone --depth 1 https://github.com/xi-zhao/OpenQuantum

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mitiq-error-mitigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/xi-zhao/openquantum/mitiq-error-mitigation/github.svg)](https://agentmods.dev/skills/xi-zhao/openquantum/mitiq-error-mitigation)
Your own site
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/mitiq-error-mitigation"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/mitiq-error-mitigation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mitiq-error-mitigation

Your own site · 80×15
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/mitiq-error-mitigation"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/mitiq-error-mitigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,343 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01343
Opus 5.5 $0.00019 $0.00537
Sonnet 5.5 $0.00010 $0.00269
Haiku 4.5 $0.00005 $0.00134

Measured 4d ago against content hash ca428c13ac4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mitiq-error-mitigation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (mcp/bridge.py, mcp/contracts.mjs, mcp/server.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/mitiq-error-mitigation/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mitiq 误差缓解实验

原生 SDK 路径

本能力同时支持 Mitiq / Cirq 的原生公开 API。用户需要 用户 executor、缩放与拟合策略、ZNE、PEC、CDR、读出缓解 时,由 Agent 在固定依赖环境中编写和运行任务代码,不限于下文便捷 Tool 的预设模型。

使用 node scripts/sdk-access.mjs inspect mitiq-error-mitigation 定位环境,按完整 SDK 工作流执行。模块导航:mitiq、cirq;导航不是 API 白名单。

下文关于模型、门集、输入与预算的限制描述便捷 Tool 的合同;原生 SDK 另受上游版本、可选依赖、宿主资源与用户授权约束。已禁用或被拒绝的动作不能借代码路径绕过。执行状态和科研验收分别报告。

当用户要评估零噪声外推、读出误差校正、概率误差抵消或 Clifford 数据回归时使用本 Skill。 它负责选择实验和解释结果,计算由 mitiq_local 连接注册的 run_mitiq_experiment Tool 执行。 不要把 Mitiq 的其他算法、任意 SDK 电路、真实硬件或误差纠正解释为本 Tool 已提供的能力。

选择与输入

  • zne:在局域门噪声下比较全局折叠 [1,3,5] 与二阶 Richardson 外推;零噪声时也可能增加方差。
  • rem:独立、对称读出翻转;设置 readoutProbability,两个校准设置计入缓解预算。门噪声可保留,REM 不消除它。
  • pec:已知局域去极化噪声、理想补偿 Pauli;pecSamples 控制准概率电路抽样数。真实噪声表征成本尚未建模。
  • cdr:所有非 Clifford 门必须为 RZ,且 observable 只含 I/Z。训练成本计入预算;全 Clifford 目标及退化训练会报错。

支持 H/X/Y/Z/S/RZ/CX/CZ 门;RZ angle 单位为弧度,targets 从 0 开始。 Pauli 字符串最左字符是 q0。终端测量基变换按理想操作处理;不接受路径、代码、凭据或云任务。 depolarizingProbability 是 Cirq 的 Pauli 错误概率 p,通道为 (1-p)rho + p/3*(XrhoX+YrhoY+ZrhoZ),不能与 rho -> (1-p)rho+pI/2 的 p 混用。

shotsBudget 是每次重复、每个比较臂的总预算,包含校准和训练;整次调用严格消耗 2 * replicates * shotsBudget 个模拟 shots。默认 8 次完整重复、每臂每次 8192 shots。 seed 固定整个实验,重复之间重新生成采样、训练和校准数据。比较不同方法时保持电路、噪声、预算和重复数一致。

最小示例:

{"method":"zne","numQubits":1,"gates":[{"name":"H","targets":[0]},{"name":"RZ","targets":[0],"angle":0.7},{"name":"H","targets":[0]}],"observable":"Z","shotsBudget":8192,"replicates":8,"seed":7}

执行与解释

  1. 明确需要评估哪种噪声、观测量和方法;使用 Tool schema 检查支持范围。
  2. 若连接未开启,告知设置位置;不要绕过用户禁用状态。计算前显式准备锁定环境;计算仍可能写缓存,按 workspace-write 处理。
  3. 读取 idealExpectation、exactNoisyExpectation、每次重复的原始/缓解估计及两臂成本。
  4. 用 statistics 报告经验 bias、variance、RMSE 和跨重复均值标准误。rmseDifference<0 仅表示本次有限样本比较改善。
  5. 保留越界估计与变差结果,不挑选成功 seed;shots 相同不代表门数、深度、运行时间相同。
  6. 遇到 CDR 训练退化,明确该实验不可辨识;调整电路/观测量或训练数后作为新实验运行,不静默更换 seed。

本能力为 L1,固定返回 scientificValidation=not_evaluated。没有 Acceptance Profile 和中央验收链, 不可宣称科学验收通过、普遍降噪、量子优势或真实硬件有效。

Read the full file on GitHub · 65 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +11 lines ca428c13ac4f
  2. 22d ago Changed · +4 lines dc9a91d1e16c
  3. 1mo ago First seen · 50 lines · 48 tokens per session scan A 03b9687334f2

Subscribe to this mod's changes

mitiq-error-mitigation is a skill published in the GitHub repository xi-zhao/OpenQuantum (75 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,343 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.

Related

Other skills, from other repositories

academic-research

Search academic papers, scholarly articles, and research publications through SandBase. Use when asked for literature review, academic citations, scholarly research, paper discovery, or scientific evidence gathering.

sandbaseai/sandbase-skills · 39 tokens

rhylthyme

Schedule multi-step procedures that a person carries out against a clock, with parallel tracks, shared equipment and steps that end when the person says so. Use when turning a lab protocol, recipe, event run sheet or workout into a timed plan; when several procedures must share one instrument (one centrifuge, one…

rhylthyme/rhylthyme-mcp · 167 tokens

memory-search-mcp

Long-term memory and context retrieval for AI agents. Semantic search across conversation history with care-weighted relevance.

CSOAI-ORG/memory-search-mcp · 0 tokens

gc-minimal-zine-poster-v0-3

Generate or analyze poetic paper-texture minimal zine posters with large negative space, a small editorial collage or focal element, experimental typography, and one clear color accent. Use when the user gives a theme, sentence, article, mood, object, photo, content brief, reference images, or an image folder and…

stvlynn/dsh.fish · 100 tokens

ask-sonner

Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and persisting toasts, styling, theming and icons, positioning and multiple toasters. Use when working with Sonner or troubleshooting it — toasts that don't appear…

stvlynn/dsh.fish · 97 tokens

kill-ai-slop

Find and remove AI slop — the generic, machine-default visual and copy tics of vibe-coded products — from a web project. Use when the user asks to "kill AI slop", "de-slop", "remove the AI look", "make this not look AI-generated", or clean up a landing page / UI / docs that feels templated. Detects and fixes the…

stvlynn/dsh.fish · 249 tokens