-
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
Add option to control figure generation in composite experiments #1240
Merged
coruscating
merged 29 commits into
qiskit-community:main
from
coruscating:selective-figure-generation
Oct 16, 2023
Merged
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
42155b6
add selective figure generation param
coruscating 68473cd
expose compositeexperiment and update tutorial
coruscating bbc49a9
fix bug in curve analysis code
coruscating 7f34d93
lint
coruscating eb4d03d
update docs
coruscating 1a3d02f
Merge remote-tracking branch 'upstream/main' into selective-figure-ge…
coruscating 5fc1017
update test
coruscating b8defd2
update tests
coruscating c358938
add selective figure generation param
coruscating 4ac13a1
expose compositeexperiment and update tutorial
coruscating eb2f8ce
fix bug in curve analysis code
coruscating fdfcec5
lint
coruscating 31f7778
update docs
coruscating 9f7cb6f
update test
coruscating b3997cf
update tests
coruscating f12a3bf
Merge branch 'selective-figure-generation' of github.com:coruscating/…
coruscating c0cdedd
fixed logic and added compositecurveanalysis test
coruscating 6a2c3e3
update howto
coruscating 0cc6a16
fix test
coruscating c32423b
update quality criteria for analysis classes
coruscating 23d8525
lint
coruscating 7ba1285
Merge remote-tracking branch 'upstream/main' into selective-figure-ge…
coruscating f198864
merged main
coruscating e8eced9
address review comments
coruscating 63a3b1c
Merge branch 'main' into selective-figure-generation
coruscating fdedbf4
fix composite experiment classes
coruscating af2d930
Merge branch 'selective-figure-generation' of github.com:coruscating/…
coruscating 39d6ce1
lint
coruscating 2de644c
Merge branch 'main' into selective-figure-generation
coruscating 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Control figure generation | ||
========================= | ||
|
||
Problem | ||
------- | ||
|
||
You want to change the default behavior where figures are generated with every experiment. | ||
|
||
Solution | ||
-------- | ||
|
||
For a single non-composite experiment, figure generation can be switched off by setting the analysis | ||
option ``plot`` to ``False``: | ||
|
||
.. jupyter-input:: | ||
|
||
experiment.analysis.set_options(plot = False) | ||
|
||
For composite experiments, there is a ``generate_figures`` parameter which controls how child figures are | ||
generated. There are three options: | ||
|
||
- ``always``: The default behavior, generate figures for each child experiment. | ||
- ``never``: Never generate figures for any child experiment. | ||
- ``selective``: Only generate figures for analysis results where ``quality`` is ``bad``. This is useful | ||
for large composite experiments where you only want to examine qubits with problems. | ||
|
||
This parameter should be set upon composite experiment instantiation: | ||
|
||
.. jupyter-input:: | ||
|
||
parallel_exp = ParallelExperiment( | ||
[T1(physical_qubits=(i,), delays=delays) for i in range(2)], generate_figures="selective" | ||
) | ||
|
||
Discussion | ||
---------- | ||
|
||
These options are useful for large composite experiments, where generating all figures incurs a significant | ||
overhead. | ||
|
||
See Also | ||
-------- | ||
|
||
* The `Visualization tutorial <visualization.html>`_ discusses how to customize figures |
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
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
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
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.
This
chisq > 0
condition has been added toquality=good
because of edge cases where zerochisq
is a sign that something is wrong (in this case, running RB with only one sample per length)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.
Thank you for the explanation. This change itself makes sense to me. (I'm not sure we can really determine if a fit is good or bad based on a single value, though, but I know it's another issue.)