-
Notifications
You must be signed in to change notification settings - Fork 30
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 customGate
flag and optimizer functionality to flatten only custom gates
#651
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #651 +/- ##
=======================================
- Coverage 91.6% 91.6% -0.1%
=======================================
Files 148 148
Lines 14755 14759 +4
Branches 2369 2370 +1
=======================================
+ Hits 13522 13525 +3
- Misses 1233 1234 +1
|
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for this nice addition.
I just pushed two commits with a few cleanups.
Once CI passes, this is good to go in 🚀
Description
This pull request adds the
customGate
flag to theCompoundOperation
class. This flag is set forCompoundOperations
that were constructed from custom gate calls.The pull request also provides new functionality to the
flattenOperations
optimizer. Now, a second parameter can be used to indicate that only custom gates should be flattened. It makes sense to put this functionality here as outside of theCircuitOptimizer
class, certain protected members cannot be accessed anymore.Checklist: