Skip to content

Commit

Permalink
Randomized errors are failing because Aer uses deprecated functionali…
Browse files Browse the repository at this point in the history
…ty (Qiskit#12722)
  • Loading branch information
1ucian0 authored Jul 11, 2024
1 parent 61805c8 commit 4c9ca6e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/randomized/test_transpiler_equivalence.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"""

import os
import warnings

from test.utils.base import dicts_almost_equal

from math import pi
Expand Down Expand Up @@ -292,7 +294,16 @@ def equivalent_transpile(self, kwargs):

# Note that there's no transpilation here, which is why the gates are limited to only ones
# that Aer supports natively.
aer_counts = self.backend.run(self.qc, shots=shots).result().get_counts()
with warnings.catch_warnings():
# Safe to remove once https://github.com/Qiskit/qiskit-aer/pull/2179 is in a release version
# of Aer.
warnings.filterwarnings(
"default",
category=DeprecationWarning,
module="qiskit_aer",
message="Treating CircuitInstruction as an iterable",
)
aer_counts = self.backend.run(self.qc, shots=shots).result().get_counts()

try:
xpiled_qc = transpile(self.qc, **kwargs)
Expand Down

0 comments on commit 4c9ca6e

Please sign in to comment.