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

linalg bug fix & cython integration #83

Merged
merged 9 commits into from
Nov 19, 2024
Merged

linalg bug fix & cython integration #83

merged 9 commits into from
Nov 19, 2024

Conversation

ryanhill1
Copy link
Member

Summary of changes

  • Fixed small bug in so_bidiagonalize
  • Migrated kronecker_fator function to Cython (~60% speedup)
  • Migrated so4_to_so2 function to Cython (~5% speedup)
  • These initial Cython migrations weren't as much out of concern for performance, but rather done as more of an experiment and to learn how it works. Now that the structure is there, we may be able to migrate some of the other larger functions and get an actual performance improvement out of kak_decomposition_angles, if we wanted to.

@ryanhill1 ryanhill1 marked this pull request as ready for review November 16, 2024 03:19
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

src/pyqasm/linalg.py Outdated Show resolved Hide resolved
@TheGupta2012
Copy link
Member

I like the idea here and the speed up is pretty good! Going forward, do you think it would be better to arrange the .pyx files in a cython folder and rename the .pyx file as the module name? Eg. -

  1. src/pyqasm/linalg_cy.pyx becomes src/pyqasm/cython/linalg.pyx and
  2. from pyqasm.linalg_cy becomes from pyqasm.cython.linalg import ...

Copy link
Member

@TheGupta2012 TheGupta2012 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! Thanks for the changes

@TheGupta2012 TheGupta2012 merged commit dfe0f3e into main Nov 19, 2024
8 checks passed
@TheGupta2012 TheGupta2012 deleted the rh1-patch-2 branch November 19, 2024 05:45
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