StationQ / Liquid

The Language-Integrated Quantum Operations (LIQUi|>) Simulator
http://StationQ.github.io/Liquid
Other
440 stars 97 forks source link

[CLOSED] Liquid.CSMat from Liquid.CMat #13

Closed dbwz8 closed 8 years ago

dbwz8 commented 8 years ago

Issue by rumschuettel Saturday Feb 27, 2016 at 20:47 GMT Originally opened as https://github.com/msr-quarc/Liquid/issues/13


Hi, brief question: does Liquid.CSMat "sparsify" the matrix if given a dense CMat? Or does it keep explicit entries for all the zeroes?

dbwz8 commented 8 years ago

Comment by dbwz8 Sunday Feb 28, 2016 at 00:11 GMT


Yes. It will remove all entries sufficiently close to zero as defined by Complex.Tol (complex tolerance, which is settable). The default value is 1.0e-18. In addition it will sort the row and column values (which is required for the other sparse routines to work). This also happens after every sparse matrix multiply.