Port QuantumCircuit.count_ops()
to rust
#12971
Labels
good first issue
Good for newcomers
Rust
This PR or issue is related to Rust code in the repository
type: feature request
New feature or request
What should we add?
Right now the
QuantumCircuit.count_ops()
method is written in Python by iterating over the circuit data and collecting counts in a dictionary, sorting it by gate name and returning that dictionary. However, the underlying data is stored in rust'sCircuitData
struct and it would be much more efficient to do the counting and in rust. We should port this utility method to rust to provide and provide a significant speedup for the method.The text was updated successfully, but these errors were encountered: