Closed albi3ro closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.67%. Comparing base (
9b3060f
) to head (4d01d52
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Context:
Sum.hash
usesfrozenset
to calculate the hash in an order independent way. The problem is thatfrozenset
ignores the fact that some operations may occur multiple times in the sum. This leads to an incorrect hash.The bad hash then propagated to incorrect
eigvals
anddiagonalizing_gates
Description of the Change:
Uses
collections.Counter
to count how many times the operations occur.Benefits:
Correct answers.
Possible Drawbacks:
speed.
Related GitHub Issues:
Fixes #5849 [sc-65903]