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-Peep
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'));
Apache-2.0 (same as QISKit-Terra)