-
Notifications
You must be signed in to change notification settings - Fork 6
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
Circuit::num_gates
not consistent with TKET n_gates
#105
Comments
At least |
I would also be fine with the current behaviour, but then we should
|
We should define what is a gate somewhere (clearly it's not the same as an |
I would suggest avoiding "gate" as an additional concept, and instead something like |
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
The following surprised me. Consider a circuit made of a single rotation:
Obviously, in TK1 we have
However, in TK2, we get
After reducing it to this example, it became clear to me that the overhead are the constant nodes introduced, but this is confusing.
The text was updated successfully, but these errors were encountered: