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

Faster PauliwordOp.to_opemnfermion #175

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Faster PauliwordOp.to_opemnfermion #175

merged 3 commits into from
Dec 14, 2023

Conversation

MIWdlB
Copy link
Contributor

@MIWdlB MIWdlB commented Dec 7, 2023

Previous version of the function used symplectic_to_string then looped through the string.

I've made a new function which amends symplectic_to_string directly so that this isn't necessary.

Files changed

  • symmer/operators/utils.py
  • symmer/operators/base.py

Looks like a huge amount of change but its mostly linting (suggests that CICD is not working as intended). I can revert that if you'd rather.

@MIWdlB MIWdlB added the enhancement New feature or request label Dec 7, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a9c3c72) 75.78% compared to head (8fa551d) 75.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   75.78%   75.87%   +0.09%     
==========================================
  Files          35       35              
  Lines        3936     3951      +15     
==========================================
+ Hits         2983     2998      +15     
  Misses        953      953              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MIWdlB
Copy link
Contributor Author

MIWdlB commented Dec 7, 2023

Can probably be made a bit faster by converting the whole symplectic in a vectorised function but low priority to figure that out.

Copy link
Collaborator

@AlexisRalli AlexisRalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@AlexisRalli AlexisRalli merged commit 46a62f3 into main Dec 14, 2023
10 checks passed
@AlexisRalli AlexisRalli deleted the to-openfermion branch December 14, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants