distinguish between ndarrays of Qobjs and a full ndarray matrix for basis transform