cqlib-kernel

cqlib-kernel is a skill for Claude Code, Codex from xi-zhao/OpenQuantum. It costs 42 tokens per session (697 once invoked), scanned A, original, MIT.

A controlled workflow for running a cqlib quantum-style angle kernel and quantum support vector machine (QSVM), a classifier that separates labelled data. It compares the result with independent mathematical and RBF baselines and states the method's scientific limits.

In plain words
What is it for?
Use it to fit and test a classical angle kernel, compare kernel values and classification with reference calculations, and report resource settings and limitations.
Why use it?
It prevents misleading conclusions by checking the calculation independently and distinguishing exact results from training details such as numerical jitter. It also makes clear that this method does not demonstrate quantum advantage.

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 fit and test a classical angle kernel, compare kernel values and classification with reference calculations, and report resource settings and limitations.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/xi-zhao/openquantum/cqlib-kernel"><img src="https://agentmods.dev/badge/skills/xi-zhao/openquantum/cqlib-kernel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 697 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.00042 $0.00697
Opus 5.5 $0.00017 $0.00279
Sonnet 5.5 $0.00008 $0.00139
Haiku 4.5 $0.00004 $0.00070

Measured yesterday against content hash 2447b4f61216, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cqlib-kernel 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 yesterday.

The scan reads SKILL.md. This mod also ships 11 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/cqlib-kernel/SKILL.md · 30 lines

What it actually says

cqlib-qml

原生 SDK 路径

本能力同时支持 CQLib 的原生公开 API。用户需要 上游计算内核、编码器、量子核、学习算法与用户数据 时,由 Agent 在固定依赖环境中编写和运行任务代码,不限于下文便捷 Tool 的预设模型。

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

固定兼容的 CQLib 2.0.0b4 与完整 cqlib-qml Git 包;两者仍属上游预发布接口。原生 API 使用已安装 QML 包,不能把 Skill/upstream 的旧裁剪适配目录加到 sys.path。便捷 Tool 保留旧 angle-kernel 适配及独立回归。

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

先在设置中心按需启用 cqlib_kernel_local,准备 Rust 构建环境。明确给出 trainX/trainY、testX 及可选 testY,再调用 fit_cqlib_angle_kernel。不从全数据拟合缩放或选择划分;所有实特征按弧度使用,实际编码为 RY(2x)。

报告真实 SDK 核与独立 ∏cos²(x−y) 对照,区分无 jitter 的 fidelity Gram 与上游训练时的 1e-8 对角 jitter;同时给解析核分类和同数据 RBF baseline。该核可经典解析,不宣称量子优势。只开放 classical angle 核,不开放 signed amplitude、共享参数 parameter-shift、VQC 或 swap test。若用户要求这些路径,解释上游当前缺陷,不能暗中用不同算法替代。

资源由用户选择,通过 execution.timeoutMs、maxOutputBytes、threads 控制进程;依赖须显式准备;计算仍可能写 SDK 缓存,保留 workspace-write。不要把执行成功或参考相符写成最终科学验收。安装、来源与示例见 候选库接入说明。

依赖准备

运行前执行 node scripts/setup-paper-tools.mjs cqlib-kernel。缺失、旧锁和已安装环境的处理见共同准备说明;Tool 不自动安装或升级依赖。

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. yesterday Changed · +13 lines 2447b4f61216
  2. 19d ago Changed · +4 lines 5d5a5fb01435
  3. 23d ago First seen · 13 lines · 42 tokens per session scan A 36cce327150f

Subscribe to this mod's changes

cqlib-kernel is a skill published in the GitHub repository xi-zhao/OpenQuantum (75 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 697 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-21.

Related

Other skills, from other repositories

automodel

Guides the user in discovering a better model structure (e.g. from feature transformations in logistic regression to equation terms within PDEs to neural network layer compositions) out of data. Use when the user asks to create or improve an existing model. Uses an iterative meta/inner agent loop to explore structural…

Unlayer-AI/automodel · 68 tokens

ml-experiment-review

Use this skill when reviewing an ML experiment, benchmark, ablation, or training run.

NeoXider/neoxider-mcp-hub · 0 tokens

kermt-pretrain-scratch

Pretrain a fresh KERMT model from scratch on a user-provided corpus. Builds a new vocabulary from the corpus, instantiates the model architecture from defaults, and launches pretrainddp.py inside the kermt container (detached for long runs). Unlike kermt-continue-pretrain, no starting checkpoint is loaded — the model…

NVIDIA/skills · 82 tokens

i4h-workflow-dataset-convert

Convert workflow HDF5 recordings to LeRobot datasets for training or browser inspection. Use for conversion; do not use for replay, augmentation, or raw-data repair.

NVIDIA/skills · 43 tokens

nemo-mbridge-perf-cuda-graphs

Validate and use CUDA graph capture in Megatron Bridge, including local full-iteration graphs and Transformer Engine scoped graphs for attention, MLP, and MoE modules.

NVIDIA/skills · 44 tokens

onescience-dataset-builder

A workflow tool for building and checking scientific datasets. It can create a small startup script around existing data-processing code, then check the finished dataset and produce metadata.

onescience-ai/OneSkills · 138 tokens