Files
marqdo/tests/ext/quantum-author-api-zh-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

38 lines
801 B
Markdown

---
title: quantum author API zh smoke
description: 屏障 / 测量 / 追加 / 态 / 绘图.
导入 量子:ext/quantum/量子.mq.md
---
# main
**qc = > 量子.电路 比特数=2**
**qc = > `qc`.哈达玛 比特=0**
**qc = > `qc`.屏障**
**qc = > `qc`.控非 控制=0 目标=1**
**qc = > `qc`.测量**
**st = > `qc`.态**
**dim = [dim](st)**
1. `dim` == 4
> print text=state-ok
2. *
> print text=state-fail
**img = > `qc`.绘图 路径="quantum-author-zh-draw.svg"**
**kind = [kind](img)**
1. `kind` == circuit
> print text=draw-ok
2. *
> print text=draw-fail
**other = > 量子.电路 比特数=2**
**other = > `other`.泡利X 比特=1**
**qc2 = > `qc`.追加 操作=`other`**
**ops = [ops](qc2)**
**n = > len `ops`**
1. `n` == 5
> print text=append-ok
2. *
> print text=append-fail