def METHOD_NAME(self,m,rank,data,unitary=None):
    if rank == 0:
        return self.forward_spin(m,0,data)
    (start_index,end_index,spin) = self.tensor_index(m,rank)
    if not unitary:
        unitary = self.unitary(rank=rank,adjoint=True)
    data = np.einsum("ij,j...->i...",unitary,data)
    shape = np.array(np.array(data).shape[1:])
    shape[0] = end_index[-1]
    data_c = np.zeros(shape,dtype=np.complex128)
    for i in range(2**rank):
        data_c[start_index[i]:end_index[i]] = self.forward_spin(m,spin[i],data[i])
    return data_c