Overview of the new QuTiP data layer
This post is partial documentation for the implementation of the data-layer that I wrote in the last week or so as part of Google Summer of Code with QuTiP. I may return to talk a bit more about how various algorithms are achieved internally, but for now, this is some indication of what I’ve been working on.
I had previously replaced the old fast_csr_matrix
type with the new, custom CSR
type as the data backing for Qobj
, and all internal QuTiP data representations. This produced some speed-ups in some places due to improved algorithms and better cache usage in places, but its principle advantage was the massive reduction in overhead for function calls between Python and C space, which largely affected small objects.
The full aim, however, is to have QuTiP 5 support many different data representations as the backing of Qobj
, and use the most suitable representation for the given data. This will not require every single QuTiP function to have an exponential number of versions for every possible combination of inputs, but only to have specialisations for the most common data combinations. This concept is the “data layer”.
All code examples in this post are prefixed with
>>> from qutip.core import data