densematrix