Hello everybody,

my question is concerning the rewriting of a density matrix as a vector. I know how to construct an MPS with doubled length for the vectorized density matrix from a basis state (for example the Neel state for spin models) using InitState and direct initialization. Nevertheless, I have problems constructing this double-sized MPS |psi><psi| —> |psi>|psi> from a general, more complicated (larger bond dimension) state |psi> which I have in MPS-form, for example a ground state of some model obtained by DMRG.

Conceptually it is clear to me what to do, but I cannot find a good way to make a duplicate of local tensors A(i) of the wave function MPS |psi> in such a way, that the storage data is the same but the indices are new ones, i.e. they are different from the index set of the state they have been copied from so that one can distinguish the bra and ket part. I tried to use a doTask function to copy the data of the Dense data structure from the original tensor to a new created one, but didn’t really succeed with this. Is there maybe a better way to do this, or maybe an itensor function which I’ve overlooked and which could help here?

Any help is appreciated,

Best,

Stefan

To understand better, if I put aside the context of an MPS, is your main question about how to change a particular index of an ITensor while letting it continue to have the same data?