Closed DanPuzzuoli closed 10 months ago
Hello Daniel, I would take a look at it and give it a shot.
I agree, it like the choice to leave the DynamicsBackend.run
method as is and add a new DynamicsBackend.solve
which corresponds to the Solver.solve
method.
Can you assign the ticket to me?
Thanks!
When calling DynamicsBackend.solve(...)
, shall we
solver.solve
into a DynamicsJob
similar to the DynamicsBackend.run
function, leading to placing the OdeResult
s into a Result
orsolver.solve
interface and just return the Union[OdeResult, List[OdeResult]]
?I actually think I prefer option two, as it gives more direct access to the results of interest avoiding the detour to Job.result.results()
.
What we loose with this additional datastructure from Result
, for example saving the metadata
from the schedules, etc.
What do you think?
I agree. The job interface in Dynamics serves no purpose other than to imitate the container objects returned by a real backend. The solve
method doesn't fit into the backend framework, so there's really no reason to use DynamicsJob
.
Currently
DynamicsBackend.run
, is the only method ofDynamicsBackend
for running simulations. In accordance with the standard backend interfaces, it performs a state simulation and returns a probability dict.It would be good to have a public interface just for ODE simulation with arbitrary "states" (including unitary simulation) - basically the equivalent of
Solver.solve
, but in which a user can take advantage of circuit transpilation. I think it probably makes sense to add a newDynamicsBackend.solve
method for this. (The other option would be to add options toDynamicsBackend.run
, but this would completely change the output type, and therefore complicate the interface, and also take it out of line with generalbackend.run
.)