Skip to content

Commit

Permalink
Don't use Qid class object when hashing
Browse files Browse the repository at this point in the history
Fixes #3777
  • Loading branch information
maffoo committed Feb 12, 2021
1 parent 2e5c45b commit 3d953f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cirq/ops/raw_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _cmp_tuple(self):
return (type(self).__name__, repr(type(self)), self._comparison_key(), self.dimension)

def __hash__(self):
return hash((Qid, self._comparison_key()))
return hash((type(self).__name__, self._comparison_key()))

def __eq__(self, other):
if not isinstance(other, Qid):
Expand Down

0 comments on commit 3d953f3

Please sign in to comment.