-
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
Use hash of numeric value for bound parameter expressions #12488
Conversation
If a `ParameterExpression` has no unbound parameters, the underlying bound value can be hashed instead of the tuple that accounts for the symbolic expression. Doing this allows for the `ParameterExpression` to match the hash for the numeric value it compares equal to. Closes Qiskit#12487
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9406862530Warning: 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 |
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 for finding this, Will. This looks right to me.
Oh, actually, can we have a bugfix release note? |
@Mergifyio backport stable/0.46 |
✅ Backports have been created
|
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 Will.
* Use hash of numeric value for bound parameter expressions If a `ParameterExpression` has no unbound parameters, the underlying bound value can be hashed instead of the tuple that accounts for the symbolic expression. Doing this allows for the `ParameterExpression` to match the hash for the numeric value it compares equal to. Closes #12487 * Add release note (cherry picked from commit bc685d3)
* Use hash of numeric value for bound parameter expressions If a `ParameterExpression` has no unbound parameters, the underlying bound value can be hashed instead of the tuple that accounts for the symbolic expression. Doing this allows for the `ParameterExpression` to match the hash for the numeric value it compares equal to. Closes #12487 * Add release note (cherry picked from commit bc685d3)
…12548) * Use hash of numeric value for bound parameter expressions If a `ParameterExpression` has no unbound parameters, the underlying bound value can be hashed instead of the tuple that accounts for the symbolic expression. Doing this allows for the `ParameterExpression` to match the hash for the numeric value it compares equal to. Closes #12487 * Add release note (cherry picked from commit bc685d3) Co-authored-by: Will Shanks <[email protected]>
* Use hash of numeric value for bound parameter expressions If a `ParameterExpression` has no unbound parameters, the underlying bound value can be hashed instead of the tuple that accounts for the symbolic expression. Doing this allows for the `ParameterExpression` to match the hash for the numeric value it compares equal to. Closes Qiskit#12487 * Add release note
Summary
If a
ParameterExpression
has no unbound parameters, the underlying bound value can be hashed instead of the tuple that accounts for the symbolic expression. Doing this allows for theParameterExpression
to match the hash for the numeric value it compares equal to.Details and comments
Closes #12487