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 clifft-samplinggit 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/clifft-sampling)<a href="https://agentmods.dev/skills/xi-zhao/openquantum/clifft-sampling"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/clifft-sampling/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/clifft-sampling"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/clifft-sampling.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.00050 | $0.01156 |
| Opus 5.5 | $0.00020 | $0.00462 |
| Sonnet 5.5 | $0.00010 | $0.00231 |
| Haiku 4.5 | $0.00005 | $0.00116 |
Grade A, and why
clifft-sampling 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 1mo 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 — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clifft 近 Clifford 采样
原生 SDK 路径
本能力同时支持 Clifft / Stim 的原生公开 API。用户需要 自定义电路、噪声模型、测量与采样程序 时,由 Agent 在固定依赖环境中编写和运行任务代码,不限于下文便捷 Tool 的预设模型。
使用 node scripts/sdk-access.mjs inspect clifft-sampling 定位环境,按完整 SDK 工作流执行。模块导航:clifft、stim;导航不是 API 白名单。
下文关于模型、门集、输入与预算的限制描述便捷 Tool 的合同;原生 SDK 另受上游版本、可选依赖、宿主资源与用户授权约束。已禁用或被拒绝的动作不能借代码路径绕过。执行状态和科研验收分别报告。
结构化最终测量调用 Harness 注册的 clifft_local.sample_clifft_circuit。用于 T 门干涉、Clifford+T 电路和门后去极化噪声实验。
- 提交结构化
gates,仅支持 H、S、T、X、Y、Z、CX、CZ;CX/CZ 的 targets 顺序为控制位、目标位。量子位数、门数和 shots 由输入决定。maxActiveWidth 默认为 null;只有用户显式设置该预算时才按实际 peakActiveWidth 检查。 - 初态固定为全零态;每个门后,在该门涉及的各量子位独立施加
DEPOLARIZE1(p)。p是 Pauli 错误总概率,不是直接乘在密度矩阵上的白噪声混合系数。 - 只做最终 Z 测量,位串从左到右为 q0、q1……。密度矩阵参考运行时返回完整位串(complete);跳过参考时仅返回实际出现的位串(observed_only),频数之和仍等于 shots。
- referenceMode=auto|required|skip;独立密度矩阵参考默认在 6 qubits 内自动运行;required 尝试所请求规模;skip 主动跳过。未运行时 reference.status=not_run,参考概率、TVD、trace error 均为 null。密度矩阵参考描述相同的噪声模型;采样频数仍有有限 shots 不确定度。比较 total variation distance 时结合样本数,不要求频数与解析概率完全相等。
- 该结构化接口不开放中间测量、反馈或 Stim 文本;需要记录采样时使用下述独立 Tool。
- 当前 L1,
scientificValidation=not_evaluated;依赖须显式准备;计算可能写本地缓存。
Stim 格式的纠错记录采样
调用同一连接的 clifft_local.sample_clifft_qec,提交 stimCircuit、shots、seed 和可选 maxActiveWidth、execution。
- 接受文档列出的 Stim 指令子集及 T/T_DAG;支持 reset、REPEAT、DETECTOR、OBSERVABLE_INCLUDE,并已验证
CX rec[-1]反馈。各门可用目标仍由固定后端检查,不承诺所有记录控制组合。 - 返回每个 shot 的 measurements、detectors、observables 位串。测量按记录次序排列,detector 按声明次序排列,observable 按 ID 排列;不要按量子位编号重排中间记录。
- detector/observable 是原始测量奇偶值,未减去理想参考。非零值不自动表示错误;没有生成 DEM、匹配权重或逻辑错误率。接解码器前必须另行定义参考与模型。
- 仅 CPU 固定 shots;拒绝 LOSS、LEAKAGE、后选择和期望值记录。纯 Clifford 纠错存储与 MWPM 解码优先使用已有 QEC Tool。
- 该路径没有独立科学 Validator,scientificValidation 仍为 not_evaluated。线路规模与资源设置由调用方选择,活跃宽度预算仅在显式设置时检查。
新接口的完整输入输出、允许指令与验证见互操作接入。
What ships with it
6 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.
- 1mo ago Changed · +11 lines 9d0cacee5cd1
- 2mo ago Changed · +16 lines · +11 tokens per session c8c651c91660
- 2mo ago First seen · 18 lines · 39 tokens per session scan A 1d878be8446d
clifft-sampling is a skill published in the GitHub repository xi-zhao/OpenQuantum (75 stars, last pushed 2d ago), licensed MIT. It adds 50 tokens to every session and 1,156 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.
clifft-sampling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| clifft-samplingxi-zhao/OpenQuantum | Skill | 75 | 2d ago | MIT | A | 50 | Claude Code, Codex |
| manim-animatorsandbaseai/sandbase-skills | Skill | 213 | 8d ago | Apache-2.0 | A | 59 | Claude Code |
| academic-researchsandbaseai/sandbase-skills | Skill | 213 | 8d ago | Apache-2.0 | A | 39 | Claude Code |
| academic-trend-researchsandbaseai/sandbase-skills | Skill | 213 | 8d ago | Apache-2.0 | A | 43 | Claude Code |
| openalex-guidecyanheads/openalex-mcp-server | Skill | 18 | 13d ago | Apache-2.0 | A | 96 | Claude Code |
| arxiv-guidecyanheads/arxiv-mcp-server | Skill | 7 | 3d ago | Apache-2.0 | A | 81 | Claude Code |
| alexandriaThe-40-Thieves/alexandria-mcp | Skill | 3 | 14d ago | MIT | A | 71 | Claude Code |