Update n_gates_of_type to count conditionals as well
Opened this issue · 0 comments
cqc-melf commented
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.