Open doug-q opened 1 week ago
I am working with two ops:
when I have a lazy.Measure op then Tk2Op::try_from(op) succeeds erroneously.
lazy.Measure
Tk2Op::try_from(op)
This is because the impl MakeOpDef for Tk2Op has
impl MakeOpDef for Tk2Op
fn from_def(op_def: &OpDef) -> Result<Self, hugr::extension::simple_op::OpLoadError> { try_from_name(op_def.name()) }
This function should check that the extension of op_def is correct.
op_def
I am creating the issue here because I think the simple_op.rs machinery should take care of this, perhaps adding fn extension to NamedOp?
simple_op.rs
fn extension
NamedOp
I am working with two ops:
when I have a
lazy.Measure
op thenTk2Op::try_from(op)
succeeds erroneously.This is because the
impl MakeOpDef for Tk2Op
hasThis function should check that the extension of
op_def
is correct.I am creating the issue here because I think the
simple_op.rs
machinery should take care of this, perhaps addingfn extension
toNamedOp
?