Fix Errors in Primitives#8760
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 the following people are requested to review this:
|
|
@woodsp-ibm I thought you reported this issue. Could you review this PR? |
|
It seems that there are some fidelity tests for mismatched left and right circuits that are testing the sampler usage by fidelity to presumably ensure its catching the expected error when it calls run. https://github.com/Qiskit/qiskit-terra/blob/4ac8b24af1cf6f99a418b5f118c29661f89a2b2c/test/python/algorithms/state_fidelities/test_compute_uncompute.py#L141 While the job.result() call is in a try catch block where it re-raises the exception, the call run, like the gradients is not, so this change affected the test. It seems more like its testing the sampler than the fidelity as such with this error checking though - bit since the fidelity has none itself on the run and relies on this I guess it checks the overall behavior is as expected. @ElePT FYI |
I see. Given that as Steve mentioned, these errors are actually handled by the
Whichever you prefer :) |
|
TBH, I don't have a strong opinion to this issue. We don't have any major rules about Qiskit errors... |
Pull Request Test Coverage Report for Build 3125421036
💛 - Coveralls |
|
Well, you already fixed the CI but decided to remove the test anyway to prevent future situations like this. It's a bit trivial, so if you could quickly review it, it could be merged with this fix :) |
Summary
This PR changes QiskitError to ValueError.
Details and comments