Files
marqdo/tests/ext/quantum-gate-matrix-smoke.mq.md
cflmyandCursor 0e389f34ec Ship quantum skill=tools tree with call session and ZH package.
Split ext/quantum into index + modules, add marqdo call --effects/--session/--toget,
narrative-ratio checks, and a same-package 量子/ tree so agents can follow a
decision path for Bell demos without inventing a second API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-08 21:50:01 +08:00

29 lines
658 B
Markdown

---
markup: occlusion
title: quantum gate matches_matrix smoke
description: Named H matches an explicit 2x2 nested list.
import:
quantum: ext/quantum/circuit/index.mq.md
gate: ext/quantum/gate/index.mq.md
json: lib/json.mq.md
---
# main
**H_matrix = > json.parse text=[[0.7071067811865475,0.7071067811865475],[0.7071067811865475,-0.7071067811865475]]**
**H = > gate.gate name="H"**
**ok = > `H`.matches_matrix matrix=`H_matrix`**
1. `ok`
> print text=match-ok
2. *
> print text=match-fail
**bad = > json.parse text=[[1,0],[0,1]]**
**no = > `H`.matches_matrix matrix=`bad`**
1. not `no`
> print text=reject-ok
2. *
> print text=reject-fail