Skip to content

Commit

Permalink
fix: Don't convert tket2 measurements into tket1 ops (#331)
Browse files Browse the repository at this point in the history
Throws an error instead of converting the operation into one with
different signature.

Fixes #330
  • Loading branch information
aborgna-q authored May 2, 2024
1 parent 8995e82 commit 2f1d1a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tket2/src/json/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ impl TryFrom<&OpType> for JsonOp {
Tk2Op::Tdg => JsonOpType::Tdg,
Tk2Op::Sdg => JsonOpType::Sdg,
Tk2Op::ZZMax => JsonOpType::ZZMax,
Tk2Op::Measure => JsonOpType::Measure,
Tk2Op::Measure => {
unimplemented!(
"Cannot convert TKET2 Measure to TKET1 due to mismatching semantics."
)
}
Tk2Op::RzF64 => JsonOpType::Rz,
Tk2Op::RxF64 => JsonOpType::Rx,
// TODO: Use a TK2 opaque op once we update the tket-json-rs dependency.
Expand Down

0 comments on commit 2f1d1a1

Please sign in to comment.