Check if cregbundle is None to avoid warning statement#15956
Check if cregbundle is None to avoid warning statement#15956amruthpremjith wants to merge 3 commits intoQiskit:mainfrom
Conversation
|
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code:
|
jakelishman
left a comment
There was a problem hiding this comment.
Can you add a bugfix release note, and a test that this works? For testing: you can add a small case in test/python/visualization/test_circuit_text_drawer.py that triggers the spurious warning without your change. For the test, you can use the warnings.catch_warnings context manager, and assert that there aren't any warnings emitted by that code block (for example) - the test should fail without your code change and pass with it.
|
I used the same circuit as in the original issue but used a "text" output instead cause the "mpl" one needs matplotlib and latex dependencies to run the test cases. Test run without changes Test with changes |
Summary
fixes #15949
Details and comments
Added check to see if cregbundle is set to None to avoid warning output
Tested by running the same code as the issue and didn't see the warning with the change.