Skip to content

Commit f101e15

Browse files
committed
explicit hash for spec (#73)
1 parent 8ae860a commit f101e15

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bloqade/shuttle/arch.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ class ArchSpec:
112112
float_constants: dict[str, float] = field(default_factory=dict)
113113
int_constants: dict[str, int] = field(default_factory=dict)
114114

115+
def __hash__(self):
116+
return hash(
117+
(
118+
self.layout,
119+
frozenset(self.float_constants.items()),
120+
frozenset(self.int_constants.items()),
121+
)
122+
)
123+
115124

116125
@dataclass
117126
class ArchSpecMixin:

0 commit comments

Comments
 (0)