Block Quantum Number is different from v.1
Created by: chengyanlai
I am having trouble on tensor contraction from migrating to this new version of code. Here is an example of contracting two tensors (the same tensor). The two tensors are shown as following.
#!bash
***************** 0 *****************
REAL
____________
| |
1___|1 1|___2
| |
10___|4 |
| |
|____________|
================BONDS===============
IN : (U1 = 0, P = 0, 0)|1, Dim = 1
IN : (U1 = 0, P = 0, 0)|1, (U1 = 1, P = 0, 1)|2, (U1 = 2, P = 0, 0)|1, Dim = 4
OUT: (U1 = 1, P = 0, 1)|1, Dim = 1
===============BLOCKS===============
--- (U1 = 1, P = 0, 1):
2 x 1 = 2 [ Real ElemNum: 0 ], REAL
[
1.0000
0.
];
Total elemNum: 2
====================================
***************** 0 *****************
REAL
____________
| |
4___|1 1|___1
| |
| 4|___10
| |
|____________|
================BONDS===============
IN : (U1 = 1, P = 0, 1)|1, Dim = 1
OUT: (U1 = 0, P = 0, 0)|1, Dim = 1
OUT: (U1 = 0, P = 0, 0)|1, (U1 = 1, P = 0, 1)|2, (U1 = 2, P = 0, 0)|1, Dim = 4
===============BLOCKS===============
--- (U1 = 1, P = 0, 1):
1 x 2 = 2 [ Real ElemNum: 0 ], REAL
[ 1.0000 0. ];
Total elemNum: 2
====================================
and this is the resulting tensor along with the error message
#!bash
************************************
REAL
____________
| |
4___|1 1|___2
| |
|____________|
================BONDS===============
IN : (U1 = 1, P = 0, 1)|1, Dim = 1
OUT: (U1 = 1, P = 0, 1)|1, Dim = 1
===============BLOCKS===============
--- (U1 = 0, P = 0, 0): 1 x 1: 0
Total elemNum: 1
====================================
#!bash
Uni10 error occur at void uni10::Contract(UniTensor<To> &, UniTensor<T> &, UniTensor<U> &, bool, uni10::UNI10_INPLACE) [To = double, T = double, U = double]
error: The dimensions the bonds to be Contracted out are different.
file : /Volumes/Files/GitRepo/tensorlib/uni10/include/uni10_api/uni10_hirnk_linalg_inplace/uni10_hirnk_linalg_inplace_contract.h (96)
The error message shows the contraction can not be performed due to different dimension. However, the dimensions are match on both bond-1 and bond-10. I am confused, so I did the same operation by using uni10 v1.0. The resulting tensor has different Qnum Blocks.
#!bash
************************************
REAL
____________
| |
4___|1 1|___2
| |
|____________|
================BONDS===============
IN : (U1 = 1, P = 0, 1)|1, Dim = 1
OUT: (U1 = 1, P = 0, 1)|1, Dim = 1
===============BLOCKS===============
--- (U1 = 1, P = 0, 1): 1 x 1 = 1, REAL
1.000
Total elemNum: 1
***************** END ****************
Do you have any suggestions on how to do this kind of operations in the new version? I believe this is very common step for an inner product of two matrix product states. Thank you for the time and effort.