-
Notifications
You must be signed in to change notification settings - Fork 12
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
Define + for LocalOperators #63
Conversation
I defined additional for Localoperators
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.
Maybe in the meantime it might be convenient to also add -
, and scalar multiplication?
Sure, I didn't need those so I didn't think of it. |
1) Overloaded checklattice for two LocalOperators 2)Changed LocalOperator+LocalOperator such that its more efficient when duplicate indices appear 3)Defined Number*LocalOperator 4)Defined - using + and *
It might be useful to also check when H1 - H2 contains operators that are 0 that can therefore be thrown away. Any suggestions/preferences ? Or do we just ignore this subtlety ? |
Honestly, maybe we just add a default tolerance for that? something like |
Okay. I'll implement it like that. |
1) Extended LocalOperator constructor so that it eliminates operators with norm < tolerance. 2) Used this to make + - * implementations more streamlined
I made some slight changes and added a very basic docstring, thanks for getting this started! |
This all looks great for me. And you're welcome ! :) |
Codecov ReportAttention: Patch coverage is
|
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.
Also looks great to me, thanks for that! :-)
I defined addition for Localoperators