For block-sparse tensors, an identical dense shape of two legs is not sufficient for their contraction. Flows and charges have to match as well. tn.connect is currently not checking this. An error is eventually raised upon contraction, but we could detect it earlier already when connecting two legs
Yeah, we could add a is_connectable method to the backends. So BaseBackend would always return True/check the dimensions, and then your could do specific checks for the symmetric backend.
For block-sparse tensors, an identical dense shape of two legs is not sufficient for their contraction. Flows and charges have to match as well.
tn.connect
is currently not checking this. An error is eventually raised upon contraction, but we could detect it earlier already when connecting two legs