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

Update n_gates_of_type to count conditionals as well #1477

Closed
cqc-melf opened this issue Jul 3, 2024 · 0 comments
Closed

Update n_gates_of_type to count conditionals as well #1477

cqc-melf opened this issue Jul 3, 2024 · 0 comments
Assignees
Labels
classical-logic issues related to classical logical expressions enhancement New feature or request

Comments

@cqc-melf
Copy link
Contributor

cqc-melf commented Jul 3, 2024

Update the gate count function to have an additional parameter which count conditional optype as well.

For example:

c1 = Circuit(3,1)
c1.CX(0,2)
c1.CX(0,1,condition_bits=[0], condition_value=1)
c1.n_gates_of_type(OpType.CX, count_conditionals=True)

Should give 2 for the result of the last call.

@cqc-melf cqc-melf added the enhancement New feature or request label Jul 3, 2024
@CalMacCQ CalMacCQ added the classical-logic issues related to classical logical expressions label Sep 16, 2024
@cqc-melf cqc-melf self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
classical-logic issues related to classical logical expressions enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants