Skip to content

Commit

Permalink
adapting test/randomized/test_transpiler_equivalence.py to #12640 (#1…
Browse files Browse the repository at this point in the history
…2663)

* addapting to #12640

* more instances
  • Loading branch information
1ucian0 authored Jun 26, 2024
1 parent 4d3821b commit 26680dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/randomized/test_transpiler_equivalence.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ def add_c_if_last_gate(self, carg, data):
last_gate = self.qc.data[-1]

# Conditional instructions are not supported
assume(isinstance(last_gate[0], Gate))
assume(isinstance(last_gate.operation, Gate))

last_gate[0].c_if(creg, val)
last_gate.operation.c_if(creg, val)

# Properties to check

Expand All @@ -269,7 +269,7 @@ def qasm(self):
"""After each circuit operation, it should be possible to build QASM."""
qasm2.dumps(self.qc)

@precondition(lambda self: any(isinstance(d[0], Measure) for d in self.qc.data))
@precondition(lambda self: any(isinstance(d.operation, Measure) for d in self.qc.data))
@rule(kwargs=transpiler_conf())
def equivalent_transpile(self, kwargs):
"""Simulate, transpile and simulate the present circuit. Verify that the
Expand Down

0 comments on commit 26680dc

Please sign in to comment.