quantum-circuit-viz
v1.0.1
Published
Quantum circuit drawings in text and canvas
Downloads
2
Readme
Quantum Circuit Viz (JS)
JS port of DrawElement quantum-circuit-drawer in QISKit-Terra
let element = elements.MeasureFrom().toString(),
expected = ["┌─┐",
"┤M├",
"└╥┘"];
assert.deepEqual(expected, element);
Made compatible with Quantum-Quail
let program = new Program();
program.add(Gates.X(0));
let output = textViz(program);
assert.equal(output,[' ┌───┐',
'q_0: |0>┤ X ├',
' └───┘',
' c_0: 0 ═════',
' '].join('\n'));
License
Apache-2.0 (same as QISKit-Terra)