-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Code Quality Fixes in StatePreparationChannel #4503
Code Quality Fixes in StatePreparationChannel #4503
Conversation
Fixed many of the nits mentioned in quantumlib#4482, value-equality not a part of this commit.
@tanujkhattar I don't know how to use ValueEquality, because then I am forced to specify an exact comparison value, which does not exist. It makes the test |
State Preparation Channel got equality comparison similar to that of Matrix Gate.
Without getting |
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.
You are right, we shouldn't use value_equality
here.
Left a few more comments for bugfixes around handling the name
parameter of the class. We can merge once these are fixed.
name parameter added to constructor, JSON, and repr serialization as well as test data.
The name has been changed in the JSON and repr protocol tests to make the older version fail.
Had to run pylint.
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 % nit.
Please fix the nit and we can merge.
Two gates with different names are still equal, added tests for that.
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!
* Fixing Minor Errors Fixed many of the nits mentioned in quantumlib#4482, value-equality not a part of this commit. * Approx Equality support added State Preparation Channel got equality comparison similar to that of Matrix Gate. * Added name parameter to state preparation channel name parameter added to constructor, JSON, and repr serialization as well as test data. * Custom names in serialization tests The name has been changed in the JSON and repr protocol tests to make the older version fail. * Format and Lint Fix Had to run pylint. * Adding tests to ignore name Two gates with different names are still equal, added tests for that.
* Fixing Minor Errors Fixed many of the nits mentioned in quantumlib#4482, value-equality not a part of this commit. * Approx Equality support added State Preparation Channel got equality comparison similar to that of Matrix Gate. * Added name parameter to state preparation channel name parameter added to constructor, JSON, and repr serialization as well as test data. * Custom names in serialization tests The name has been changed in the JSON and repr protocol tests to make the older version fail. * Format and Lint Fix Had to run pylint. * Adding tests to ignore name Two gates with different names are still equal, added tests for that.
Addressing the comments made in #4482
This pull request fixes some of the code quality issues that were created in the previous pull request.