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

Add gamma functions to the math module #3495

Merged
merged 24 commits into from
Dec 15, 2022
Merged

Conversation

soranjh
Copy link
Contributor

@soranjh soranjh commented Dec 8, 2022

Context:
The PR adds the gamma function and the incomplete gamma function needed for computing the Boys function to qml.math.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

@soranjh soranjh added the qchem ⚛️ Related to the QChem package label Dec 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2022

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md 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.

@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Merging #3495 (2ee7674) into qchem_jax_addmath (9a3f91d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                Coverage Diff                 @@
##           qchem_jax_addmath    #3495   +/-   ##
==================================================
  Coverage              99.87%   99.87%           
==================================================
  Files                    311      311           
  Lines                  27910    27926   +16     
==================================================
+ Hits                   27874    27890   +16     
  Misses                    36       36           
Impacted Files Coverage Δ
pennylane/math/__init__.py 100.00% <ø> (ø)
pennylane/math/multi_dispatch.py 100.00% <100.00%> (ø)
pennylane/math/single_dispatch.py 99.71% <100.00%> (+<0.01%) ⬆️
pennylane/pauli/utils.py 100.00% <100.00%> (ø)
pennylane/qchem/integrals.py 100.00% <100.00%> (ø)
pennylane/qchem/observable_hf.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rmoyard rmoyard self-requested a review December 8, 2022 15:58
@soranjh soranjh requested a review from rmoyard December 9, 2022 15:01
Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

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

Thanks @soranjh for the changes 👍 It think that gammainc would be better a multi dispatch, as the behavior in single dispatch can be misleading. What do you think?

pennylane/math/single_dispatch.py Outdated Show resolved Hide resolved
pennylane/math/single_dispatch.py Outdated Show resolved Hide resolved
tests/qchem/test_hartree_fock.py Show resolved Hide resolved
@soranjh soranjh requested a review from rmoyard December 12, 2022 22:14
Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

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

It looks good to me 💯 Could you add a unit test in the test_functions in the math module, nothing too elaborate, just make sure that it is working for different combinations of x and y (builtin, numpy autograd, jax). After that happy to approve!

pennylane/math/multi_dispatch.py Outdated Show resolved Hide resolved
@soranjh soranjh requested a review from rmoyard December 14, 2022 19:49
Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

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

Thanks @soranjh, it looks good 💯 There are some changes in the file `pauli/utils, is it intended?

pennylane/pauli/utils.py Show resolved Hide resolved
Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

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

Thanks @soranjh 💯

@soranjh soranjh merged commit 0d4862b into qchem_jax_addmath Dec 15, 2022
@soranjh soranjh deleted the qchem_jax_boys branch December 15, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qchem ⚛️ Related to the QChem package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants