Skip to content

Return Iterator from simulator sweep methods #4064

Closed
@95-martin-orion

Description

@95-martin-orion

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 Lists.

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions