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

Use numba implementation of multidimensional Hermite polynomials #295

Merged
merged 30 commits into from
Nov 13, 2021

Conversation

sduquemesa
Copy link
Contributor

@sduquemesa sduquemesa commented Nov 4, 2021

Context: PR #280 implemented a fully numbified multidimensional Hermite polynomials

Description of the Change: This PR deprecates the C++ implementation of multidimensional Hermite polynomials
in favor of the numba implementation

Benefits: The Walrus has less C++ dependencies

Possible Drawbacks: Speed, but as commented in PR #280, the numba implementation is faster than the C++ one

Related GitHub Issues: PR #646 on strawberryfields

…d of c++

- Checks and prep operations on `hermite_multidimensional_numba` are implemented on `hermite_multidimensional`.
- `.libwalrus.renorm_hermite_multidimensional` is deprecated in favour of `_hermite_multidimensional_numba`
- implement `_hermite_multidimensional_renorm`
- remove `*_numba` postfix from private functions
- directly call private functions from `hermite_multidimensional`
@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #295 (1e8f65c) into master (a61c85d) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #295   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         1451      1458    +7     
=========================================
+ Hits          1451      1458    +7     
Impacted Files Coverage Δ
thewalrus/__init__.py 100.00% <ø> (ø)
thewalrus/_hermite_multidimensional.py 100.00% <100.00%> (ø)
thewalrus/quantum/fock_tensors.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a61c85d...1e8f65c. Read the comment docs.

@sduquemesa sduquemesa marked this pull request as ready for review November 5, 2021 19:10
@nquesada
Copy link
Collaborator

nquesada commented Nov 6, 2021

seems like this is almost ready to go except for a test failing

@sduquemesa
Copy link
Contributor Author

@nquesada and @ziofil, I believe this is ready for review! 🔍

@sduquemesa
Copy link
Contributor Author

Related changes on strawberryfields are addressed on PR #646

Copy link
Collaborator

@nquesada nquesada left a comment

Choose a reason for hiding this comment

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

@sduquemesa : you could now delete ther hermite.hpp file in include and also the corresponding c++ tests

thewalrus/libwalrus.pyx Outdated Show resolved Hide resolved
Copy link
Collaborator

@nquesada nquesada left a comment

Choose a reason for hiding this comment

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

this was a left over

@sduquemesa
Copy link
Contributor Author

Thank you @nquesada!

@nquesada
Copy link
Collaborator

@sduquemesa : you have not added your name here: https://github.com/XanaduAI/thewalrus/blob/master/.github/ACKNOWLEDGMENTS.md and also don't forget to update the CHANGELOG

Copy link
Collaborator

@nquesada nquesada left a comment

Choose a reason for hiding this comment

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

You forgot to add your name in the list of contributors for this release @sduquemesa . I guess you can do that later. Otherwise great work! Super happy to start getting rid of hard to maintain hard to compile C++ code.

@sduquemesa sduquemesa merged commit 8f62378 into master Nov 13, 2021
@sduquemesa sduquemesa deleted the numba-hermite-multidimensional branch November 13, 2021 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants