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,7 @@ markup: occlusion
|
||||
title: 贝尔态:两个量子比特如何一起回答
|
||||
description: 从一条假设开始,搭电路、看概率、画图,并用断言验收。
|
||||
import:
|
||||
quantum: ext/quantum/quantum.mq.md
|
||||
quantum: ext/quantum/circuit/index.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
@@ -3,7 +3,7 @@ markup: occlusion
|
||||
title: Bell state
|
||||
description: H then CX; probabilities ≈ 1/2; circuit SVG.
|
||||
import:
|
||||
quantum: ext/quantum/quantum.mq.md
|
||||
quantum: ext/quantum/circuit/index.mq.md
|
||||
math: lib/math.mq.md
|
||||
json: lib/json.mq.md
|
||||
---
|
||||
|
||||
@@ -3,7 +3,7 @@ markup: occlusion
|
||||
title: Entanglement lab
|
||||
description: Bell state — density, partial trace, Schmidt, themed SVG (Q7/Q8).
|
||||
import:
|
||||
quantum: ext/quantum/quantum.mq.md
|
||||
quantum: ext/quantum/circuit/index.mq.md
|
||||
math: lib/math.mq.md
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ markup: occlusion
|
||||
title: GHZ state
|
||||
description: 3-qubit GHZ; |000⟩/|111⟩ ≈ 1/2; probs + H matrix heatmap.
|
||||
import:
|
||||
quantum: ext/quantum/quantum.mq.md
|
||||
quantum: ext/quantum/circuit/index.mq.md
|
||||
gate: ext/quantum/gate/index.mq.md
|
||||
---
|
||||
|
||||
# GHZ
|
||||
@@ -24,7 +25,7 @@ H on qubit 0, CX(0→1), CX(0→2). Ideal: |000⟩ and |111⟩ each with probabi
|
||||
**p = > qc.probabilities**
|
||||
**_ = > qc.draw path="ghz.svg"**
|
||||
**_ = > qc.draw kind="probs" path="ghz-probs.svg"**
|
||||
**H = > quantum.gate name="H"**
|
||||
**H = > gate.gate name="H"**
|
||||
**_ = > H.draw kind="matrix" path="ghz-h-matrix.svg"**
|
||||
|
||||
> print text=`p`
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: Quantum skill call demo
|
||||
description: >-
|
||||
Agent-style flow via ext/quantum index and domain modules (Bell probabilities).
|
||||
import:
|
||||
circuit: ext/quantum/circuit/index.mq.md
|
||||
simulate: ext/quantum/simulate/index.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
Build Phi-plus with domain skills, then print ideal probabilities. Prefer the
|
||||
same steps via marqdo call with --effects plugin and toget when an agent drives
|
||||
the session.
|
||||
|
||||
**qc = > circuit.new qubits=2 steps=None**
|
||||
**qc = > circuit.hadamard circuit=`qc` qubit=0**
|
||||
**qc = > circuit.cnot circuit=`qc` control=0 target=1**
|
||||
**p = > simulate.probabilities circuit=`qc`**
|
||||
> print text=`p`
|
||||
Reference in new issue
Block a user