-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework experiment options #39
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fc550fa
Rework option handling in base classes
chriseclectic aabfb62
Update experiments
chriseclectic e111c59
Add more documentation
chriseclectic 17c03af
Simply analysis options
chriseclectic 86ed278
Fixup `run_analysis`
chriseclectic df283aa
Fix rebase / doc errors
chriseclectic d21cd45
Remove _transpile from BaseExperiment
chriseclectic ae949ec
Address review comments
chriseclectic a89fd47
Fix RB experiment
chriseclectic c5479e3
Fix T2Star experiment
chriseclectic 58ee4d4
Remove kwargs from Experiment.analysis class meth
chriseclectic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
options
contains both immutable and runtime options? This overrides class default setting in constructor and runtime. For me it looks too flexible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was matching the current way options are handled for simulators. When a class is initialized it initializes a copy of the default options specified in the class design, and then everything in options is mutable. For analysis options it's currently coded so you can pass option values at construction
Analysis(**options)
which is equivalent to setting them after default construction,Analysis().set_options(**options)
. These are equivalent. TheAnalysis.run
method can also be called with options, which will override any stored values inanalysis.options
just for that execution, without changing any of the stored options.However thinking about this more, since analysis options are also stored in experiment maybe this is overkill and we could remove the
set_options
ahd just have the default options andrun(**options)
to override them to keep the analysis clas more like a function without side effects (like it was before). I'll try make some changes to simplify this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thank you :)