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

Disable some user warnings in tests #2034

Open
yaelbh opened this issue Nov 10, 2024 · 0 comments
Open

Disable some user warnings in tests #2034

yaelbh opened this issue Nov 10, 2024 · 0 comments

Comments

@yaelbh
Copy link
Collaborator

yaelbh commented Nov 10, 2024

test/unit/test_sampler.py::TestSamplerV2::test_run_program_inputs_3
  /mnt/wsl/runtime/pvalrzz/qiskit_ibm_runtime/utils/validations.py:40: UserWarning: The 1-th circuit has no output classical registers so the result will be empty. Did you mean to add measurement instructions?
    warnings.warn(

test/unit/test_sampler.py::TestSamplerV2::test_rzz_angle_validation_2_1
  /root/miniforge3/envs/env1/lib/python3.12/site-packages/qiskit/primitives/backend_sampler_v2.py:139: UserWarning: The 0-th pub's circuit has no output classical registers and so the result will be empty. Did you mean to add measurement instructions?
    warnings.warn(

As far as I see, we are fine with these circuits not performing any measurements. So, either we suppress these warnings, or we add measure instructions just to make the warning silent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant