Skip to content

Commit

Permalink
Merge branch 'main' into revert-hash-bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
lmondada authored Sep 28, 2023
2 parents 7c2d511 + 7c25d83 commit eaef63a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/circuit/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,14 @@ impl HashState {
fn hashable_op(op: &OpType) -> impl Hash {
match op {
OpType::LeafOp(LeafOp::CustomOp(op)) if !op.args().is_empty() => {
panic!("Parametric operation {} cannot be hashed.", op.name())
// TODO: Require hashing for TypeParams?
format!(
"{}[{}]",
op.name(),
serde_json::to_string(op.args()).unwrap()
)
}
_ => op.name(),
_ => op.name().to_string(),
}
}

Expand Down

0 comments on commit eaef63a

Please sign in to comment.