Use in-browser formatting of circuits
It would take the following steps:
- Save the circuit as an ascii file with gates following a single line (so no logical line breaks).
- Create one
<pre>
element in html per text line of the circuit file (that's about 4 lines per qubit), let's call thisN
. - Set the line spacing for these
<pre>
elements equal to the width of N lines, so that when they wrap, they interweave. If we don't hard-codeN
, this would need to be done via JS. - Optionally insert zero-width spaces (u200b) between the gates, and set the formatting to word wrap