qml.drawer.mark

mark(op, tag)[source]

Marks an operator instance with a custom tag.

Parameters:
  • op (Operator) – PennyLane operator instance.

  • tag (str) – The custom tag.

Example

>>> op = qml.RX(3.14, wires=0)
>>> print(op.label())
RX
>>> op_tagged = mark(op, tag="custom_rx")
>>> print(op_tagged.label())
RX
("custom_rx")