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.
npx skills add xi-zhao/OpenQuantum --skill mwpf-decodinggit clone --depth 1 https://github.com/xi-zhao/OpenQuantumWrote 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.
[](https://agentmods.dev/skills/xi-zhao/openquantum/mwpf-decoding)<a href="https://agentmods.dev/skills/xi-zhao/openquantum/mwpf-decoding"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/mwpf-decoding/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.
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/mwpf-decoding"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/mwpf-decoding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00066 | $0.01622 |
| Opus 5.5 | $0.00026 | $0.00649 |
| Sonnet 5.5 | $0.00013 | $0.00324 |
| Haiku 4.5 | $0.00007 | $0.00162 |
Grade A, and why
mwpf-decoding 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 12d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MWPF 超图译码
原生 SDK 路径
本能力使用 MWPF 的原生公开 API。用户需要 用户自定义加权超图、syndrome 与权重界,以及 Stim/Sinter 逻辑 observable 译码 时,由 Agent 在固定依赖环境中编写和运行任务代码。
使用 node scripts/sdk-access.mjs inspect mwpf-decoding 定位环境,按完整 SDK 工作流执行。模块导航:mwpf、stim、sinter、numpy;导航不是 API 白名单。
固定 MWPF 0.2.18;Sinter 必须显式 PanicAction.RAISE,有限 cluster 预算可回退 UF,float64 权重界不是形式化证明。一般超图求解无最坏耗时保证;使用宿主进程预算。
本入口复用宿主文件与代码工具,没有新增通用执行 Tool。原生 SDK 受上游版本、可选依赖、宿主资源与用户授权约束。已禁用或被拒绝的动作不能借代码路径绕过。执行状态和科研验收分别报告。
方法选择与准备
需要直接表达加权超图及权重界时选择 MWPF;图状匹配可继续用 PyMatching,BP/OSD/LSD 可用
ldpc-decoding,带颜色/基标注的色码可用 Chromobius。不要为套用某个译码器改变原始模型。
按 SDK 工作台显式准备环境,再运行原生程序。准备下载并写入依赖;执行本身不安装。
固定 Python 3.12、MWPF 0.2.18、Stim/Sinter 1.16.0 与 NumPy 2.5.3,其余版本见 uv.lock。
这是可选 L0 SDK/Skill,不新增 Tool、MCP Server、常驻进程或科学验收器。
原生任务流程
- 保存加权超图/校验约束、syndrome,或原始 circuit/DEM、detector/observable 定义、噪声模型与种子。
使用
HyperEdge、SolverInitializer、SolverSerialJointSingleHair和SyndromePattern求解。subgraph_range()返回选中边和上下界;分别保存解权重、上下界、配置和实际差距。 - 原生 solver 省略
cluster_node_limit才使用上游默认的大预算;0 是有限预算,不表示无限。 Sinter 默认值为 50;达到预算可退回 Union-Find。不要把成功返回等同于最优解,也不要编造每次回退标志。 Sinter 的timeout字段没有通过其config传给核心,不能拿它当整次任务时限;使用宿主进程预算/取消机制。 - 使用 Sinter 时必须显式设置
panic_action=mwpf.PanicAction.RAISE。上游默认 CATCH 会在译码异常后 返回随机预测,不能用于可信比较。保留异常和失败输入;不得统计随机替代预测为成功结果。 compile_decoder_for_dem后调用decode_shots_bit_packed;输入为二维 uint8、每 shotceil(num_detectors/8)字节、little-endian。输出宽度按 observable 数计算,不能与 detector 混用。 可编辑示例显式检查输入宽度并抛出错误。- DEM 会丢失部分 heralded erasure 上下文;需要时按上游
with_circuit(circuit)传原电路, 并单独验证该路径。本接入未验证 heralded erasure,不擅自分解或近似 DEM。 - 比较译码器时共用同一噪声模型、输入样本和预算,保留原始 samples、实际/预测 observables、失败记录和版本。 样本量由用户任务决定;固定种子不保证跨版本/平台逐位相同。
示例与自定义程序
在新输出目录用 inspect 给出的解释器运行 references/native-example.py:默认解一个独立可枚举的超图。
--input graph.json 接受 vertex_count、edges([[顶点列表, 权重], ...])和 syndrome。
--dem model.dem --shots 1024 --seed 7 在原始 DEM 上采样与译码,保存 result.json 和 samples.npz。
--cluster-node-limit N 显式选择有限预算;无此参数时,超图模式用核心默认值,DEM 模式用 Sinter 默认 50。
示例不覆盖已有结果文件。用户可直接编写原生 API 程序,不受示例对象大小或预设任务限制。
What ships with it
3 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.
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.
- 12d ago First seen · 73 lines · 66 tokens per session scan A 9a1523b9a3bb
mwpf-decoding is a skill published in the GitHub repository xi-zhao/OpenQuantum (75 stars, last pushed 5d ago), licensed MIT. It adds 66 tokens to every session and 1,622 once invoked, about $0.0003 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-11-22.
mwpf-decoding compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mwpf-decodingxi-zhao/OpenQuantum | Skill | 75 | 5d ago | MIT | A | 66 | Claude Code, Codex |
| manim-animatorsandbaseai/sandbase-skills | Skill | 212 | 12d ago | Apache-2.0 | A | 59 | Claude Code |
| academic-researchsandbaseai/sandbase-skills | Skill | 212 | 12d ago | Apache-2.0 | A | 39 | Claude Code |
| academic-trend-researchsandbaseai/sandbase-skills | Skill | 212 | 12d ago | Apache-2.0 | A | 43 | Claude Code |
| openalex-guidecyanheads/openalex-mcp-server | Skill | 18 | 16d ago | Apache-2.0 | A | 96 | Claude Code |
| arxiv-guidecyanheads/arxiv-mcp-server | Skill | 7 | yesterday | Apache-2.0 | A | 81 | Claude Code |
| alexandriaThe-40-Thieves/alexandria-mcp | Skill | 3 | 17d ago | MIT | A | 71 | Claude Code |