Skip to content

Keeping indices in place after apply #157

@jwnys

Description

@jwnys

Hi, I'm (very) new to itensor(MPS), so apologies if this is a straightforward question/answer, but can't find the answer in the docs.
I've got an MPS with two site indices per tensor (call them P and A indices).

MPS
[1] ((dim=2|id=276|"P,S=1/2,Site,n=1"), (dim=2|id=189|"A,S=1/2,Site,n=1"), (dim=1|id=565|"Link,l=1"))
[2] ((dim=2|id=654|"P,S=1/2,Site,n=2"), (dim=2|id=260|"A,S=1/2,Site,n=2"), (dim=1|id=107|"Link,l=2"), (dim=1|id=565|"Link,l=1"))
[3] ((dim=2|id=74|"P,S=1/2,Site,n=3"), (dim=2|id=873|"A,S=1/2,Site,n=3"), (dim=1|id=462|"Link,l=3"), (dim=1|id=107|"Link,l=2"))
[4] ((dim=2|id=937|"P,S=1/2,Site,n=4"), (dim=2|id=670|"A,S=1/2,Site,n=4"), (dim=1|id=462|"Link,l=3"))

I want to apply an MPO on the P indices only (it's defined with P indices only).
After apply or contract, I get an MPS where all A indices are on site 1.

MPS
[1] ((dim=2|id=670|"A,S=1/2,Site,n=4"), (dim=2|id=873|"A,S=1/2,Site,n=3"), (dim=2|id=260|"A,S=1/2,Site,n=2"), (dim=3|id=680|"Link,l=1")', (dim=2|id=189|"A,S=1/2,Site,n=1"), (dim=2|id=276|"P,S=1/2,Site,n=1")')
[2] ((dim=2|id=654|"P,S=1/2,Site,n=2")', (dim=3|id=267|"Link,l=2")', (dim=3|id=680|"Link,l=1")')
[3] ((dim=2|id=74|"P,S=1/2,Site,n=3")', (dim=2|id=664|"Link,l=3")', (dim=3|id=267|"Link,l=2")')
[4] ((dim=2|id=937|"P,S=1/2,Site,n=4")', (dim=2|id=664|"Link,l=3")')

Is there a way to keep the A indices attached to the original sites, to avoid errors related to site index mismatches later?

Thanks, Jannes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions