-
Notifications
You must be signed in to change notification settings - Fork 18
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
Common index but not contract #524
Comments
The first one is a Hadamard product, doesn't exist for symmetric tensors, but as an operation on a generic tensor it certainly has uses. It should already be possible somehow - I noticed that operation is implemented in src/backend/linalg_internal_cpu/Mul_internal.cpp. I assume it is just The second one is the column sum of |
Or is it is the diagonal part of |
What I had in mind is something like the
It should work also for symmetric tensors. For Cytnx, I was thinking of integrating this method into Contract and Network by specifying the indices that are common but remain in the outcome tensor, but I didn't carefully think about the interface. We can also make another method. An application of the method is as follows. In QTT a function |
Right, QTT has this concept of 'lifting' a MPS into an MPO, which I think works by regarding the MPS as an MPO with those elements on the diagonal? How does this work with symmetric tensors? If you put quantum number labels on |
Yes exactly.
Oh I didn't think of spares tensor can do the same job, but you are right.
I don't quite the problem here. What I had in mind is the abelian quantum numbers (which is the only type that ITensor supports), where I think of a symmetric tensor as a block-diagonalized tensor, and can be thought as a dense tensor with many zeros. In this case, this operation should be well-defined? |
No, its not well-defined. I mean, you can write down those matrix elements, but the result isn't a symmetry-preserving tensor. By definition, a tensor is symmetric if you do a symmetry transformation (assuming all of the indices are kets -- for bra indices apply Normal tensor contraction satisfies this, because the contraction gives a In other words, if you changed basis of your physical Hilbert space (which means rotating by a quantum number-dependent phase factor), then this shouldn't change any physical expectation values - the Another way of seeing this is that you can express these as normal contractions using the 3-index 'join tensor', that takes a two index object into a 1-index object QTT doesn't have this symmetry structure, since it uses a very specific basis, mapping the domain |
Yes, you are right! Thanks for the explanation. Now I recalled what I did with symmetric tensors. I used tensors with a mixture of symmetric and non-symmetric indices, and the index to be "merged" must have no quantum number. This index is used as a label for symmetric tensors. With QTT I don't use any quantum number, so the method for non-symmetric tensors will do the job. |
Yeah, another example is if you have a simple array of tensors all of the same shape, say a |
It would be useful to have an operation for$C_i = A_i B_i$ or more general $C_i = \sum_j A_{ij} B_{ij}$ . We may want to add this method in the future.
The text was updated successfully, but these errors were encountered: