Skip to content

Commit 4430396

Browse files
authored
Merge branch 'feature/visualize-nodes' into feature/connect-nodes
2 parents 44643f7 + 490949b commit 4430396

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

frontend/catalyst/python_interface/visualization/construct_circuit_dag.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _visit_block(self, block: Block) -> None:
103103
# ===================
104104

105105
@_visit_operation.register
106-
def _unitary(
106+
def _gate_op(
107107
self,
108108
op: quantum.CustomOp | quantum.GlobalPhaseOp | quantum.QubitUnitaryOp | quantum.MultiRZOp,
109109
) -> None:
@@ -464,10 +464,5 @@ def _operator(op: Operator) -> str:
464464
wires_str = "all"
465465
else:
466466
wires_str = f"[{', '.join(map(str, wires))}]"
467+
# Using <...> lets us use ports (https://graphviz.org/doc/info/shapes.html#record)
467468
return f"<name> {op.name}|<wire> {wires_str}"
468-
469-
470-
@get_label.register
471-
def _mp(mp: MeasurementProcess) -> str:
472-
"""Returns the appropriate label for an xDSL operation."""
473-
return str(mp)

0 commit comments

Comments
 (0)