# Using IQTensor for general states

+1 vote

Hi,

I have a question about IQTensor following that of http://itensor.org/support/1126/superposed-states-with-iqtensor. Say I need to calculate O|psi> where O preserves some symmetry G but |psi> does not. That being said, |psi> can (as always) be decomposed into G eigenvectors such that each has a block structure.

My understanding is that the quantum number is taken care by the "boundary tensor". (correct me if I'm wrong.) That's to say, all tensors apart from the boundray one has divergence 0, while the divergence of the boundary one agrees with the quantum number. So a block-structured of |psi> is possible by a proper definition of the boundary one (i.e. a sum of tensors w/ different divergences) and it would still be efficient if I make use of the symmetry throughout. Is that correct?

Best,
Chengshu

commented by (14.1k points)
If |psi> can be decomposed into two MPSs, say |psi1> and |psi2>, that each have well defined QNs, can't you treat them explicitly as two separate MPSs and calculate O|psi> = O|psi1> + O|psi2>?
commented by (680 points)
thanks for your quick reply! i agree that’s possible. i’m thinking if |psi1> and |psi2> share a lot of common tensors (say only the boundary tensors differ) it would be more efficient to combine them into one.
commented by (70.1k points)
I agree with Matt's question above, that your best bet here is probably to keep the states with well-defined QNs separate. Though in principle you could keep some of the MPS tensors the same and just switch out a set of special "orthogonality center" tensors that individually do have different quantum numbers (different fluxes).

Regarding the part of your question about boundary tensors, I think I see much better what you are asking now. Your understanding of how that works in ITensor is only partly correct, and makes me realize we need some information in the docs about our conventions.

The convention we follow with MPS in ITensor is that MPS can be orthogonalized or not. When they are orthogonalized, then all of the MPS tensors have flux 0 except possibly one of them, which is the tensor that is the "orthogonality center" tensor of the gauge. (The center is the site left of which all tensors are left-orthogonal and right of which all tensors are right-orthogonal.) The center tensor has the same flux as that of the whole MPS.

Note that the center tensor is located at whichever site you orthogonalize to. So if you call psi.position(j) then j is the center, for any j. So it could be at the left boundary, right boundary, or somewhere in the middle and there is nothing special per se about boundary versus bulk tensors the way we do it in ITensor.

Hope that helps -

Miles
commented by (70.1k points)
Regarding your comment about being more efficient to combine tensors, that is technically true. However it could make your code more complicated to create and use. So the most important efficiency of all is your time and the clarity of your code. I wonder if you'd find that keeping the MPS separate really slows down your code very much. At worst it might be a factor of order 10 or so, but it might be a much smaller amount than that, depending on what you are doing. (The difference in speed might not be noticeable at all!)
commented by (680 points)
Thank you Miles for your replies. The information on orthogonality center is very helpful. I agree separating the different states will simplify things a lot which might outweigh the gain from the more complicated codes.