-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Added trace of M*overlap #768
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #768 +/- ##
==========================================
+ Coverage 86.91% 87.26% +0.35%
==========================================
Files 410 393 -17
Lines 51826 50238 -1588
==========================================
- Hits 45042 43841 -1201
+ Misses 6784 6397 -387 ☔ View full report in Codecov by Sentry. |
I am thinking whether this would be more appropriate as a regular method: def trace(self, axis1=0, axis2=1, use_overlap=False)... then it can be used for more than 1 thing? Probably we should add the |
Does I don't know if it's a good idea to introduce the matrix multiplication on a simple In terms of generalization I was thinking more about something like: def matmul_trace(self, other, ...): So that you could do for example |
But it is also true that you can acheive that simply with I wonder if having the explicit method helps, because I had not thinked that it was that easy until now 😅 |
I think it would be clear from a
Hmm, I think we shouldn't do complicated functions that are allready standardized, e.g.
I think allowing the standard methods would be fine enough to overwrite in some form. |
Yes, but the point is that
Hmm that is another point. Wouldn't it make sense that operations on sparse orbital matrices didn't modify the overlap (if present)? |
I would assume that operations remove the overlap (if it involves changing stuff, e.g. trace). I don't know exactly how we should go about this, but re-using standard names would be optimal IMHO. We should do something with |
I think it is simpler to make something like |
Adds a method to retrieve the trace of the matrix multiplication of a matrix with its overlap.
E.g. to get the total number of electrons from the DM or the band structure energy from the EDM (I think?).
If you agree that this is useful I can add some tests before merging.