Skip to content

Commit

Permalink
chore: Update hugr dep
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Oct 5, 2023
1 parent c18c5b7 commit bff1d9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fxhash = "0.2.1"
rmp-serde = { version = "1.1.2", optional = true }
delegate = "0.10.0"
csv = { version = "1.2.2" }
chrono = { version ="0.4.30" }
chrono = { version = "0.4.30" }
bytemuck = "1.14.0"
stringreader = "0.1.1"
crossbeam-channel = "0.5.8"
Expand Down Expand Up @@ -73,7 +73,7 @@ members = ["pyrs", "compile-rewriter", "taso-optimiser"]

[workspace.dependencies]

quantinuum-hugr = { git = "https://github.com/CQCL-DEV/hugr", rev = "0ce711b" }
quantinuum-hugr = { git = "https://github.com/CQCL-DEV/hugr", rev = "e119a99" }
portgraph = { version = "0.9", features = ["serde"] }
pyo3 = { version = "0.19" }
itertools = { version = "0.11.0" }
Expand Down
9 changes: 6 additions & 3 deletions src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ fn update_signature<C: HugrMut + Circuit + ?Sized>(
};
let new_inp_op = Input::new(inp_types.clone());
let inp_exts = circ.get_nodetype(inp).input_extensions().cloned();
circ.replace_op(inp, NodeType::new(new_inp_op, inp_exts));
circ.replace_op(inp, NodeType::new(new_inp_op, inp_exts))
.unwrap();

// Update output node if necessary.
let out_types = out_index.map(|out_index| {
Expand All @@ -277,7 +278,8 @@ fn update_signature<C: HugrMut + Circuit + ?Sized>(
};
let new_out_op = Output::new(out_types.clone());
let inp_exts = circ.get_nodetype(out).input_extensions().cloned();
circ.replace_op(out, NodeType::new(new_out_op, inp_exts));
circ.replace_op(out, NodeType::new(new_out_op, inp_exts))
.unwrap();
out_types
});

Expand All @@ -291,7 +293,8 @@ fn update_signature<C: HugrMut + Circuit + ?Sized>(
}
let new_dfg_op = DFG { signature };
let inp_exts = circ.get_nodetype(circ.root()).input_extensions().cloned();
circ.replace_op(circ.root(), NodeType::new(new_dfg_op, inp_exts));
circ.replace_op(circ.root(), NodeType::new(new_dfg_op, inp_exts))
.unwrap();
}

impl<T> Circuit for T where T: HugrView {}
Expand Down
2 changes: 1 addition & 1 deletion src/portmatching/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ impl From<InvalidSubgraph> for InvalidPatternMatch {
match value {
InvalidSubgraph::NotConvex => InvalidPatternMatch::NotConvex,
InvalidSubgraph::EmptySubgraph => InvalidPatternMatch::EmptyMatch,
InvalidSubgraph::NoSharedParent | InvalidSubgraph::InvalidBoundary => {
InvalidSubgraph::NoSharedParent | InvalidSubgraph::InvalidBoundary(_) => {
InvalidPatternMatch::InvalidSubcircuit
}
}
Expand Down

0 comments on commit bff1d9a

Please sign in to comment.