Skip to content

Commit

Permalink
fix mudits suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
andrijapau committed Feb 7, 2025
1 parent ebe1d28 commit d5e8632
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pennylane/transforms/unitary_to_rot.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def interpret_operation(self, op: Operator):
ops = one_qubit_decomposition(op.parameters[0], op.wires[0])
elif matrix_shape == (4, 4):
ops = two_qubit_decomposition(op.parameters[0], op.wires)
return [super().interpret_operation(o) for o in ops]
# List omprehensions are run in a separate scope.
# The automatic insertion of __class__ and self for zero-argument super does not work in such a nested scope.
# pylint: disable=super-with-arguments
return [super(UnitaryToRotInterpreter, self).interpret_operation(o) for o in ops]

return super().interpret_operation(op)

Expand Down

0 comments on commit d5e8632

Please sign in to comment.