File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,8 @@ def reduce(self) -> OperatorBase:
223
223
# Check if Identity or empty instruction (need to check that type is exactly
224
224
# Instruction because some gates have lazy gate.definition population)
225
225
# pylint: disable=unidiomatic-typecheck
226
- if isinstance (gate , IGate ) or (type (gate ) == Instruction and gate .definition == []):
226
+ if isinstance (gate , IGate ) or (type (gate ) == Instruction and
227
+ gate .definition .data == []):
227
228
del self .primitive .data [i ] # type: ignore
228
229
return self
229
230
Original file line number Diff line number Diff line change @@ -349,7 +349,8 @@ def reduce(self) -> OperatorBase:
349
349
# Check if Identity or empty instruction (need to check that type is exactly
350
350
# Instruction because some gates have lazy gate.definition population)
351
351
# pylint: disable=unidiomatic-typecheck
352
- if isinstance (gate , IGate ) or (type (gate ) == Instruction and gate .definition == []):
352
+ if isinstance (gate , IGate ) or (type (gate ) == Instruction and
353
+ gate .definition .data == []):
353
354
del self .primitive .data [i ]
354
355
return self
355
356
You can’t perform that action at this time.
0 commit comments