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
circuit math_labels {
  qubit q[2]: "input $\\lvert\\psi\\rangle$" -> "output $q_1$"

  mark start
  gate "$U_f$" on q[0]
  phase "$k + 1$" on q[1] if q[0]
  label "step $i + 1$" on q[0..2]
  note below "angle $\\theta / 2$" on q[1]
  measure q[0] as "$m_0$"
  mark end

  group "round $r$" from start to end
}