Skip to content

Commit

Permalink
Merge branch 'main' into jm/noise_expect
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmoutinho committed Aug 29, 2024
2 parents 02c69b0 + 0e9bbf4 commit ae9e4bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyqtorch/composite/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ def __len__(self) -> int:
return len(self.operations)

def __hash__(self) -> int:
return hash(reduce(add, (hash(op) for op in self.operations)))
return hash(
reduce(add, (hash(op) for op in self.operations))
if len(self.operations) > 0
else self.operations
)

def forward(
self,
Expand Down

0 comments on commit ae9e4bc

Please sign in to comment.