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:
1 parent
5c37d54070
commit
8d97adc1dc
17 files changed
+216
-27
No files matched your search
@@ -6,6 +6,8 @@ import sys:lib/sys.mq.md
|
||||
import json:lib/json.mq.md
|
||||
---
|
||||
|
||||
Official quantum circuit simulator (English). Gates + circuits; ABI plugin.
|
||||
|
||||
## ensure_plugin
|
||||
|
||||
Load the ABI v2 `quantum` plugin once.
|
||||
@@ -57,72 +59,98 @@ State-vector circuit (default |0…0⟩). Optional `steps=` gate table (column o
|
||||
## h
|
||||
+ `qubit`=0
|
||||
|
||||
Hadamard on qubit (default 0).
|
||||
|
||||
*> quantum_h circuit=`self` qubit=`qubit`*
|
||||
|
||||
## x
|
||||
+ `qubit`=0
|
||||
|
||||
Pauli X on qubit.
|
||||
|
||||
*> quantum_x circuit=`self` qubit=`qubit`*
|
||||
|
||||
## y
|
||||
+ `qubit`=0
|
||||
|
||||
Pauli Y on qubit.
|
||||
|
||||
*> quantum_y circuit=`self` qubit=`qubit`*
|
||||
|
||||
## z
|
||||
+ `qubit`=0
|
||||
|
||||
Pauli Z on qubit.
|
||||
|
||||
*> quantum_z circuit=`self` qubit=`qubit`*
|
||||
|
||||
## s
|
||||
+ `qubit`=0
|
||||
|
||||
Phase S on qubit.
|
||||
|
||||
*> quantum_s circuit=`self` qubit=`qubit`*
|
||||
|
||||
## t
|
||||
+ `qubit`=0
|
||||
|
||||
Phase T on qubit.
|
||||
|
||||
*> quantum_t circuit=`self` qubit=`qubit`*
|
||||
|
||||
## i
|
||||
+ `qubit`=0
|
||||
|
||||
Identity on qubit.
|
||||
|
||||
*> quantum_i circuit=`self` qubit=`qubit`*
|
||||
|
||||
## rx
|
||||
+ `qubit`=0
|
||||
+ `theta`
|
||||
|
||||
Rotate about X by theta.
|
||||
|
||||
*> quantum_rx circuit=`self` qubit=`qubit` theta=`theta`*
|
||||
|
||||
## ry
|
||||
+ `qubit`=0
|
||||
+ `theta`
|
||||
|
||||
Rotate about Y by theta.
|
||||
|
||||
*> quantum_ry circuit=`self` qubit=`qubit` theta=`theta`*
|
||||
|
||||
## rz
|
||||
+ `qubit`=0
|
||||
+ `theta`
|
||||
|
||||
Rotate about Z by theta.
|
||||
|
||||
*> quantum_rz circuit=`self` qubit=`qubit` theta=`theta`*
|
||||
|
||||
## cx
|
||||
+ `control`=0
|
||||
+ `target`=1
|
||||
|
||||
CNOT: control → target.
|
||||
|
||||
*> quantum_cx circuit=`self` control=`control` target=`target`*
|
||||
|
||||
## cz
|
||||
+ `control`=0
|
||||
+ `target`=1
|
||||
|
||||
Controlled-Z.
|
||||
|
||||
*> quantum_cz circuit=`self` control=`control` target=`target`*
|
||||
|
||||
## swap
|
||||
+ `a`=0
|
||||
+ `b`=1
|
||||
|
||||
Swap two qubits.
|
||||
|
||||
*> quantum_swap circuit=`self` a=`a` b=`b`*
|
||||
|
||||
## barrier
|
||||
@@ -229,12 +257,16 @@ Named built-in gate (`name=H`) or custom unitary from `matrix=` (nested list or
|
||||
|
||||
## matrix
|
||||
|
||||
Explicit matrix of this object.
|
||||
|
||||
*> quantum_gate_matrix gate=`self`*
|
||||
|
||||
## matches_matrix
|
||||
+ `matrix`
|
||||
+ `tol`=0.000000001
|
||||
|
||||
Whether this gate matches matrix (tol).
|
||||
|
||||
*> quantum_gate_matches_matrix gate=`self` matrix=`matrix` tol=`tol`*
|
||||
|
||||
## draw
|
||||
@@ -259,6 +291,8 @@ Density matrix from a state/circuit (`state=`) or an explicit Hermitian `matrix=
|
||||
|
||||
## matrix
|
||||
|
||||
Explicit matrix of this object.
|
||||
|
||||
*> quantum_density_matrix density=`self`*
|
||||
|
||||
## purity
|
||||
@@ -283,6 +317,8 @@ Hermitian spectrum → `{eigenvalues, eigenvectors}`.
|
||||
## expect
|
||||
+ `obs`
|
||||
|
||||
Expectation value of obs.
|
||||
|
||||
*> quantum_density_expect density=`self` obs=`obs`*
|
||||
|
||||
## draw
|
||||
|
||||
@@ -6,6 +6,8 @@ import sys:lib/sys.mq.md
|
||||
import json:lib/json.mq.md
|
||||
---
|
||||
|
||||
官方量子电路模拟(中文)。门 + 电路;ABI 插件。
|
||||
|
||||
## 确保插件
|
||||
|
||||
加载 ABI v2 `quantum` 插件。
|
||||
@@ -31,6 +33,8 @@ import json:lib/json.mq.md
|
||||
+ `态`
|
||||
+ `分割`=1
|
||||
|
||||
纯态 / 电路的施密特分解。
|
||||
|
||||
> 确保插件
|
||||
*> quantum_schmidt state=`态` cut=`分割`*
|
||||
|
||||
@@ -55,72 +59,98 @@ import json:lib/json.mq.md
|
||||
## 哈达玛
|
||||
+ `比特`=0
|
||||
|
||||
对比特施加哈达玛(默认 0)。
|
||||
|
||||
*> quantum_h circuit=`self` qubit=`比特`*
|
||||
|
||||
## 泡利X
|
||||
+ `比特`=0
|
||||
|
||||
对比特施加泡利 X。
|
||||
|
||||
*> quantum_x circuit=`self` qubit=`比特`*
|
||||
|
||||
## 泡利Y
|
||||
+ `比特`=0
|
||||
|
||||
对比特施加泡利 Y。
|
||||
|
||||
*> quantum_y circuit=`self` qubit=`比特`*
|
||||
|
||||
## 泡利Z
|
||||
+ `比特`=0
|
||||
|
||||
对比特施加泡利 Z。
|
||||
|
||||
*> quantum_z circuit=`self` qubit=`比特`*
|
||||
|
||||
## 相位S
|
||||
+ `比特`=0
|
||||
|
||||
对比特施加相位 S。
|
||||
|
||||
*> quantum_s circuit=`self` qubit=`比特`*
|
||||
|
||||
## 相位T
|
||||
+ `比特`=0
|
||||
|
||||
对比特施加相位 T。
|
||||
|
||||
*> quantum_t circuit=`self` qubit=`比特`*
|
||||
|
||||
## 单位
|
||||
+ `比特`=0
|
||||
|
||||
对比特施加单位门 / 单位矩阵。
|
||||
|
||||
*> quantum_i circuit=`self` qubit=`比特`*
|
||||
|
||||
## 绕X
|
||||
+ `比特`=0
|
||||
+ `参数`
|
||||
|
||||
绕 X 旋转参数角。
|
||||
|
||||
*> quantum_rx circuit=`self` qubit=`比特` theta=`参数`*
|
||||
|
||||
## 绕Y
|
||||
+ `比特`=0
|
||||
+ `参数`
|
||||
|
||||
绕 Y 旋转参数角。
|
||||
|
||||
*> quantum_ry circuit=`self` qubit=`比特` theta=`参数`*
|
||||
|
||||
## 绕Z
|
||||
+ `比特`=0
|
||||
+ `参数`
|
||||
|
||||
绕 Z 旋转参数角。
|
||||
|
||||
*> quantum_rz circuit=`self` qubit=`比特` theta=`参数`*
|
||||
|
||||
## 控非
|
||||
+ `控制`=0
|
||||
+ `目标`=1
|
||||
|
||||
控非门:控制 → 目标。
|
||||
|
||||
*> quantum_cx circuit=`self` control=`控制` target=`目标`*
|
||||
|
||||
## 控相
|
||||
+ `控制`=0
|
||||
+ `目标`=1
|
||||
|
||||
控制相位 Z。
|
||||
|
||||
*> quantum_cz circuit=`self` control=`控制` target=`目标`*
|
||||
|
||||
## 交换
|
||||
+ `比特甲`=0
|
||||
+ `比特乙`=1
|
||||
|
||||
交换两比特。
|
||||
|
||||
*> quantum_swap circuit=`self` a=`比特甲` b=`比特乙`*
|
||||
|
||||
## 屏障
|
||||
@@ -227,12 +257,16 @@ Pauli 串(左端=高比特)或矩阵期望值。
|
||||
|
||||
## 矩阵
|
||||
|
||||
本对象的显式矩阵。
|
||||
|
||||
*> quantum_gate_matrix gate=`self`*
|
||||
|
||||
## 匹配矩阵
|
||||
+ `矩阵`
|
||||
+ `容差`=0.000000001
|
||||
|
||||
门是否匹配给定矩阵(容差)。
|
||||
|
||||
*> quantum_gate_matches_matrix gate=`self` matrix=`矩阵` tol=`容差`*
|
||||
|
||||
## 绘图
|
||||
@@ -257,6 +291,8 @@ Pauli 串(左端=高比特)或矩阵期望值。
|
||||
|
||||
## 矩阵
|
||||
|
||||
本对象的显式矩阵。
|
||||
|
||||
*> quantum_density_matrix density=`self`*
|
||||
|
||||
## 纯度
|
||||
@@ -281,6 +317,8 @@ Tr(ρ²)。
|
||||
## 期望
|
||||
+ `可观测量`
|
||||
|
||||
可观测量的期望值。
|
||||
|
||||
*> quantum_density_expect density=`self` obs=`可观测量`*
|
||||
|
||||
## 绘图
|
||||
|
||||
Reference in new issue
Block a user