Skip to content

Port QuantumCircuit.count_ops() to rust #12971

@mtreinish

Description

@mtreinish

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's CircuitData 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.

Metadata

Metadata

Assignees

Labels

RustThis PR or issue is related to Rust code in the repositorygood first issueGood for newcomerstype: feature requestNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions