[MAT-482] Add QR wiring to DOGMA.

This adds and tests the QR functionality in the DOGMA class.