-
Notifications
You must be signed in to change notification settings - Fork 1
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
Converting TensorMaps to arrays to evaluate elements #4
Comments
One possible problem with this is that tensors are generically not indexable. I can probably define the rule to convert them to and from dictionaries which can in turn be indexed, but do you have a particular use-case in mind? |
@ErikLW , am I correct in assuming that the elements that you want to access are diagonal elements of say a tensor with singular values or eigenvalues? At least, those are the only ones for which I think the elements are meaningful and not dependent on details such as the fusion trees etc (in the case of non-abelian symmetries). I have been planning to implement a There can also be other cases to access specific elements, such as when initialing tensors to create specific operators. There should also be more functionality for this, but that's work in progress. I think MPSKit has some additional tools for that; is that correct @maartenvd ? |
Hey, |
Simply |
I am not sure I understand you correctly. Do you mean to say that using convert(Dict, t) etc. I can access the elements of a TensorMap without violating the AD compatability? Because this does not seem to work for me. E.g.:
|
That would be very useful. In case you decide to do it, let me know :) |
can you try the latest master? It's quick'n dirty but your example code works |
Great! It works for me now.
does not yet work. |
good catch, there was a typo! (master should work) |
Does the example work for you? For me, it sadly still fails |
are you sure you have the latest master (the one since the typo commit)?
|
Works now, thanks :) |
Hey,
Is there a way to access the specific elements in a TensorMap (Without violating the AD compatability) ? E.g. findung the maximum element in a TensorMap or simply taking an element with []?
Best regards,
Erik
The text was updated successfully, but these errors were encountered: