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:
1 parent
25b7be6739
commit
eea6fe1a0e
20 files changed
+852
-23
No files matched your search
@@ -120,7 +120,33 @@ Sample computational-basis shots (deterministic with `seed=`).
|
||||
|
||||
## draw
|
||||
+ `path`=None
|
||||
+ `kind`=circuit
|
||||
+ `qubit`=0
|
||||
|
||||
Circuit rail SVG (`quantum_svg`). Records into view/CLI plots via host `record_plot`.
|
||||
Circuit rail / probability bars / Bloch sphere SVG (`kind=circuit|probs|bloch`). Records into view/CLI plots via host `record_plot`.
|
||||
|
||||
**> quantum_draw_circuit circuit=`self` path=`path`**
|
||||
**> quantum_draw_circuit circuit=`self` path=`path` kind=`kind` qubit=`qubit`**
|
||||
|
||||
# gate
|
||||
+ `name`
|
||||
+ `theta`=None
|
||||
|
||||
Named gate handle (built-in unitary). Use `matches_matrix` to check an author-supplied matrix.
|
||||
|
||||
> ensure_plugin
|
||||
**> quantum_gate_new name=`name` theta=`theta`**
|
||||
|
||||
## matrix
|
||||
|
||||
**> quantum_gate_matrix gate=`self`**
|
||||
|
||||
## matches_matrix
|
||||
+ `matrix`
|
||||
+ `tol`=0.000000001
|
||||
|
||||
**> quantum_gate_matches_matrix gate=`self` matrix=`matrix` tol=`tol`**
|
||||
|
||||
## draw
|
||||
+ `path`=None
|
||||
|
||||
**> quantum_gate_draw gate=`self` path=`path`**
|
||||
+28
-2
@@ -118,7 +118,33 @@ description: 官方量子电路模拟(中文)。门 + 电路;ABI 插件。
|
||||
|
||||
## 绘图
|
||||
+ `路径`=None
|
||||
+ `种类`=circuit
|
||||
+ `比特`=0
|
||||
|
||||
电路轨线 SVG(`quantum_svg`)。经 host `record_plot` 进入 view/CLI plots。
|
||||
电路轨线 / 概率条 / 布洛赫球(种类 circuit、probs 或 bloch)。经 record_plot 进入 view/CLI plots。
|
||||
|
||||
**> quantum_draw_circuit circuit=`self` path=`路径`**
|
||||
**> quantum_draw_circuit circuit=`self` path=`路径` kind=`种类` qubit=`比特`**
|
||||
|
||||
# 门
|
||||
+ `名`
|
||||
+ `参数`=None
|
||||
|
||||
具名门句柄。用「匹配矩阵」核对作者给出的矩阵。
|
||||
|
||||
> 确保插件
|
||||
**> quantum_gate_new name=`名` theta=`参数`**
|
||||
|
||||
## 矩阵
|
||||
|
||||
**> quantum_gate_matrix gate=`self`**
|
||||
|
||||
## 匹配矩阵
|
||||
+ `矩阵`
|
||||
+ `容差`=0.000000001
|
||||
|
||||
**> quantum_gate_matches_matrix gate=`self` matrix=`矩阵` tol=`容差`**
|
||||
|
||||
## 绘图
|
||||
+ `路径`=None
|
||||
|
||||
**> quantum_gate_draw gate=`self` path=`路径`**
|
||||
Reference in new issue
Block a user