qrab 0.1.5

A readable quantum-circuit compiler for TikZ, Typst, SVG, and Quirk
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
circuit backend_hooks {
  backend latex {
    preamble: "\\newcommand{\\backendtag}{backend hook}"
    before: "\\node[anchor=south west] at (0,0.35) {\\backendtag};"
    after: "% latex backend hook end"
  }

  backend typst {
    preamble: "#let backend-tag = [backend hook]"
    before: "#align(center)[#backend-tag]"
    after: "#align(center)[end hook]"
  }

  qubit q: "|0>" -> "|1>"
  h q
}