qutip/qutip-qtrl

Refactoring of optimization to use dense and sparse format of v5 Qobj

Opened this issue · 1 comments

Checks like

if dtype == Qobj: ...
if dtype == np.ndarray: ...

can be found all over dynamics.py (and other optimization related files). This is done to distinguish between "dense" and "sparse" representations.
The new data layer structure in v5, however, supports both types within the Qobj class.
Therefore dynamics.py and related tests should be adapted to the v5 changes.

Thanks for raising this. When tackling this, one should remember that the checks for if dtype == ... are dotted around in other files too, so best to grep around and check.