quantum-circuit-viz

1.0.1 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i quantum-circuit-viz

Weekly Downloads

0

Version

1.0.1

License

Apache-2.0

Unpacked Size

20.6 kB

Total Files

8

Last publish

Collaborators

  • ndoiron