-
Notifications
You must be signed in to change notification settings - Fork 603
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 spin and particle number observables to hf #2197
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## qchem_refactor #2197 +/- ##
===============================================
Coverage 99.26% 99.27%
===============================================
Files 232 234 +2
Lines 18350 18412 +62
===============================================
+ Hits 18216 18278 +62
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.
Thanks @soranjh . Looks good! Note that the name of the module is spin
even though it also contains a function to build the particle number operator.
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.
Look good to go! Just thinking about @agran2018's comment on the particle_number
function.
Separated. |
Separated. |
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 go! Just a few small clarifications 💯
Context:
This PR modifies the spin and particle number observable functions to use
qml.hf
fermionic-to-qubit transformation.Description of the Change:
The existing
qml.qchem
functionsspin2
,spinz
, andparticle_number
are modified.Benefits:
Removes dependency to OpenFermion for computing the spin and particle number observables.
Possible Drawbacks:
Users can only use the Jordan–Wigner transformation because other transformations are not yet supported in PennyLane.
Related GitHub Issues:
NA