# convert an ITensor to fewer quantum number

+1 vote
asked

Hi. I wonder if it is possible to convert an ITensor with 2 quantum numbers, say total Sz and particle number, to which with only 1 quantum number, say total Sz. It would be equally good if I can contract two tensors with different number of quantum numbers. Thank you.

BTW I am using ITensor3 C++ interface.

commented by (130 points)
Not a full answer, but assuming that the code doesn't take too long to run, what about building your more symmetric state in the larger, less symmetric space? More specifically, I'm imagining using the state.set to control the initial trial MPS to specify that the state is in a given symmetry sector (i.e. fixed number). The page http://www.itensor.org/support/2101/how-to-construct-singlet-state-under-qn-conservation?show=2106#c2106 Discusses this with the conservation of Sz=0 for a state. Hopefully that will give you some ideas if this direction will work for you. I'm pretty new to this (obviously from the question I asked a week ago =D )

- Jared
commented by (340 points)
Thank you Jared. Apparently I just learned how to reply a comment, so forgive me for the late thank you.  I agree that a solution is to use a less symmetric tensor in the first place as Miles also suggested, and in ITensor it is pretty convenient to do it (which is what I am doing). My question was whether ITensor supports automatically converting a symmetric tensor to a less symmetric tensor (by putting zeros) but I think the answer is No and one needs to write such a function by itself.

## 1 Answer

+1 vote
answered by (50.7k points)
selected by

Best answer

Hi Chia-Min,
The short answer is, no, we don't have this capability right now. It is something that could be theoretically added, but it would be hard for us to prioritize this right now.

If the purpose of this is to contract two tensors with different QNs, though, then one way you could do this is to just convert them both to dense, non-QN tensors and then contract them that way. (You may likely have to do some index replacement on one of them to get the id's to match before hand.)

Another way to go is just to use fewer QNs in the first place, so like the minimum amount shared by the two tensors. If you wanted to give a little more context, I might be able to help you more.

Miles

commented by (340 points)
Thank you Jared and Miles. Both of your suggestions make sense to me and are actually what I am doing or I will do. My question was mainly about the current ability of ITensor and
wonder if there is anything I missed from the documentation, and Miles has perfectly answer it.