Skip to content

Generalize extra_database_entry method#504

Closed
nkanazawa1989 wants to merge 1 commit into
qiskit-community:mainfrom
nkanazawa1989:upgrade/generalize_extra_entries
Closed

Generalize extra_database_entry method#504
nkanazawa1989 wants to merge 1 commit into
qiskit-community:mainfrom
nkanazawa1989:upgrade/generalize_extra_entries

Conversation

@nkanazawa1989
Copy link
Copy Markdown
Collaborator

Summary

In #460, parameters of interest are computed based on child experiment parameters in the batch, however, there is no approach to write this workflow except for overriding _run_analysis. This needs the parent analysis to block for callback of child analysis, otherwise it fails with no entry error.

Details and comments

This PR generalize _extra_database_entry method that has been existing in CurveAnalysis. This method is designed to take analyzed dataset and compute new values to return. This part is moved to base analysis, as second callback attached to experiment data. This chained callback should be computed sequentially, thus we don't need to manage callback sync in child classes.

@chriseclectic
Copy link
Copy Markdown
Collaborator

IMO going this way clutters the base class API unnecessarily since in the context of that class it is just more analysis and should be in the subclasses run analysis method.

I think it would be better to add some configurable options to CompositeAnalysis as I started discussing in #509, that you can use when subclassing that class for specialized analysis such as you are doing in the HEAT experiment, let's discuss this in more detail offline for your specific use case there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants