-
Notifications
You must be signed in to change notification settings - Fork 63
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
Rename get_noisy_dynamics to get_noisy_pulses #76
Conversation
In the noise module, users are allowed to define custom noise for their own physical model. The `Noise` class uses a hook method `get_noisy_dynamics` to realize this. This method will be called when including noise in the physical model. However, the name `get_noisy_dynamics` was wrong because the noise object returns a list of `Pulse`, instead of `QobjEvo`. This PR fixed this issue and use the term `get_noisy_pulses`. The old API is still usable but will issue a `PendingDeprecationWarning`.
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.
Woot. That should have been a comment / request changes.
The duplication of the docstrings is not great, but definitely better to have the documentation appear in the apidocs than not. |
Co-authored-by: Simon Cross <hodgestar+github@gmail.com>
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.
Left a few small docstring suggestions, but looks good to me. Happy for this to be merged whenever you think it is ready @BoxiLi.
Co-authored-by: Simon Cross <hodgestar+github@gmail.com>
Thanks for correcting the typos! |
Co-authored-by: Simon Cross <hodgestar+github@gmail.com>
* rename get_noisy_dynamics to get_noisy_pulses In the noise module, users are allowed to define custom noise for their own physical model. The `Noise` class uses a hook method `get_noisy_dynamics` to realize this. This method will be called when including noise in the physical model. However, the name `get_noisy_dynamics` was wrong because the noise object returns a list of `Pulse`, instead of `QobjEvo`. This PR fixed this issue and use the term `get_noisy_pulses`. The old API is still usable but will issue a `PendingDeprecationWarning`. Co-authored-by: Simon Cross <hodgestar+github@gmail.com>
Description
In the noise module, users are allowed to define custom noise for their own physical model. The
Noise
class uses a hook methodget_noisy_dynamics
to realize this. This method will be called when including noise in the physical model.It was pointed out by @quantshah that the name
get_noisy_dynamics
was wrong because the noise object returns a list ofPulse
, instead ofQobjEvo
. This PR fixed this issue and use the termget_noisy_pulses
. The old API is still usable but will issue aPendingDeprecationWarning
.I also copied the docstring of
get_noisy_pulses
to those in the subclass for easier reference. I originally thought that if the docstrings are missing, they will be inherited automatically, but this is not the case.I also pinned @hodgestar because I briefly mentioned this and asked for your advice in one of our discussions.