Land quantum Q4 visuals and gate Stream to LLM/agent imports.

Add probs/Bloch draw kinds and matches_matrix, plus feature docs; hide the view Stream panel unless llm/agent is imported, and stop rewriting method names like 绘图 through host_plot aliases.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-12 12:36:51 +08:00
1 parent 25b7be6739
commit eea6fe1a0e
20 files changed
+852 -23

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ ext/ holds official optional extensions. They are not part of lib/. Resolve via
- ext/llm — OpenAI-compatible chat object. Design: doc/design/ext-llm.md
- ext/agent — agent development framework (layout helpers today; compose with ext/llm for model-backed orchestration). Design: doc/design/ext-agent.md
- ext/quantum — state-vector circuits, `steps=` tables, `draw kind=circuit|probs|bloch`, named `gate` + `matches_matrix`. Design: doc/design/ext-quantum.md
- Installer: marqdo ext list / add / remove — doc/design/ext-cli.md
- Native plugins: lib/plugin + include/marqdo_abi.h — doc/design/ext-abi.md
+1
View File
@@ -9,6 +9,7 @@ ext/ 存放官方可选扩展,不属于 lib/。解析顺序:MARQDO_EXT、./e
- ext/llm(ext/大模型)— OpenAI 兼容聊天。设计:doc/design/ext-llm.md
- ext/agent(ext/智能体)— 智能体开发框架(当前含布局助手;与大模型组合做编排见路线)。设计:doc/design/ext-agent.md
- ext/quantum(ext/量子)— 态向量电路、`步骤=` 表、`绘图 种类=circuit|probs|bloch`、具名「门」与「匹配矩阵」。设计:doc/design/ext-quantum.md
- 安装器:marqdo ext list / add / remove — doc/design/ext-cli.md
- 通用原生插件:lib/plugin + include/marqdo_abi.h — doc/design/ext-abi.md
+25
View File
@@ -0,0 +1,25 @@
---
title: Quantum circuits (ext/quantum)
description: Official quantum simulator — tables, gates, probs/Bloch SVG
> ext/quantum/quantum.mq.md
---
# main
Optional package (not stdlib). Install: `marqdo ext add quantum` (or build `marqdo_plugin_quantum`).
Bell state: H then CX. Ideal |00⟩ / |11⟩ each ≈ 1/2. `draw kind=probs` embeds a probability bar chart in view.
`steps` =
| step | gate | qubits |
|------|------|--------|
| 1 | H | 0 |
| 2 | CX | 0,1 |
*`qc` = > quantum.circuit qubits=2 steps=`steps` *
*`p` = > `qc`.probabilities *
*`_` = > `qc`.draw kind=probs *
> print text=`p`
> print text=quantum-feature-ok
+25
View File
@@ -0,0 +1,25 @@
---
title: 量子电路(ext/quantum)
description: 官方量子模拟 — 表、门、概率/布洛赫 SVG
> ext/quantum/量子.mq.md
---
# main
可选扩展(非 stdlib)。安装:`marqdo ext add quantum`(或编译 `marqdo_plugin_quantum`)。
贝尔态:先哈达玛再控非。理想 |00⟩ / |11⟩ 各约 1/2。`绘图 种类=probs` 在 view 嵌入概率条。
`步骤` =
| 步 | 门 | 比特 |
|----|----|------|
| 1 | H | 0 |
| 2 | CX | 0,1 |
*`qc` = > 量子.电路 比特数=2 步骤=`步骤` *
*`p` = > `qc`.概率 *
*`_` = > `qc`.绘图 种类=probs *
> 打印 内容=`p`
> 打印 内容=量子特性-ok