Skip to content

Conversation

rniczh
Copy link
Contributor

@rniczh rniczh commented Oct 21, 2025

Context:

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 0% with 195 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.70%. Comparing base (07add14) to head (059151e).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
frontend/catalyst/passes/split_non_commuting.py 0.00% 195 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@mlxd mlxd left a 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

Comment on lines 27 to 32
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)
Copy link
Member

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
and
logger.addHandler(logging.NullHandler())
with usage matching

Copy link
Contributor Author

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}")
Copy link
Member

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

Copy link
Contributor Author

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}")
Copy link
Member

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?

Copy link
Contributor Author

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

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@paul0403
Copy link
Member

We aren't ready to have xdsl passes in catalyst right?

@rniczh
Copy link
Contributor Author

rniczh commented Oct 22, 2025

@paul0403 Yes, This PR is just for a quick test and fix issues, and we will migrate to PL later

@rniczh rniczh closed this Oct 23, 2025
@rniczh
Copy link
Contributor Author

rniczh commented Oct 23, 2025

Port to PL PennyLaneAI/pennylane#8531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants