OpenQuantum: Skill for Codex

.agents/skills/qpanda-qubo/SKILL.md

qpanda-qubo is a skill for Codex from xi-zhao/OpenQuantum. It costs 132 tokens per session (1,267 once invoked), scanned A, original, MIT.

A workflow for turning small binary optimisation problems into QUBO models. QUBO represents choices as zero-or-one variables and uses a formula to score each combination.

In plain words
What is it for?
Use it for small scheduling, selection, allocation, or financial models with up to five binary variables and up to four equality constraints.
Why use it?
It helps model equality constraints and compare a local QAOA approximation with a deterministic brute-force answer.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

This is xi-zhao/OpenQuantum's own configuration. It tells Codex how to work on OpenQuantum itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything OpenQuantum configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xi-zhao/OpenQuantum. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/xi-zhao/OpenQuantum/main/.agents/skills/qpanda-qubo/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/xi-zhao/OpenQuantum

Made for: 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 qpanda-qubo

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/qpanda-qubo"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/qpanda-qubo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,267 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00132 $0.01267
Opus 5 $0.00066 $0.00633
Sonnet 5 $0.00026 $0.00253
Haiku 4.5 $0.00013 $0.00127

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

Security

Grade A, and why

qpanda-qubo 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 5d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (mcp/bridge.py, mcp/server.mjs, modeling/binary-linear-model.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/qpanda-qubo/SKILL.md · 64 lines

How it starts

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

QPanda QUBO Workbench

工作边界

这个 Skill 负责组织 QUBO 求解工作流,真正的计算由 qpanda_qubo MCP Server 暴露并经 Harness MCP Client 注册的 Tool 完成, 底层调用本源官方 pyqpanda_alg 的 QUBO 模块(QuadraticBinary / QUBO_QAOA)。当前只开放 本地、无凭据的求解;首次调用可能由 uv 构建固定的 Python 环境(pyqpanda3 是原生 wheel):

  • 1–5 个二值变量;
  • 可以用变量名、minimize/maximize 目标和最多 4 个线性等式约束建模;每个约束必须显式给出 penalty;
  • QUBO 以数值系数给出:quadratic(方阵)、可选 linear、可选 constant
  • method=traversal 始终返回经典暴力遍历的确定性最优解;
  • method=qaoa 额外运行本地 QAOA(layer 1–6),返回比特串概率分布。

当前不开放不等式自动松弛、penalty 自动选择、本源量子云、Token、真机任务提交、任意 Python、 sympy 表达式字符串、文件路径或数据集加载。

工作流

  1. 按用户输入选择下述主动作;主动作会加载固定环境并随结果返回 packageVersion,不需要额外的运行时检查调用。
  2. 若 Tool 不存在,告诉用户在“设置中心 → 量子组件 → MCP Server 连接”把 QPanda QUBO 配置为启用,重启 OpenQuantum 后再试;不要改用 Bash 绕过设置。
  3. 用户给的是业务目标和等式约束时,优先调用 model_and_solve_qpanda_qubo。检查 constraints.feasiblepenalty.sufficient;后者失败表示 penalty 太弱,不能把 QUBO 最优解写成 原约束问题的最优解。
  4. 用户已经给出 QUBO 数值时,调用 solve_qpanda_qubo:目标是 x^T Q x + b·x + cquadraticQlinearbconstantc
  5. 先用 method=traversal 拿到确定性最优解;需要量子近似时再用 method=qaoa 并指定 layer
  6. 比较 QAOA 概率分布的最高比特串与经典最优解时,注意比特序可能不同,按目标函数值判断而不是 直接按比特位比较。
  7. 输出时区分:用户模型、编译后的 QUBO、上游工具事实、枚举 observations、尚未完成的来源链验收。

与其他能力的分工

  • 电路层面的构建、转译与文档查询用 qiskit-circuit-workbenchtyxonq-workbench
  • 严格限定的二量子位基态 VQE 与独立验收用 quantum-ground-state
  • 真机执行(悟空 QPU)使用默认关闭的 qpanda_runtime MCP Server 所暴露的 Tool;本地 QUBO 求解不提交任何云任务。

解释规则

  • MCP-exposed Tool 成功只代表 pyqpanda_alg 本地计算完成,不代表优化结论通过科学验收。
  • classical 是经典暴力遍历的确定性参考;checks.objectiveConsistencyError 只是对目标函数取值 做的自洽检查,不是独立 Validator。
  • 建模工具会枚举全部二值赋值,核对“原目标 + penalty 残差平方”等于编译后 QUBO,并独立比较 pyqpanda_alg 的经典最小值;这些是 observations_available,不自动物化最终 Acceptance。
  • penalty.sufficient=fail 是模型事实,不是运行错误:提高 penalty 或重新建模后再比较。
  • QAOA 结果是变分采样近似,含随机性;不要把一次分布解释为确定性最优。
  • Harness MCP Client 连接不可用或 MCP-exposed Tool 返回错误时保留原始错误语义,不编造最优解、分布或版本。

输出格式

保持简洁并包含:

  1. 原模型、变量顺序与 QUBO 系数摘要;
  2. 可行解数量、原问题可行最优解、penalty 是否足够;
  3. pyqpanda_alg 经典最优值,以及与独立枚举参考的误差;
  4. 若运行 QAOA:layer、最高概率比特串与分布要点;
  5. pyqpanda_alg 版本和 scientificValidation 边界。

Read the full file on GitHub · 64 lines

Files

What ships with it

7 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. 5d ago Changed f753f22cd50d
  2. 10d ago First seen · 64 lines · 132 tokens per session scan A 1321094a52dd

Subscribe to this mod's changes

qpanda-qubo is a skill published in the GitHub repository xi-zhao/OpenQuantum (49 stars, last pushed 3d ago), licensed MIT. It adds 132 tokens to every session and 1,267 once invoked, about $0.0007 per session on Opus 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-08-30.

Related

Other skills, from other repositories

bcra-macro

API de Estadísticas Monetarias v4.0 del BCRA con 638 series macroeconómicas (reservas, tipo de cambio, tasas, M1/M2/M3, inflación, CER, UVA).

gauss314/skills · 48 tokens

staffing-plan-from-event-brief

Extract a temporary event staffing plan from an event document, an RFP, banquet event order (BEO), run of show, production schedule, exhibitor or event services manual, or staffing grid, then price it live through TempGuru for service in 300+ U.S. and Canadian markets. Use when a user pastes or uploads an event…

Tempguru-co/tempguru-mcp · 215 tokens

appdirect

Every documented AppDirect marketplace operation in one binary, plus offline sync and billing-reconciliation joins. Trigger phrases: reconcile appdirect billing, which appdirect payments failed this week, what changed in appdirect subscriptions, show my appdirect pipeline, appdirect company 360, use appdirect, run…

Servosity/msp-skills · 74 tokens

sherweb

Every Sherweb Partner API capability, plus a local SQLite store, offline analytics, and margin/drift/orphan joins no other Sherweb tool has. Trigger phrases: reconcile sherweb billing, what's my margin per customer in sherweb, find orphaned sherweb subscriptions, list sherweb customers, preview a sherweb seat change…

Servosity/msp-skills · 88 tokens

xrocket-exchange

Use the unofficial xRocket Exchange MCP to inspect spot markets and accounts, trade autonomously inside an operator-configured daily value limit, or prepare explicitly approved transfers and withdrawals. Trigger when a request concerns xRocket markets, account data, deposits, trading, transfers, withdrawals, or its…

nakazanie-ton/myrocket · 87 tokens

reconciliation

Reconcile accounts by comparing GL balances to subledgers, bank statements, or third-party data. Use when performing bank reconciliations, GL-to-subledger recs, intercompany reconciliations, or identifying and categorizing reconciling items.

sandbaseai/sandbase-skills · 54 tokens