Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
flowerthrower opened this issue Aug 25, 2023 · 1 comment

Comments

@flowerthrower
Copy link
Contributor

flowerthrower commented Aug 25, 2023

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.

@flowerthrower flowerthrower changed the title Refactoring dynamics.py to use dense and sparse format of v5 Qobj Refactoring of optimization to use dense and sparse format of v5 Qobj Aug 25, 2023
@ajgpitch
Copy link
Member

ajgpitch commented Sep 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants