I think the rank of a matrix is equal to the number of nonzero-eigenvalues. In the the notebook attached I tried to find combinations of the q's in order to generate zero-eigenvalues, assuming that you are interested in matrix De. Well, I arrived at four eigenvalues == 0 , so with this combinations the rank of De is 4.
Attachments: