Update Solver.solve to take signals as an argument, rather than passing them to the constructor of Solver or by setting the Solver.signals property.
Update Solver.solve to perform lists of simulations by specifying t_span, y0, and/or signals as lists of valid single inputs. This can be controlled by setting all as lists of the same length, or by setting only some as lists of the same length, and the others as a single input to be used repeatedly.
In connection with the above, secondary changes are:
A new rwa_carrier_freqs argument has been added to the Solver constructor for specifying the carrier frequencies relative to which the rotating wave approximation should be performed. This information used to be extracted from the signal arguments to the constructor. During the deprecation period, if both signals and rwa_carrier_freqs are passed to the constructor, rwa_carrier_freqs will take precedence.
The hamiltonian_signals and dissipator_signals arguments to the Solver constructor are deprecated.
The Solver.signals property has been deprecated.
The Solver.copy method has been deprecated. It is no longer needed now that the object no longer internally stores signals.
All deprecation warnings indicate that the deprecated behaviour will be removed in the next major release.
Details and comments
The old behaviour is preserved - if a user specifies signals at instantiation or via the signals property, and doesn't pass signals to Solver.solve, the solver will fall back on the signals stored in the signals property.
When calling Solver.solve with a single simulation, the results will be returned as before in an OdeResult instance, however if a list of simulations is specified, the results will be returned in a list of OdeResult instances.
Tests updates:
Tests have been added checking that deprecation warnings are raised, and that deprecated behaviour still works.
Tests have been added verifying that running a list of simulations using a single call to solve is consistent with running only a single simulation.
Existing tests have been updated to pass signals to Solver.solve rather than at instantiation or through the property.
Documentation updates:
(Deprecated) has been added to the beginning of the doc string for every property, method, and argument that has been deprecated.
The Solver.solve method doc has been updated to include a description + examples of specifying a list of simulations.
All tutorials have been updated to pass signals to the solve method.
Summary
The main purposes of this PR are:
Solver.solve
to take signals as an argument, rather than passing them to the constructor ofSolver
or by setting theSolver.signals
property.Solver.solve
to perform lists of simulations by specifyingt_span
,y0
, and/orsignals
as lists of valid single inputs. This can be controlled by setting all as lists of the same length, or by setting only some as lists of the same length, and the others as a single input to be used repeatedly.In connection with the above, secondary changes are:
rwa_carrier_freqs
argument has been added to theSolver
constructor for specifying the carrier frequencies relative to which the rotating wave approximation should be performed. This information used to be extracted from the signal arguments to the constructor. During the deprecation period, if both signals andrwa_carrier_freqs
are passed to the constructor,rwa_carrier_freqs
will take precedence.hamiltonian_signals
anddissipator_signals
arguments to theSolver
constructor are deprecated.Solver.signals
property has been deprecated.Solver.copy
method has been deprecated. It is no longer needed now that the object no longer internally stores signals.All deprecation warnings indicate that the deprecated behaviour will be removed in the next major release.
Details and comments
signals
property, and doesn't passsignals
toSolver.solve
, the solver will fall back on the signals stored in thesignals
property.Solver.solve
with a single simulation, the results will be returned as before in anOdeResult
instance, however if a list of simulations is specified, the results will be returned in a list ofOdeResult
instances.solve
is consistent with running only a single simulation.signals
toSolver.solve
rather than at instantiation or through the property.(Deprecated)
has been added to the beginning of the doc string for every property, method, and argument that has been deprecated.Solver.solve
method doc has been updated to include a description + examples of specifying a list of simulations.signals
to thesolve
method.Note that most lines added are due to tests.