qiskit-community / qiskit-dynamics

Tools for building and solving models of quantum systems in Qiskit
https://qiskit-community.github.io/qiskit-dynamics/
Apache License 2.0
106 stars 60 forks source link

Control parallelization of fixed step solvers #81

Open brosand opened 2 years ago

brosand commented 2 years ago

What is the expected behavior?

When a parallel solver is used, the solver attempts to parallelize over every single time step that is being solved. As a result, these parallel solvers use massive amounts of memory. In order to enable these solvers to be used at higher dimensions, or over longer time periods, some functionality should be added which limits how many steps are parallelized at once.

A couple different ways to do this:

DanPuzzuoli commented 2 years ago

To add to the main comment: The parallel solver looping structure is implemented in the function fixed_step_lmde_solver_parallel_template_jax, in the solvers/fixed_step_solvers.py file.