Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Aer not found warning in tests #13911

Open
mtreinish opened this issue Feb 22, 2025 · 0 comments · May be fixed by #13912
Open

Filter Aer not found warning in tests #13911

mtreinish opened this issue Feb 22, 2025 · 0 comments · May be fixed by #13912
Labels
good first issue Good for newcomers type: feature request New feature or request type: qa Issues and PRs that relate to testing and code quality

Comments

@mtreinish
Copy link
Member

What should we add?

The GenericBackend.run() method emits a RuntimeWarning when it's called and qiskit-aer isn't installed. This is to inform users that the simulation will not include noise. This is useful for users, because it's not otherwise obvious that the simulation is ideal if the fallback backend of BasicSimulator is being used. However, when running unit tests we often don't install aer in some environments to save time or to explicitly test the BasicSimulator path. This ends up spamming the test logs with the warning message:

qiskit/providers/fake_provider/generic_backend_v2.py:348: RuntimeWarning: Aer not found using BasicSimulator and no noise

which provides no value. Normally the warning would only be shown once, but our test config changes the default filters so we see it on every call to run. We should adjust the base testing harness's filters so that we filter this warning from being displayed during the run.

@mtreinish mtreinish added good first issue Good for newcomers type: feature request New feature or request labels Feb 22, 2025
@github-project-automation github-project-automation bot moved this to Tagged but unassigned in Contributor Monitoring Feb 22, 2025
@mtreinish mtreinish added the type: qa Issues and PRs that relate to testing and code quality label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type: feature request New feature or request type: qa Issues and PRs that relate to testing and code quality
Projects
Status: Tagged but unassigned
Development

Successfully merging a pull request may close this issue.

1 participant