stgrape-control

stgrape-control is a skill for Claude Code, Codex from xi-zhao/OpenQuantum. It costs 63 tokens per session (1,183 once invoked), scanned A, original, MIT.

A quantum-control workspace for designing robust pulses on a fixed time grid. A control pulse is a time-varying signal used to drive a quantum system toward a target state or operation while accounting for specified errors.

In plain words
What is it for?
Use it with a Hamiltonian, control channels, and a target state or gate to optimize pulses, compare split and unsplit propagation, and inspect held-out error samples and termination reasons.
Why use it?
It lets you compare propagation calculations and check how independent, slowly varying Gaussian errors affect the result. It also records when an optimization stops because it reached a limit rather than because it converged.

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 with a Hamiltonian, control channels, and a target state or gate to optimize pulses, compare split and unsplit propagation, and inspect held-out error samples and termination reasons.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xi-zhao/openquantum/stgrape-control
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 stgrape-control
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 stgrape-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/xi-zhao/openquantum/stgrape-control/github.svg)](https://agentmods.dev/skills/xi-zhao/openquantum/stgrape-control)
Your own site
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/stgrape-control"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/stgrape-control/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 stgrape-control

Your own site · 80×15
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/stgrape-control"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/stgrape-control.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,183 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.00063 $0.01183
Opus 5.5 $0.00025 $0.00473
Sonnet 5.5 $0.00013 $0.00237
Haiku 4.5 $0.00006 $0.00118

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

Security

Grade A, and why

stgrape-control 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.

The scan reads SKILL.md. This mod also ships 1 executable file (references/native-example.py), 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/stgrape-control/SKILL.md · 36 lines

What it actually says

ST-GRAPE 多误差源鲁棒控制

原生 SDK 路径

本能力使用 ST-GRAPE 的原生公开 API。用户需要 固定时间网格的鲁棒脉冲优化、独立准静态高斯误差响应及分裂传播精度对照 时,由 Agent 在固定依赖环境中编写和运行任务代码。

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

为 ST 路径验证控制基与实对角谱。保留角频率单位、时间步、Taylor 阶数、独立误差宽度和预算终止原因。

本入口复用宿主文件与代码工具,没有新增通用执行 Tool。原生 SDK 受上游版本、可选依赖、宿主资源与用户授权约束。已禁用或被拒绝的动作不能借代码路径绕过。执行状态和科研验收分别报告。

适用于给定 Hamiltonian、控制通道和目标态或目标门的离线控制设计。需要常规 GRAPE/Krotov 时也可使用 QuantumControl.jl。当问题涉及两个准静态误差源的联合微扰、滤波脉冲或分裂传播误差时,使用此环境可在同一个模型上核对这些量。

运行一个可检查的小问题

  1. 用 node scripts/sdk-access.mjs inspect stgrape-control 读取环境状态及解释器。需要准备时运行 node scripts/setup-sdk.mjs stgrape-control,再检查一次。两种宿主均使用已有的代码工具。
  2. 在新建的任务目录使用该解释器运行可编辑示例。若将示例复制到别处,将 OPENQUANTUM_ROOT 指向仓库根目录。默认模型从 |00⟩ 到 |11⟩,采用 4 段各 0.35 µs 的方波,Hamiltonian 以 rad/µs 计。三个输入系数与 FIR 核 (0.6, 0.4) 卷积后得到实际四段振幅。
  3. 给整个进程设置 60 秒截止时间。缺省求解预算为 3 次迭代、16 次求值及 12 秒。可在不同目录用 --method st-grape --steps 1、--steps 2、--steps 4 和 --method dense、--method block-sparse 比较同一初始脉冲。保留各次的 result.json。
  4. 从结果读取实际终止原因、初始和最终控制、独立逐段矩阵指数的态损失以及 8 个留出样本的损失。固定种子仅用于留出样本。优化器达到迭代上限时,报告当时的脉冲与误差,收敛状态仍为未收敛。

模型和解释

  • 示例取独立、零均值、单位方差的高斯参数,物理宽度 0.06 和 0.04 已乘进各自的扰动算符。态损失为 1−|⟨target|ψ⟩|²。同时报告 Taylor 阶数及二阶交叉矩。独立有限差分和单比特解析旋转见实测与对照。
  • 自定义 ST 控制分组前,调用示例里的 check_control_groups(problem, groups) 核对每个通道的覆盖、酉变换和实对角谱。上游 v1.0.0 的原生 optimize 会接受某些错误基,在解析解能完全翻转的单比特脉冲上曾返回损失 1 并报告收敛。自定义分组无法成立时,选择处理原 Hamiltonian 的未分裂传播。
  • 时间网格、角频率单位、初态/目标、滤波核和基底次序必须一起保存。未经重新验证,四段、两比特的分裂误差趋势只适用于该算例。有色噪声、相关噪声、大尺度性能和硬件保真度均须各自取得证据。
  • 默认环境固定官方 v1.0.0 代码 wheel,可选科研数据另用 CC BY 4.0。复现归档缺失时标记缺失;自定义实验照常保存到任务目录。scientificValidation=not_evaluated。
Files

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.

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. 12d ago First seen · 36 lines · 63 tokens per session scan A 782db2dce986

Subscribe to this mod's changes

stgrape-control is a skill published in the GitHub repository xi-zhao/OpenQuantum (75 stars, last pushed 5d ago), licensed MIT. It adds 63 tokens to every session and 1,183 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.

Related

stgrape-control compared with skills from other repositories

stgrape-control next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stgrape-controlxi-zhao/OpenQuantumSkill755d agoMITA63Claude Code, Codex
manim-animatorsandbaseai/sandbase-skillsSkill21212d agoApache-2.0A59Claude Code
academic-researchsandbaseai/sandbase-skillsSkill21212d agoApache-2.0A39Claude Code
academic-trend-researchsandbaseai/sandbase-skillsSkill21212d agoApache-2.0A43Claude Code
openalex-guidecyanheads/openalex-mcp-serverSkill1816d agoApache-2.0A96Claude Code
arxiv-guidecyanheads/arxiv-mcp-serverSkill7yesterdayApache-2.0A81Claude Code
alexandriaThe-40-Thieves/alexandria-mcpSkill317d agoMITA71Claude Code