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

Add a method to compute gate counts per qubit #12972

Open
mtreinish opened this issue Aug 16, 2024 · 2 comments · May be fixed by #13055
Open

Add a method to compute gate counts per qubit #12972

mtreinish opened this issue Aug 16, 2024 · 2 comments · May be fixed by #13055
Assignees
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

Comments

@mtreinish
Copy link
Member

What should we add?

We have a method QuantumCircuit.count_ops method but in some scenarios you want to know the count of gates on each qubit. You can fairly easily build this view of the circuit by iterating over QuantumCirucit.data but because the data is stored in rust it would be much more efficient to build this view of the circuit in Rust and return it to Python. We should add this method to the python QuantumCircuit class but instead call an inner method defined on the rust CircuitData struct.

@mtreinish mtreinish added good first issue Good for newcomers type: feature request New feature or request Rust This PR or issue is related to Rust code in the repository labels Aug 16, 2024
@tonmoy-b
Copy link

tonmoy-b commented Aug 19, 2024

Hi @mtreinish, I would like to take a crack at this. Please assign this to me.

@mtreinish
Copy link
Member Author

Thanks, I've assigned the issue to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: Assigned
2 participants