-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Hugrs can encode native hseries-specific operations for some expressions (e.g. ZZMax
gates).
When trying to encode the hugr as a pytket circuit, we need to define operation equivalences between hugr extension ops and tket-json-rs ops.
This is done here for Tk2Op
s:
tket2/tket2/src/serialize/pytket/op/native.rs
Lines 52 to 55 in 86972f8
pub fn try_from_tk2op(tk2op: Tk2Op) -> Option<Self> { | |
let serial_op = match tk2op { | |
Tk2Op::H => Tk1OpType::H, | |
Tk2Op::CX => Tk1OpType::CX, |
However, we now also need to define the same equivalences for the operations in HSeriesOp
but those are defined in a dependent crate.
It might be possible to do some dynamic dispatch magic here, or we may end up having to split the tket2
package so that the pytket converter can depend on hseries too...
Metadata
Metadata
Assignees
Labels
No labels