Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

symmetri UniTensor, print bonds, empty list

Open chiamin opened this issue 2 years ago • 0 comments

When printing the bonds of a UniTensor, an empty list is printed at the end, which we may want to remove. See example.

ii = cytnx.Bond(cytnx.BD_IN, [[0],[1]], [3,1], [cytnx.Symmetry.Zn(2)])
A = cytnx.UniTensor([ii,ii.redirect()], labels=['i','j'])
print(A.bonds())

Printing results

Dim = 4 |type: |IN (KET)>     
 Z2::   +0  +1
Deg>>    3   1

Dim = 4 |type: < OUT (BRA)    
 Z2::   +0  +1
Deg>>    3   1

[, ]

chiamin avatar Dec 03 '23 03:12 chiamin