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>
26 lines
634 B
Markdown
26 lines
634 B
Markdown
---
|
|
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
|