Setters for everything other than signals and in_frame_basis are being removed. I had wanted to make these classes fully immutable but the ability to set these two properties is used quite a bit throughout the solver infrastructure and I don't want to additionally make a change of this scale at this time. (In any case the main mutability issue had to do with the operators, so for now it's okay to keep signals and in_frame_basis as mutable.)
Changed evaluation_mode to array_library
For LindbladModel, will also add a “vectorized” boolean
To use array_library=“scipy_sparse” or "jax_sparse", a user MUST pass this as array_library.
This is how it used to be before so it isn't such a big deal - the user will need to pass the arrays in dense format, then they will be converted to sparse format internally. This isn't desirable but I'm willing to accept it for now as it would only be an issue for extremely large models.
Other to do:
Add breaking release note for these changes
Details and comments
General notes:
I changed around the way that HamiltonianModel relies on the methods GeneratorModel, but the actual user-side behaviour has not changed (aside from the same changes made to GeneratorModel).
Summary
Updates the model classes to use arraylias.
Files to update:
Interface changes:
copy
method has been removedsignals
andin_frame_basis
are being removed. I had wanted to make these classes fully immutable but the ability to set these two properties is used quite a bit throughout the solver infrastructure and I don't want to additionally make a change of this scale at this time. (In any case the main mutability issue had to do with the operators, so for now it's okay to keepsignals
andin_frame_basis
as mutable.)evaluation_mode
toarray_library
LindbladModel
, will also add a “vectorized” booleanarray_library=“scipy_sparse”
or"jax_sparse"
, a user MUST pass this asarray_library
.Other to do:
Details and comments
General notes:
HamiltonianModel
relies on the methodsGeneratorModel
, but the actual user-side behaviour has not changed (aside from the same changes made toGeneratorModel
).Test files that need to run before merge:
test.dynamics.models.test_lindblad_model
test.dynamics.models.test_hamiltonian_model
test.dynamics.models.test_generator_model
test.dynamics.models.rotating_frame
test.dynamics.models.operator_collections
test.dynamics.arraylias
(whole folder)