From b76a21a671b843c0c074720b9b4fdce73da645de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:07:16 +0100 Subject: [PATCH] chore: Update hugr dep (#246) `PrimValue` was flattened in https://github.com/CQCL/hugr/pull/685 --- Cargo.toml | 2 +- tket2/src/json/encoder.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5a0ea0d7..10fb8a04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/tket2/src/json/encoder.rs b/tket2/src/json/encoder.rs index f3ea1273..49aaade8 100644 --- a/tket2/src/json/encoder.rs +++ b/tket2/src/json/encoder.rs @@ -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}; @@ -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::() { f.to_string() } else {