Methods for writing/reading the Q-matrix implemented.