`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>
753 B
753 B
title: quantum bell smoke description: H+CX Bell state probabilities ≈ 1/2 each. import quantum:ext/quantum/quantum.mq.md import math:lib/math.mq.md
main
*qc = > quantum.circuit qubits=2 *
*qc = > qc.h qubit=0 *
*qc = > qc.cx control=0 target=1 *
*p = > qc.probabilities *
*p00 = p[^00] *
*p11 = p[^11] *
*lo = > math.div a=2 b=5 *
*hi = > math.div a=3 b=5 *
p00>lop00<hi> print text=p00-ok-
> print text=p00-fail
print text=p00-fail
p11>lop11<hi> print text=p11-ok-
> print text=p11-fail
print text=p11-fail
*ping = > quantum_ping *
*ok = ping[^ok] *
ok
print text=ping-ok
print text=ping-fail