qiskit-experiments
qiskit-experiments copied to clipboard
Remove analysis run options
Summary
This PR addresses #120 .
Since analysis options are set in the experiment metadata, running run_analyis
with new analysis options will result in those new options conflicting with the existing ones. To avoid this, adding options via the run_analysis
method is disabled; run_analysis
will use the options given when creating the experiment.
Details and comments
I'm not really a fan of removing this for the reason's Naoki pointed out. Typically the main reason to use run_analysis
is if you are running or re-running analysis on an already ran experiment, and in those cases you may want to compare different analysis options so the natural thing to do is pass them in as kwargs to run_analysis
rather than modify the experiment to set new options and the re-run analysis on an existing data container.
Related to the above (in addition to the metadata issues Naoki described) we also have a separate issue with how re-running analysis interacts with ExperimentData and result DB for duplicate or updated analysis results. I discussed some possibilities of this with @jyu00 such as copying an returning a new ExperimentData container if it already contained analysis results, but this approach has some issues with async job that run analysis typically gets called within.
Let's discuss again when #437 is done