This commit imports an implementation of CSD from the QUILC project,
written by Juan Bello-Rivas (@jmbr).
It also includes a lot of code for implementing other functions natively in Lisp, written by Erik Davis (@kilimanjaro). These include QR, SVD, etc.
The purpose of this is to provide a regular interface to CSD for use by other packages. We solve this by providing two functions: csd-blocks (which is generic) which provides block-style results to the CSD, and csd which provides ordinary matrices.
Why expose csd-blocks? Both LAPACK, @jmbr, and various papers/documentation express the CSD algorithm in this way. QUILC, moreover, uses the block structure instead of the matrix structure directly. So it seems like a good idea to expose it.
CSD is also exposed, but it just calls CSD-BLOCKS underneath.
This code doesn't accomplish making MAGICL completely independent of LAPACK, but it moves us closer. All tests pass in MAGICL, and all tests pass in CL-QUIL. So I'm going to merge.
This commit imports an implementation of CSD from the QUILC project, written by Juan Bello-Rivas (@jmbr).
It also includes a lot of code for implementing other functions natively in Lisp, written by Erik Davis (@kilimanjaro). These include QR, SVD, etc.
The purpose of this is to provide a regular interface to CSD for use by other packages. We solve this by providing two functions:
csd-blocks
(which is generic) which provides block-style results to the CSD, andcsd
which provides ordinary matrices.Why expose
csd-blocks
? Both LAPACK, @jmbr, and various papers/documentation express the CSD algorithm in this way. QUILC, moreover, uses the block structure instead of the matrix structure directly. So it seems like a good idea to expose it.CSD
is also exposed, but it just callsCSD-BLOCKS
underneath.The companion PR https://github.com/quil-lang/quilc/pull/828 removes CSD from QUILC.
Still needed:
random-unitary
needs QR decomposition, so we'll want a Lisp version of that...mult
in Lisp