Skip to content
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

Output of UniTensor.GetTotalQnums not sorted #2

Open
yingjerkao opened this issue Jun 18, 2019 · 0 comments
Open

Output of UniTensor.GetTotalQnums not sorted #2

yingjerkao opened this issue Jun 18, 2019 · 0 comments

Comments

@yingjerkao
Copy link
Collaborator

yingjerkao commented Jun 18, 2019

import Tor10
bd_sym_1 = Tor10.Bond(3, Tor10.BD_KET, qnums=[[0, 2, 1, 0],
                                                [1, 1, -1, 1],
                                                [2, -1, 1, 0]])
bd_sym_2 = Tor10.Bond(4, Tor10.BD_KET, qnums=[[-1, 0, -1, 3],
                                                [0, 0, -1, 2],
                                                [1, 0, 1, 0],
                                                [2, -2, -1, 1]])
bd_sym_3 = Tor10.Bond(2, Tor10.BD_BRA, qnums=[[-4, 3, 0, -1],
                                                [1, 1, -2, 3]])

sym_T = Tor10.UniTensor(bonds=[bd_sym_1, bd_sym_2, bd_sym_3], rowrank=2, labels=[1, 2, 3])

tqin, tqout = sym_T.GetTotalQnums()

qin=Tor10.Bond(12,Tor10.BD_KET, qnums=[[+4, -3, +0, +1], [+3, -1, +2, +0], [+2, -1, +0, +2],
                                       [+1, -1, +0, +3], [+3, -1, -2, +2], [+2, +1, +0, +1],
                                       [+1, +1, -2, +3], [+0, +1, -2, +4], [+2, +0, +0, +1],
                                       [+1, +2, +2, +0], [+0, +2, +0, +2], [-1, +2, +0, +3]]
                           )
print(tqin)

print(qin)

Output

Dim = 12 |
KET     : U1::  +4 +3 +2 +1 +3 +2 +1 +0 +2 +1 +0 -1
          U1::  -3 -1 -1 -1 -1 +1 +1 +1 +0 +2 +2 +2
          U1::  +0 +2 +0 +0 -2 +0 -2 -2 +0 +2 +0 +0
          U1::  +1 +0 +2 +3 +2 +1 +3 +4 +1 +0 +2 +3
         
Dim = 12 |
KET     : U1::  +4 +3 +3 +2 +2 +2 +1 +1 +1 +0 +0 -1
          U1::  -3 -1 -1 +1 +0 -1 +2 +1 -1 +2 +1 +2
          U1::  +0 +2 -2 +0 +0 +0 +2 -2 +0 +0 -2 +0
          U1::  +1 +0 +2 +1 +1 +2 +0 +3 +3 +2 +4 +3

I wonder why bond qnums in the Bond.assign should be sorted? Or should we sort the output of UniTensor.GetTotalQnums?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant