Skip to content

[BUG] pyqasm.draw() gate ordering and "moments" across registers #248

@ryanhill1

Description

@ryanhill1
qasm = """
OPENQASM 2.0;
include "qelib1.inc";
gate iswap q0,q1 { s q0; s q1; h q0; cx q0,q1; cx q1,q0; h q1; }
qreg q[4];
creg c[4];
h q[0];
h q[1];
h q[2];
h q[3];
iswap q[2],q[3];
swap q[0],q[2];
swap q[1],q[3];
cx q[0],q[1];
cp(pi/4) q[2],q[3];
measure q -> c;
"""

import pyqasm

pyqasm.draw(qasm)
Image
  • RZ gate should come after swap gate. Currently one is drawn on top of the other.
  • Measurements should all be grouped together at end of circuit drawing

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions