Closed
Description
Simulator methods that return multiple results can be difficult to work with, since each result object may contains a massive representation of the simulator state. An example of this can be seen in #3979 and #3990, where the simulate_expectation_value_sweep
method can't simply invoke the simulate_sweep
method for fear of generating (and storing!) all of the output states simultaneously.
To resolve this, we should modify the simulator *_sweep
methods to return Iterator
objects instead of List
s.
This would also cause sweeps to run one simulation at a time, which reduces the "black box" delay of large sweeps, and may provide opportunities for parallelizing the simulation and result-processing pipelines.