-
Notifications
You must be signed in to change notification settings - Fork 57
Add split non commuting pass #2138
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2138 +/- ##
==========================================
- Coverage 97.39% 95.70% -1.70%
==========================================
Files 91 93 +2
Lines 10610 10808 +198
Branches 999 1036 +37
==========================================
+ Hits 10334 10344 +10
- Misses 218 407 +189
+ Partials 58 57 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Nice work @rniczh
Just some quick fly-by comments
if not logger.handlers: | ||
handler = logging.StreamHandler() | ||
handler.setLevel(logging.DEBUG) | ||
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | ||
handler.setFormatter(formatter) | ||
logger.addHandler(handler) |
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.
You should be able to use the PennyLane logging functionality that provides default config already.
I'd change the above to use something similar to
from catalyst.logging import debug_logger, debug_logger_init |
logger.addHandler(logging.NullHandler()) |
@debug_logger |
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.
Thanks for the suggestion! But I just removed all the print and debug log from this xdsl pass
expval_ops_to_remove.append(op) | ||
|
||
if not expval_ops_to_remove: | ||
print(f"No expvals to remove for group {target_group}") |
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.
Do we want to print here? Same q with all other print statements
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.
No, those are debug purpose, I already removed them
belong to other groups, traces their results to the return statement, | ||
and removes those return values. | ||
""" | ||
print(f"removeGroup: keeping only group {target_group}") |
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.
Do we want to print here?
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.
No, those are debug purpose, I already removed them
Hello. You may have forgotten to update the changelog!
|
We aren't ready to have xdsl passes in catalyst right? |
@paul0403 Yes, This PR is just for a quick test and fix issues, and we will migrate to PL later |
Port to PL PennyLaneAI/pennylane#8531 |
Context:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: