-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remove use of deprecated objects in BasicSimulator
#13743
Conversation
… for c_if (deprecated) and providing parameter bounds to the "run" method.
Pull Request Test Coverage Report for Build 13132223627Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
One or more of the following people are relevant to this code:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall seems good, thanks @ElePT!
I've left some minor line comments which need addressing.
The only concern I have is the possibe impact of removing support for the legacy c_if
on projects which for some reason still use it. I guess we'll just have to rely on testing against main
before the 2.0 release to reveal that, if at all.
Co-authored-by: Eli Arbel <[email protected]>
… Add unit tests. Rename kwargs to unify use of options with aer simulator and update documentation to reflect actual usage.
chop_threshold=1e-15, | ||
allow_sample_measuring=True, | ||
seed_simulator=None, | ||
parameter_binds=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that these options weren't used anywhere so I removed the fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extend the reno with these removals? Should they be deprecated in 1.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not part of the documented API, they were actually not even documented informally, so the deprecation isn't needed. I added the "surviving" options to the docstring of the run method to have them documented somewhere. I could add that to the reno, but I don't think it's required.
0bc13b7
to
29be2cf
Compare
This PR is blocking #13748. It would be great to merge it this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ElePT for the fixes and adding the tests. Just a few tiny doc touches and a clean and this should be ready to go.
Co-authored-by: Eli Arbel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers!
Summary
This PR refactors
BasicSimulator
not to rely on deprecated objects such as:_assemble
qobj
BackendConfiguration
Only the last removal is considered user facing.
Details and comments
Note that because of the removal of
c_if
(documented in #13506), there is currently no support for control flow operations inBasicSimulator
. The "new" control flow operations were never supported inBasicSimulator
, and this PR removes the outdatedc_if
support. The potential implementation of proper control flow is left as a future improvement as users can always resort toAerSimulator
for this.Similarly, as a side effect of the detanglement of
assemble
, theBasicSimulator
class no longer supports providing parameter bounds to itsrun
method. This functionality was not explicitly documented and is likely not expected by users, as it has not been part of the "standard" backend.run workflow for a while. However, a few legacy tests made use of it together withassemble
. The tests are removed as part of the PR.TODO: