docs(ext): narrate quantum/linalg and link-index public features

Add module intros and missing purpose lines for EN/ZH quantum and linalg
extensions; migrate remaining public/features footnote gets to [key](base).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-14 12:45:57 +08:00
1 parent 5c37d54070
commit 8d97adc1dc
17 files changed
+216 -27

No files matched your search

+54
View File
@@ -5,6 +5,8 @@ import plugin:lib/plugin.mq.md
import sys:lib/sys.mq.md
---
Formula-first linear algebra (English). MatExpr simplify + display; ABI plugin.
## ensure_plugin
Load the ABI v2 `linalg` plugin once.
@@ -19,6 +21,8 @@ Load the ABI v2 `linalg` plugin once.
## ping
Plugin health check.
> ensure_plugin
*> linalg_ping*
@@ -35,6 +39,8 @@ Matrix product (lazy MatMul; shape-checked).
+ `a`
+ `b`
Matrix / expression addition.
> ensure_plugin
*> linalg_add a=`a` b=`b`*
@@ -42,12 +48,16 @@ Matrix product (lazy MatMul; shape-checked).
+ `a`
+ `b`
Matrix / expression subtraction.
> ensure_plugin
*> linalg_sub a=`a` b=`b`*
## transpose
+ `expr`
Transpose expression.
> ensure_plugin
*> linalg_transpose expr=`expr`*
@@ -80,12 +90,16 @@ Display ASCII (default simplify first). Pass `raw=True` to keep the written tree
+ `expr`
+ `raw`=False
LaTeX display.
> ensure_plugin
*> linalg_latex expr=`expr` raw=`raw`*
## shape
+ `expr`
Matrix shape (rows, cols).
> ensure_plugin
*> linalg_shape expr=`expr`*
@@ -102,6 +116,8 @@ Record a formula SVG via host plot channel (default simplify). Returns the expr
## eye
+ `n`
Identity matrix of order n.
> ensure_plugin
*> linalg_eye n=`n`*
@@ -109,6 +125,8 @@ Record a formula SVG via host plot channel (default simplify). Returns the expr
+ `rows`
+ `cols`
Zero matrix.
> ensure_plugin
*> linalg_zeros rows=`rows` cols=`cols`*
@@ -140,12 +158,16 @@ Evaluate to dense (default simplify first).
## det
+ `expr`
Determinant.
> ensure_plugin
*> linalg_det expr=`expr`*
## trace
+ `expr`
Trace.
> ensure_plugin
*> linalg_trace expr=`expr`*
@@ -292,6 +314,8 @@ Matrix value (`_type=matrix`). Prefer infix `A + B` / `A * B`, or methods `` `A`
## T
Transpose (method).
*> linalg_transpose expr=`self`*
## T_ascii
@@ -304,69 +328,99 @@ Transpose then display ASCII (auto-simplified). Handy for lecture identities.
## add
+ `b`
Matrix / expression addition.
*> linalg_add a=`self` b=`b`*
## sub
+ `b`
Matrix / expression subtraction.
*> linalg_sub a=`self` b=`b`*
## mul
+ `b`
Matrix / expression product.
*> linalg_mul a=`self` b=`b`*
## inv
Inverse.
*> linalg_inv expr=`self`*
## simplify
Simplify MatExpr.
*> linalg_simplify expr=`self`*
## ascii
ASCII display.
*> linalg_ascii expr=`self` raw=False*
## latex
LaTeX display.
*> linalg_latex expr=`self` raw=False*
## explicit
Evaluate to an explicit matrix.
*> linalg_explicit expr=`self` raw=False*
## det
Determinant.
*> linalg_det expr=`self`*
## trace
Trace.
*> linalg_trace expr=`self`*
## show
+ `path`=None
+ `raw`=False
Show / export the expression.
*> linalg_show expr=`self` path=`path` raw=`raw`*
## eye
+ `n`
Identity matrix of order n.
*> linalg_eye n=`n`*
## zeros
+ `rows`
+ `cols`
Zero matrix.
*> linalg_zeros rows=`rows` cols=`cols`*
## from_list
+ `data`
Matrix from nested list.
*> linalg_from_list data=`data`*
## from_formula
+ `formula`
Matrix from formula text.
*> linalg_from_formula formula=`formula`*
+60
View File
@@ -5,6 +5,8 @@ import plugin:lib/plugin.mq.md
import sys:lib/sys.mq.md
---
公式优先的线性代数(中文)。矩阵表达式化简与展示;ABI 插件。
## 确保插件
加载 ABI v2 `linalg` 插件一次。
@@ -19,6 +21,8 @@ import sys:lib/sys.mq.md
## 探测
插件探活。
> 确保插件
*> linalg_ping*
@@ -35,6 +39,8 @@ import sys:lib/sys.mq.md
+ `左`
+ `右`
矩阵 / 表达式加法。
> 确保插件
*> linalg_add a=`左` b=`右`*
@@ -42,18 +48,24 @@ import sys:lib/sys.mq.md
+ `左`
+ `右`
矩阵 / 表达式减法。
> 确保插件
*> linalg_sub a=`左` b=`右`*
## 转置
+ `式`
转置。
> 确保插件
*> linalg_transpose expr=`式`*
## 逆
+ `式`
求逆。
> 确保插件
*> linalg_inv expr=`式`*
@@ -78,12 +90,16 @@ import sys:lib/sys.mq.md
+ `式`
+ `原始`=False
LaTeX 展示。
> 确保插件
*> linalg_latex expr=`式` raw=`原始`*
## 形状
+ `式`
形状。
> 确保插件
*> linalg_shape expr=`式`*
@@ -100,6 +116,8 @@ import sys:lib/sys.mq.md
## 单位
+ `阶`
对比特施加单位门 / 单位矩阵。
> 确保插件
*> linalg_eye n=`阶`*
@@ -107,12 +125,16 @@ import sys:lib/sys.mq.md
+ `行`
+ `列`
零矩阵。
> 确保插件
*> linalg_zeros rows=`行` cols=`列`*
## 自列表
+ `数据`
由嵌套列表构造矩阵。
> 确保插件
*> linalg_from_list data=`数据`*
@@ -136,12 +158,16 @@ import sys:lib/sys.mq.md
## 行列式
+ `式`
行列式。
> 确保插件
*> linalg_det expr=`式`*
## 迹
+ `式`
迹。
> 确保插件
*> linalg_trace expr=`式`*
@@ -159,6 +185,8 @@ import sys:lib/sys.mq.md
+ `左`
+ `右`
稠密乘。
> 确保插件
*> linalg_matmul a=`左` b=`右`*
@@ -286,6 +314,8 @@ import sys:lib/sys.mq.md
## 转置
转置。
*> linalg_transpose expr=`self`*
## 转置文本
@@ -298,70 +328,100 @@ import sys:lib/sys.mq.md
## 加
+ `右`
矩阵 / 表达式加法。
*> linalg_add a=`self` b=`右`*
## 减
+ `右`
矩阵 / 表达式减法。
*> linalg_sub a=`self` b=`右`*
## 乘
+ `右`
矩阵 / 表达式乘法。
*> linalg_mul a=`self` b=`右`*
## 逆
求逆。
*> linalg_inv expr=`self`*
## 化简
化简矩阵表达式。
*> linalg_simplify expr=`self`*
## 文本
ASCII 展示。
*> linalg_ascii expr=`self` raw=False*
## 乳胶
LaTeX 展示。
*> linalg_latex expr=`self` raw=False*
## 求值
+ `原始`=False
求成显式矩阵。
*> linalg_explicit expr=`self` raw=`原始`*
## 行列式
行列式。
*> linalg_det expr=`self`*
## 迹
迹。
*> linalg_trace expr=`self`*
## 展示
+ `路径`=None
+ `原始`=False
展示 / 导出表达式。
*> linalg_show expr=`self` path=`路径` raw=`原始`*
## 单位
+ `阶`
对比特施加单位门 / 单位矩阵。
*> linalg_eye n=`阶`*
## 零阵
+ `行`
+ `列`
零矩阵。
*> linalg_zeros rows=`行` cols=`列`*
## 自列表
+ `数据`
由嵌套列表构造矩阵。
*> linalg_from_list data=`数据`*
## 自公式
+ `公式`
由公式文本构造矩阵。
*> linalg_from_formula formula=`公式`*