feature: count circuit operation on circuit or given qubits#1278
feature: count circuit operation on circuit or given qubits#1278skushagra wants to merge 2 commits into
Conversation
|
I did not understand much around what can we do for calculating density of operations. I would need more clarification on how should we exactly define this density, and since there can be multiple ways with respect to which density can be calculated like, operations per layer, per qubit etc. Hence I extracted this into a seprate helper file to prevent bloating the Circuit class. Perhaps more clarification on this would help me to add such a features. |
|
@skushagra could you also make sure to resolve all comments for the next updated CR |
|
@skushagra are you still working on this? |
|
Yes I am, will resolve these comments in a bit |
|
@aniksd-braket fixed the pending comments, please have a look and let me know if anything else is needed |
aniksd-braket
left a comment
There was a problem hiding this comment.
This looks good, getting closer to the final product. I am assuming you used AI for creating tests? some of them seem repetitive/unnecessary. can you trim it down and/or consolidate them?
*Issue #1235
Description of changes:
I have added a
count_instructionfunctions that gives you count of an instrcution on a circuit. I have added test cases for the required flow.Features
GATE,GATE_NOISE,MEASUREetc.).QubitMatch.ANY— instruction on any specified qubit.QubitMatch.ALL— instruction on all specified qubits.Merge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.