pytenet.block_sparse_util¶
utility functions for handling block-sparse tensors with quantum number conservation.
Functions
|
Compute the block-wise diagonalization of a Hermitian matrix a, taking the block sparsity structure dictated by quantum numbers into account (that is, a[i, j] can only be non-zero if q0[i] == q0[j]). |
|
Compute the block-wise QR decompositions of a matrix, taking block sparsity structure dictated by quantum numbers into account (that is, a[i, j] can only be non-zero if q0[i] == q1[j]). |
|
Compute the block-wise SVD of a block-sparse matrix. |
|
Find common quantum numbers between two lists of quantum numbers. |
|
Enforce sparsity pattern on a based on quantum numbers. |
|
Test whether sparsity structure of a matches quantum numbers, i.e., if the quantum numbers corresponding to non-zero entries in a sum to zero. |
|
Combine quantum numbers into a single vector. |
|
Compute the sum of all combinations of quantum numbers in qnums, and return the result as a tensor. |
|
Assuming the quantum numbers are sorted, find the first and last indices at which a given quantum number appears. |
|
Sorts a matrix according to quantum numbers. |