Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ignore consts/loadConsts in the command iterator? #108

Closed
aborgna-q opened this issue Sep 14, 2023 · 0 comments · Fixed by #384
Closed

fix: Ignore consts/loadConsts in the command iterator? #108

aborgna-q opened this issue Sep 14, 2023 · 0 comments · Fixed by #384
Assignees
Labels
bug Something isn't working

Comments

@aborgna-q
Copy link
Collaborator

aborgna-q commented Sep 14, 2023

Do we want to optionally include them? Perhaps add a parameter?

This would avoid problems like #105.

@aborgna-q aborgna-q added the bug Something isn't working label Sep 14, 2023
@aborgna-q aborgna-q self-assigned this Mar 4, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 6, 2024
Closes #105. Closes #108.

`num_gates` used to count every node in the top-level region, giving
unexpected results on results with constants, control flow, or anything
other than simple gates.

`num_operations` now only counts `CustomOp`s, traversing containers as
needed.

I also improved the circuit unit tests, to include circuits in modules
and circuits in `FuncDefn`s (instead of `DFG`s).

Some notes:
- Part of the tests testing parametric operations is commented out until
we solve CQCL/hugr#1166.
- Although the test circuits have function names, `Circuit::name`
returns `None`. I'll address that in another PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant