We need an easy way to draw quantum circuits as these are fundamental to programming a quantum computer. Ideally, there was some library (like mathjax for LaTeX-like math) that translates a text representation into a decent quantum circuit.

Also, it would be convenient if some LaTeX-like commands (like \ket{0} to produce $\left| 0 \right>$) could be enabled.

A trivial example of a quantum circuit (a true random number generator), to illustrate the need:

|0> -----H----(measure)

  • 1
    $\begingroup$ Maybe we could request the devs to add a LaTeX package to draw quantum circuits, like this one or maybe Quirk (which is apparently easier to use) $\endgroup$ Mar 29, 2018 at 17:56
  • $\begingroup$ @Blue I think an inline specialized drawing tool would be better, similar to the one on User Experience, as more LaTeX packages make the pages render slower. Simple images don't. Alternatively, use another program to draw circuits (I think Inkscape, Ipe or Visio would be decent) $\endgroup$ Mar 29, 2018 at 18:54
  • 1
    $\begingroup$ As for the LaTeX commands and the one requested in particular, see quantumcomputing.meta.stackexchange.com/a/50 . $\endgroup$ Mar 29, 2018 at 18:56
  • $\begingroup$ @Blue - Quirk looks interesting but at the bottom of the page the author mentions alternatives, of which LIQ𝑈𝑖⏐〉 looks to be most useful and best supported: stationq.github.io/Liquid - with that the examples/question/answer will actually be runnable on simulators or hardware. $\endgroup$
    – Rob
    Mar 31, 2018 at 13:43
  • 1
    $\begingroup$ There's also the suggestion to use Qcircuit, offered over in Nat's MathJax Q&A: quantumcomputing.meta.stackexchange.com/a/152/278 $\endgroup$
    – Rob
    Apr 1, 2018 at 14:24


You must log in to answer this question.