There are two strategies we can take to use sparse gates:
Allow the Qubit type to optionally have QNs (either parity or number conserving), which would make gates that conserve that symmetry to be sparse. However, this would not allow gates that do not obey the symmetry (i.e. "H" wouldn't work with QN symmetries).
Allow for arbitrary sparse gates, either by making use of Diag tensors or BlockSparse tensors. To use BlockSparse tensors (which, with block sizes of 1, allows for arbitrarily sparse tensors), I would need to make some changes on the ITensor side.
There are two strategies we can take to use sparse gates:
"H"
wouldn't work with QN symmetries).Diag
tensors orBlockSparse
tensors. To useBlockSparse
tensors (which, with block sizes of 1, allows for arbitrarily sparse tensors), I would need to make some changes on the ITensor side.