Q matrix input