Return tensor with with qubit indices flattened

def flatten(self) -> bk.BKTensor:
        """Return tensor with with qubit indices flattened"""
        N = self.qubit_nb
        R = self.rank
        return bk.reshape(self.tensor, [2**N]*R)