-
Notifications
You must be signed in to change notification settings - Fork 575
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 dipole moment observable to hf #2173
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## qchem_refactor #2173 +/- ##
===============================================
Coverage 99.26% 99.26%
===============================================
Files 231 232 +1
Lines 18253 18350 +97
===============================================
+ Hits 18119 18216 +97
Misses 134 134
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great to me, I didn't find any major issues. Only points to address are:
- let's think if we can find a better name than
fermionic_one
- I believe we should at least try to add gradient tests for the operators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Left a few doubts and comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @soranjh ! Nice docstrings. I have left few suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @soranjh. Looks good! I have just left few minor comments.
Context:
This PR adds functions required for constructing a differentiable dipole moment observable.
Description of the Change:
The function
moment_matrix
is added toqml.hf.matrices
for constructing a multipole moment matrix of integrals for a set of basis functions.The
dipole
module is created inqml.hf
to host the following functions:dipole_integrals
: computes the dipole moment integrals in the MO basisfermionic_dipole
: computes the fermionic dipole momentdipole_moment
: computes the qubit dipole momentfermionic_one
: creates a fermionic operator from one-particle MO integralsqubit_operator
: converts a fermionic observable to a PL qubit observableBenefits:
This functionality is required for computing a differentiable dipole moment observable and to remove using external qchem libraries for computing dipole moment.
Possible Drawbacks:
NA
Related GitHub Issues:
NA