Skip to content

Commit

Permalink
chore: Update hugr dep (#246)
Browse files Browse the repository at this point in the history
`PrimValue` was flattened in CQCL/hugr#685
  • Loading branch information
aborgna-q committed Nov 15, 2023
1 parent f2d4c7e commit b76a21a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ license-file = "LICENCE"
[workspace.dependencies]

tket2 = { path = "./tket2" }
quantinuum-hugr = { git = "https://github.com/CQCL/hugr", rev = "78faf6d" }
quantinuum-hugr = { git = "https://github.com/CQCL/hugr", rev = "c261bea" }
portgraph = { version = "0.10" }
pyo3 = { version = "0.20" }
itertools = { version = "0.11.0" }
Expand Down
6 changes: 2 additions & 4 deletions tket2/src/json/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::collections::HashMap;
use hugr::extension::prelude::QB_T;
use hugr::ops::OpType;
use hugr::std_extensions::arithmetic::float_types::ConstF64;
use hugr::values::{PrimValue, Value};
use hugr::values::Value;
use hugr::Wire;
use itertools::{Either, Itertools};
use tket_json_rs::circuit_json::{self, Permutation, Register, SerialCircuit};
Expand Down Expand Up @@ -190,9 +190,7 @@ impl JsonEncoder {
OpType::Const(const_op) => {
// New constant, register it if it can be interpreted as a parameter.
match const_op.value() {
Value::Prim {
val: PrimValue::Extension { c: (val,) },
} => {
Value::Extension { c: (val,) } => {
if let Some(f) = val.downcast_ref::<ConstF64>() {
f.to_string()
} else {
Expand Down

0 comments on commit b76a21a

Please sign in to comment.