Ship quantum skill=tools tree with call session and ZH package.
Split ext/quantum into index + modules, add marqdo call --effects/--session/--toget, narrative-ratio checks, and a same-package 量子/ tree so agents can follow a decision path for Bell demos without inventing a second API. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
492790e985
commit
0e389f34ec
65 files changed
+3714
-1036
No files matched your search
@@ -3,7 +3,8 @@ markup: occlusion
|
||||
title: Quantum circuits (ext/quantum)
|
||||
description: Official quantum simulator — tables, gates, Q7 density, Q8 themed SVG
|
||||
import:
|
||||
quantum: ext/quantum/quantum.mq.md
|
||||
quantum: ext/quantum/circuit/index.mq.md
|
||||
gate: ext/quantum/gate/index.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
@@ -27,7 +28,7 @@ Q8: `draw theme="dark"|"light"|"bw"` (default dark lab look) on circuit / probs
|
||||
**`qc` = > quantum.circuit qubits=3 steps=`steps`**
|
||||
**`p` = > `qc`.probabilities**
|
||||
**`_` = > `qc`.draw kind="probs" theme="dark"**
|
||||
**`H` = > quantum.gate name="H"**
|
||||
**`H` = > gate.gate name="H"**
|
||||
**`__` = > `H`.draw kind="matrix"**
|
||||
|
||||
> print text=`p`
|
||||
|
||||
@@ -1 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="152" height="176" viewBox="0 0 152.0 176.0" role="img" aria-label="measurement probabilities"><line x1="36" y1="140" x2="136" y2="140" stroke="#1a1a1a" stroke-width="1.2"/><line x1="36" y1="20" x2="36" y2="140" stroke="#1a1a1a" stroke-width="1.2"/><text x="6" y="24" font-family="ui-monospace,Menlo,monospace" font-size="10" fill="#1a1a1a">1</text><text x="6" y="144" font-family="ui-monospace,Menlo,monospace" font-size="10" fill="#1a1a1a">0</text><rect x="40" y="79.99999999999999" width="36" height="60.000000000000014" fill="#4a6fa5" stroke="#1a1a1a" stroke-width="1"/><text x="58" y="156" text-anchor="middle" font-family="ui-monospace,Menlo,monospace" font-size="10" fill="#1a1a1a">000</text><text x="58" y="75.99999999999999" text-anchor="middle" font-family="ui-monospace,Menlo,monospace" font-size="9" fill="#555">0.50</text><rect x="88" y="79.99999999999999" width="36" height="60.000000000000014" fill="#4a6fa5" stroke="#1a1a1a" stroke-width="1"/><text x="106" y="156" text-anchor="middle" font-family="ui-monospace,Menlo,monospace" font-size="10" fill="#1a1a1a">111</text><text x="106" y="75.99999999999999" text-anchor="middle" font-family="ui-monospace,Menlo,monospace" font-size="9" fill="#555">0.50</text></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="152" height="180" viewBox="0 0 152.0 180.0" data-theme="dark" role="img" aria-label="measurement probabilities"><defs>
|
||||
<linearGradient id="mq-bg" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#0a0e14"/>
|
||||
<stop offset="55%" stop-color="#141c28"/>
|
||||
<stop offset="100%" stop-color="#0a0e14"/>
|
||||
</linearGradient>
|
||||
<filter id="mq-glow" x="-40%" y="-40%" width="180%" height="180%">
|
||||
<feGaussianBlur stdDeviation="2.2" result="b"/>
|
||||
<feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge>
|
||||
</filter>
|
||||
<filter id="mq-soft" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feDropShadow dx="0" dy="1.5" stdDeviation="1.8" flood-color="#4c6fff" flood-opacity="0.35"/>
|
||||
</filter>
|
||||
</defs><rect width="152.0" height="180.0" rx="14" fill="url(#mq-bg)"/><line x1="36" y1="144" x2="136" y2="144" stroke="#7d8fa3" stroke-width="1.2"/><line x1="36" y1="24" x2="36" y2="144" stroke="#7d8fa3" stroke-width="1.2"/><text x="8" y="28" font-family="ui-monospace,Menlo,Consolas,monospace" font-size="10" fill="#e8eef6">1</text><text x="8" y="148" font-family="ui-monospace,Menlo,Consolas,monospace" font-size="10" fill="#e8eef6">0</text><rect x="40" y="83.99999999999999" width="36" height="60.000000000000014" rx="4" fill="#5b7cfa" stroke="#f0f5ff" stroke-width="1" filter="url(#mq-soft)"/><text x="58" y="162" text-anchor="middle" font-family="ui-monospace,Menlo,Consolas,monospace" font-size="11" fill="#e8eef6">000</text><text x="58" y="78.99999999999999" text-anchor="middle" font-family="ui-monospace,Menlo,Consolas,monospace" font-size="10" fill="#93a4b8">0.50</text><rect x="88" y="83.99999999999999" width="36" height="60.000000000000014" rx="4" fill="#5b7cfa" stroke="#f0f5ff" stroke-width="1" filter="url(#mq-soft)"/><text x="106" y="162" text-anchor="middle" font-family="ui-monospace,Menlo,Consolas,monospace" font-size="11" fill="#e8eef6">111</text><text x="106" y="78.99999999999999" text-anchor="middle" font-family="ui-monospace,Menlo,Consolas,monospace" font-size="10" fill="#93a4b8">0.50</text></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -3,13 +3,16 @@ markup: occlusion
|
||||
title: 量子电路(ext/quantum)
|
||||
description: 官方量子模拟 — 表、门、Q7 密度与高级图、Q8 主题 SVG
|
||||
导入:
|
||||
量子: ext/quantum/量子.mq.md
|
||||
量子: ext/quantum/量子/电路/索引.mq.md
|
||||
门: ext/quantum/量子/门/索引.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
可选扩展(非 stdlib)。安装:`marqdo ext add quantum`(或编译 `marqdo_plugin_quantum`)。
|
||||
|
||||
中文面在同包 `ext/quantum/量子/`(根 skill:`索引.mq.md`),与英文模块树并列、不混排 API。
|
||||
|
||||
GHZ(3 比特):q0 哈达玛,再控非 0→1、0→2。理想 |000⟩ / |111⟩ 各约 1/2。
|
||||
|
||||
Q7:密度 / 部分迹 / Schmidt / `绘图 种类=hinton` 等 — `examples/quantum-entanglement/`。
|
||||
@@ -27,7 +30,7 @@ Q8:`绘图 主题="dark"|"light"|"bw"`(默认 dark 科技感)作用于电
|
||||
**`qc` = > 量子.电路 比特数=3 步骤=`步骤`**
|
||||
**`p` = > `qc`.概率**
|
||||
**`_` = > `qc`.绘图 种类="probs" 主题="dark"**
|
||||
**`H` = > 量子.门 名="H"**
|
||||
**`H` = > 门.门 名="H"**
|
||||
**`__` = > `H`.绘图 种类="matrix"**
|
||||
|
||||
> 打印 内容=`p`
|
||||
|
||||
@@ -34,7 +34,7 @@ Those four uses are one call. Knowledge becomes a tool because knowledge can alr
|
||||
|
||||
The command keeps a boundary.
|
||||
|
||||
An external call runs a pure function. Writing files, starting a process, using the network or loading a plugin is refused before the function runs, so the side effect does not happen. Wider permission stays on the checks the project already has. An instance method needs its receiver; this command does not invent one.
|
||||
An external call defaults to a pure function. Writing files, starting a process, using the network or loading a plugin is refused before the function runs. Pass `--effects plugin` when the tool needs an ABI plugin (for example `ext/quantum`). Session bindings use `--session` and `--toget name` (or trailing `toget name`); later calls may pass `$name`. Nested sub-tools use a dotted path such as `outer.helper`. An instance method needs its receiver; this command does not invent one.
|
||||
|
||||
The function must resolve to exactly one declaration. No match, or one short name that hits two functions, is a structured error. The command does not pick the first hit. Arguments bind through the signature and contract that the function already has. Missing, unknown and ill-typed arguments are diagnostics.
|
||||
|
||||
|
||||
Reference in new issue
Block a user