-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Removing _name attribute from Parameter #12191
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
Removing _name attribute from Parameter #12191
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:
|
Pull Request Test Coverage Report for Build 9080731012Details
💛 - Coveralls |
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:
|
qiskit/circuit/parameter.py
Outdated
@@ -165,10 +164,10 @@ def __hash__(self): | |||
# operation attempts to put this parameter into a hashmap. | |||
|
|||
def __getstate__(self): | |||
return (self._name, self._uuid, self._symbol_expr) | |||
return (self._uuid, self._symbol_expr) |
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.
This change might affect code using picking. Would it be possible to keep the tuple shape the same?
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.
Yes, 1 moment- will fix, run the tests, and hopefully update with no problems
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.
should be good for another look
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 a lot for taking care of this! Let's merge it!
@1ucian0 sorry this one fell off my radar. not sure where it failed, but it is updated and might be good for another go |
* removing _name attribute from Parameter * lint fix for parameter update * fix the __getstate__ structure
Summary
Attempt to resolve #10880 Remove _name attribute of Parameter
Details and comments
Removed _name attribute from Parameter and made sure the currently implemented tests passed for the new implementation.