QR bug in compliance tester
Hi, I'm implementing QR decomposition protocol with MTJ and I got stuck with this assertion in compliance_tester.clj:788. IMO, the shape of Q should not be 4x4 (at least not always). Also, some libraries don't support the :compact option (their result is always compact), so asserting shape on Q may not be a good idea.
The actual result MTJ gives is Q with shape [4 2] and R with shape [2 2] which conforms with the mathematical expectation of A = QR.
There seems to be a few options around QR decomposition. I'm keen that we try and get the right one for the API.
We currently define Q as being an orthogonal square matrix (as per Wikipedia http://en.wikipedia.org/wiki/QR_decomposition#Definitions). So shape [4 2] wouldn't be valid for Q.
Looks like MTJ is ding the compact "thin QR factorisation". So if the user asks for the full QR, it will be necessary to extend the matrix to include the zeros in order to satisfy the API as it currently stands
@prasant94 @Gerrrr any views on this?