Sometimes we are able to add and subtract terms form the Hamiltonian, such that we have zero terms in the sparse matrix.
We should be able to clean these terms, or at least check when the value associated with a mask is 0 so we can disregard it.
It is probably incompatible with our current scheme but being able to detect all zero terms and killing would be nice in the future!!
Below is a MVP of this issue:
a = Sigmaz(0)-Sigmaz(0)
a.L=1
print(a.get_mat().view())
Sometimes we are able to add and subtract terms form the Hamiltonian, such that we have zero terms in the sparse matrix.
We should be able to clean these terms, or at least check when the value associated with a mask is 0 so we can disregard it. It is probably incompatible with our current scheme but being able to detect all zero terms and killing would be nice in the future!!
Below is a MVP of this issue: a = Sigmaz(0)-Sigmaz(0) a.L=1 print(a.get_mat().view())
output: type: seqaij row 0: (0, 0.) row 1: (1, 0.) None
Thanks!