stuck getting output. matrix conversion to densematrix?