`import json:lib/json.mq.md` binds file libraries; `import fmt:time.format` binds member short names (replaces `> use`). Legacy `> path.mq.md` / `> use` now hard-error with a hint. Migrates repo docs, skills, ext, lib, public, examples, man-test and tests; adds a negative gold and updates view/catalog rendering. Co-authored-by: Cursor <cursoragent@cursor.com>
603 B
603 B
title: quantum gate matches_matrix smoke description: Named H matches an explicit 2x2 nested list. import quantum:ext/quantum/quantum.mq.md import json:lib/json.mq.md
main
*H_matrix = > json.parse text=0.7071067811865475,0.7071067811865475],[0.7071067811865475,-0.7071067811865475 *
*H = > quantum.gate name=H *
*ok = > H.matches_matrix matrix=H_matrix *
ok
print text=match-ok
print text=match-fail
*bad = > json.parse text=1,0],[0,1 *
*no = > H.matches_matrix matrix=bad *
- not
no
print text=reject-ok
print text=reject-fail