-
Notifications
You must be signed in to change notification settings - Fork 706
Deprecate num_steps in qml.evolve
#7954
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
Conversation
|
Hello. You may have forgotten to update the changelog!
|
num_steps in qml.evolve and enforce analytic-only behaviour
num_steps in qml.evolve and enforce analytic-only behaviournum_steps in qml.evolve
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7954 +/- ##
==========================================
- Coverage 99.68% 99.68% -0.01%
==========================================
Files 542 542
Lines 55622 55628 +6
==========================================
+ Hits 55449 55454 +5
- Misses 173 174 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…o Deprecating_num_steps_evolution
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.
Just wondering abut having more examples.
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.
Would like to hear how people think about remove time @isaacdevlugt @Alex-Preciado
I would say let's just remove it 0.44, unless more concern regarding plugins etc coming up here
…o Deprecating_num_steps_evolution
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.
LGTM
Co-authored-by: Isaac De Vlugt <[email protected]>
The `num_steps` argument of `qml.evolve` and `qml.ops.Evolution` has been deprecated ([here](#7954)). But, the deprecation warning was added to both functions, even though one unconditionally calls the other. So, this PR removes the deprecation warning from `qml.evolve` as the message was identical, and the deprecation warning from `Evolution` would be raised regardless. [sc-94755] [sc-96567] --------- Co-authored-by: Isaac De Vlugt <[email protected]>
Context: Currently,
qml.evolveaccepts anum_stepskeyword argument, which is intended to control the Trotter decomposition of time evolution. However, on devices like default.qubit that support analytic evolution, this argument is silently ignored. This leads to ambiguous behaviour: users may assume that specifyingnum_stepsexplicitly forces Trotterization, but this is not the case.To resolve this ambiguity, we are remove support for the
num_stepsargument inqml.evolveandEvolution(makingqml.evolveanalytic-only).Note: this deprecation doesn't have a release scheduled for removal yet. Therefore, I just mention that this argument will be removed in a future version
Description of the Change: As above.
[sc-94755]