Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

row rank after combine bond

Open pcchen opened this issue 2 years ago • 0 comments

If one combines two row labels, then row rank should -1. If one combines two column labels, then row rank should remain the same.

Right now, for a rank-4 UniTensor with rowrank=2

XT_sym.print_diagram()
XT_sym.combineBonds(['u','l'])
XT_sym.print_diagram()

-----------------------
tensor Name : 
tensor Rank : 4
contiguous  : True
valid blocks : 8
is diag   : False
on device   : cytnx device: CPU
      row           col 
         -----------    
         |         |    
   u  -->| 2     2 |-->  r
         |         |    
   l  -->| 2     2 |-->  d
         |         |    
         -----------    

-----------------------
tensor Name : 
tensor Rank : 3
contiguous  : True
valid blocks : 4
is diag   : False
on device   : cytnx device: CPU
      row           col 
         -----------    
         |         |    
   u  -->| 4     2 |-->  d
         |         |    
   r *<--| 2       |        
         |         |    
         -----------    

pcchen avatar Apr 28 '23 07:04 pcchen