You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite relevant after #370. The commands iterator does not currently filter nodes from other regions, so in this example it tries to output the FuncDefn node:
graph LR
subgraph 0 ["(0) Module"]
direction LR
subgraph 1 ["(1) FuncDefn"]
direction LR
2["(2) Input"]
2--"0:0<br>qubit"-->4
2--"1:1<br>qubit"-->5
3["(3) Output"]
4["(4) quantum.tket2.H"]
4--"0:0<br>qubit"-->5
5["(5) quantum.tket2.CX"]
5--"0:0<br>qubit"-->3
5--"1:0<br>qubit"-->6
6["(6) quantum.tket2.T"]
6--"0:1<br>qubit"-->3
end
end
The commands iterator did a toposort on the whole Hugr, ignoring the
hierarchy.
This generated problems with #370, since circuits may now be nested
somewhere in the hugr.
It would also have caused problems with circuit boxes, but we don't
support that yet here.
We use a `SiblingGraph` now, to ensure that we only explore the
top-level region of the circuit.
Subcircuits will be returned as a single command.
Adds a `build_module_with_circuit` helper to build circuits inside
modules.
Closes#42.
Make sure that nested HUGRs are supported by the Circuit interface.
Update the command iterator once everything is checked.
https://github.com/CQCL-DEV/tket2/pull/37#discussion_r1269154445
The text was updated successfully, but these errors were encountered: