-
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
Support eigvals for sparse hamiltonians #2333
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #2333 +/- ##
=======================================
Coverage 99.39% 99.39%
=======================================
Files 229 229
Lines 17442 17448 +6
=======================================
+ Hits 17336 17342 +6
Misses 106 106
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.
Just a few small things, but other then that it looks good 👍🏼 Should be quite a good speed up!
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.
Just a small comment on the doc, the rest I see it perfect! 💪
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! Just maybe good to add a short explanation on what the possible which
methods refer to.
…LaneAI/pennylane into eigvals_sparse_hamiltonian
…LaneAI/pennylane into eigvals_sparse_hamiltonian
Context:
Adds functionality for returning the eigenvalues of a sparse Hamiltonian. The eigendecomposition of sparse Hamiltonians is much more efficient with the scipy sparse linear algebra tools.
Description of the Change:
The
qml.eigvals
function is modified to recognize aSparseHamiltonian
object and usescipy.sparse.linalg.eigsh
for the eigendecomposition.Benefits:
The new addition provides a very efficient way for obtaining the eigenvalues of a sparse Hamiltonian.
Possible Drawbacks:
scipy.sparse.linalg.eigsh
computes k ( = 6 by default) eigenvalues and eigenvectors only.Related GitHub Issues:
#2308