yingjerkao / uni10

Official Repo for Uni10
28 stars 9 forks source link

set degeneracy to Qnum #24

Open Wangwei-Lan opened 7 years ago

Wangwei-Lan commented 7 years ago

Hello, here

I am using uni10 to write a U(1) symmetric DMRG program. So, I think I need to assign degeneracy to quantum number. Is it possible to do it in uni10? I didn't find anywhere. Thanks very much.

rezah commented 7 years ago

You should read the documentation more carefully:

in python: q_list=[qnum]*dim

then q_list wold have degeneracy equal to dim...

in c++: see the following http://yingjerkao.github.io/uni10/doc/eg_u1_8cpp-example.html#a6 you should use function qnums.push_back()

Wangwei-Lan commented 7 years ago

Sorry, I didn't make it clear. I know the way you mentioned. I am just asking another easier way. Since I am using C++, if I got a vast degeneracy, the way you mentioned is often tedious. I actually have written my own functions to work around it, but just asking is there a built in function that can do it, which will make my code more readable and probably cause less problem when you update uni10 to a new version. Thanks.