Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit f7eefce

Browse files
authored
Block sparse (#407)
* started implementing block-sparse tensors * removed files * working on AbelianIndex * working in block sparisty * added reshape and lots of other stuff * added Index, an index type for symmetric tensors * added small tutorial * added docstring * fixed bug in retrieve_diagonal_blocks * TODO added * improved initialization a bit * more efficient initialization * just formatting * added random * added fuse_degeneracies * fixed bug in reshape * dosctring, typing * removed TODO * removed confusing code line * bug removed * comment * added __mul__ to Index * added sparse_shape and updated reshape to accept both int and Index lists * more in tutorial * comment * added new test function * testing function hacking * docstring * small speed up * Remove gui directory (migrated to another repo) (#399) * a slightly more elegant code * use one more np function * removed some crazy slow code * faster code * Update README.md (#404) * add return_data * doc * bug fix
1 parent 17ab9c9 commit f7eefce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tensornetwork/block_tensor/block_tensor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,10 @@ def get_diagonal_blocks(self, return_data: Optional[bool] = True) -> Dict:
576576
"`get_diagonal_blocks` can only be called on a matrix, but found rank={}"
577577
.format(self.rank))
578578
return retrieve_non_zero_diagonal_blocks(
579-
data=self.data, charges=self.charges, flows=self.flows)
579+
data=self.data,
580+
charges=self.charges,
581+
flows=self.flows,
582+
return_data=return_data)
580583

581584

582585
def reshape(tensor: BlockSparseTensor,

0 commit comments

Comments
 (0)