Skip to content

Commit

Permalink
Filter aer warnings in deprecated FakeBackend V1 class (#13018) (#1…
Browse files Browse the repository at this point in the history
…3020)

* Filter aer warnings in fake backend for the deprecated V1 path

* Filter warnings in QiskitTestCase instead of catching them

(cherry picked from commit 6b6efc7)

Co-authored-by: Elena Peña Tapia <[email protected]>
  • Loading branch information
mergify[bot] and ElePT authored Aug 23, 2024
1 parent 7b9ddd2 commit 1be2c5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/utils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ def setUpClass(cls):
module="qiskit_aer",
)

# Safe to remove once `FakeBackend` is removed (2.0)
warnings.filterwarnings(
"ignore", # If "default", it floods the CI output
category=DeprecationWarning,
message=r".*from_backend using V1 based backend is deprecated as of Aer 0.15*",
module="qiskit.providers.fake_provider.fake_backend",
)

allow_DeprecationWarning_message = [
r"The property ``qiskit\.circuit\.bit\.Bit\.(register|index)`` is deprecated.*",
]
Expand Down

0 comments on commit 1be2c5a

Please sign in to comment.