Files
marqdo/tests/ext/quantum-draw-smoke.mq.md
T
cflmyandCursor abcb141737 refactor: prefer link-index get across examples and tests
Migrate remaining footnote-style collection access in examples,
public/structure, and ext/lib smokes to [key](base); teach link-index in
structure pages and use bracket calls in the cafe journal example.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 12:54:38 +08:00

34 lines
703 B
Markdown

---
title: quantum draw probs/bloch smoke
description: draw kind=probs and kind=bloch return matching kind tags.
import quantum:ext/quantum/quantum.mq.md
---
# main
`steps` =
| step | gate | qubits |
|------|------|--------|
| 1 | H | 0 |
| 2 | CX | 0,1 |
**qc = > quantum.circuit qubits=2 steps=`steps`**
**img = > `qc`.draw kind="probs" path="quantum-draw-probs.svg"**
**kind = [kind](img)**
1. `kind` == probs
> print text=probs-ok
2. *
> print text=probs-fail
**qc1 = > quantum.circuit qubits=1**
**qc1 = > `qc1`.h qubit=0**
**bloch = > `qc1`.draw kind="bloch" path="quantum-draw-bloch.svg"**
**bk = [kind](bloch)**
1. `bk` == bloch
> print text=bloch-ok
2. *
> print text=bloch-fail