In #1360, there was some discussion that we give up performance in order to allow experiments to be extended with additional data. We should look at how much ExperimentData could benefit from only allowing a fixed set of data and if it would be better to write a function that could run analysis on multiple ExperimentData objects. Or perhaps calling .run() a second time should generate a new ExperimentData object and new experiment ID that combines the old data and the new data? Perhaps there would need to be a new method .extend_run() instead of changing run.
Another option would be to stop over-engineering. We currently allow users to run experiment on existing experiment data to get more statistically confident result. But I don't think this is heavy used feature and we can remove. In principle we run very expensive operation for the sake of something useless; if we have 100 xvals, we need to iterate over them and create new table with size=1 to average... Even if we switch to polars there still be overhead of object creation.
In #1360, there was some discussion that we give up performance in order to allow experiments to be extended with additional data. We should look at how much
ExperimentData
could benefit from only allowing a fixed set of data and if it would be better to write a function that could run analysis on multipleExperimentData
objects. Or perhaps calling.run()
a second time should generate a newExperimentData
object and new experiment ID that combines the old data and the new data? Perhaps there would need to be a new method.extend_run()
instead of changing run._Originally posted by @nkanazawa1989 in https://github.com/Qiskit-Extensions/qiskit-experiments/pull/1360#discussion_r1480133699_