-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Commands iterator ignoring the hierarchy. (#381)
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.
- Loading branch information
Showing
2 changed files
with
86 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters