-
Notifications
You must be signed in to change notification settings - Fork 131
Add fit model to curve analysis #238
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
Merged
nkanazawa1989
merged 12 commits into
qiskit-community:main
from
nkanazawa1989:upgrade/math_model
Aug 20, 2021
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2d58a8c
add fit model metadata
78c00df
update curve fit test
f2310fd
update ub test
54cd51e
black
6d18289
fit model description defaults to None
b3e96ef
Merge branch 'main' of github.com:Qiskit/qiskit-experiments into upgr…
a2518b0
fix descriptions
04184c1
update rb test cache files
29386f8
add reno
2af5c2d
fix typo
ee264b0
update reno
abc1d70
Merge branch 'main' into upgrade/math_model
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,8 @@ | ||
| --- | ||
| other: | ||
| - | | ||
| ``model_description`` is added to | ||
| :py:class:`~qiskit_experiments.curve_analysis.curve_data.SeriesDef`. | ||
| This field stores the string representation of the fit model of the curve. | ||
| This information is appended to the analysis result and will be | ||
| saved in the result database (if possible). |
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
test/randomized_benchmarking/rb_interleaved_1qubit_output_analysis.json
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| [{"name": "@Parameters_InterleavedRBAnalysis", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": {"__type__": "array", "__value__": [0.5116650227730736, 0.9994768276408555, 0.9979725591597532, 0.4884021095472425]}, "stderr": {"__type__": "array", "__value__": [0.006437954091857918, 1.4847358402650982e-05, 6.882915444481367e-05, 0.006675424355241532]}, "unit": null}}}, "extra": {"popt_keys": ["a", "alpha", "alpha_c", "b"], "dof": 16, "covariance_mat": {"__type__": "array", "__value__": [[4.144725288887011e-05, 4.533933132185307e-08, 3.746653829699993e-07, -4.023979858687134e-05], [4.5339331321853074e-08, 2.2044405153677072e-10, 6.432549372321611e-10, -6.928087572143161e-08], [3.746653829699994e-07, 6.432549372321611e-10, 4.737452501588013e-09, -4.2638270013676844e-07], [-4.023979858687135e-05, -6.92808757214316e-08, -4.2638270013676844e-07, 4.456129032255182e-05]]}}}, {"name": "alpha", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9994768276408555, "stderr": 1.4847358402650982e-05, "unit": null}}}, "extra": {}}, {"name": "alpha_c", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9979725591597532, "stderr": 6.882915444481367e-05, "unit": null}}}, "extra": {}}, {"name": "EPC", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.0010137204201233763, "stderr": 3.4414577222406835e-05, "unit": null}}}, "extra": {"EPC_systematic_err": 0.0010137204201233763, "EPC_systematic_bounds": [0.0, 0.0020274408402467525]}}] | ||
| [{"name": "@Parameters_InterleavedRBAnalysis", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": {"__type__": "array", "__value__": [0.5034561671663651, 0.9994727949681657, 0.9977551279697571, 0.49581463461118536]}, "stderr": {"__type__": "array", "__value__": [0.010251156479303655, 2.5780778918330006e-05, 0.00012837420188229864, 0.010490177588586015]}, "unit": null}}}, "extra": {"popt_keys": ["a", "alpha", "alpha_c", "b"], "dof": 16, "covariance_mat": {"__type__": "array", "__value__": [[0.00010508620916316932, 1.0217443095675483e-07, 1.0661366451271264e-06, -9.865292651801042e-05], [1.0217443095675484e-07, 6.646485616358089e-10, 1.943773589454093e-09, -1.776204727970427e-07], [1.0661366451271262e-06, 1.9437735894540925e-09, 1.6479935708917166e-08, -1.233244622053204e-06], [-9.865292651801042e-05, -1.776204727970427e-07, -1.233244622053204e-06, 0.0001100438258400723]]}, "fit_models": {"Standard": "a \\alpha^{x} + b", "Interleaved": "a (\\alpha_c\\alpha)^{x} + b"}}}, {"name": "alpha", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9994727949681657, "stderr": 2.5780778918330006e-05, "unit": null}}}, "extra": {}}, {"name": "alpha_c", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9977551279697571, "stderr": 0.00012837420188229864, "unit": null}}}, "extra": {}}, {"name": "EPC", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.001122436015121464, "stderr": 6.418710094114932e-05, "unit": null}}}, "extra": {"EPC_systematic_err": 0.001122436015121464, "EPC_systematic_bounds": [0.0, 0.002244872030242928]}}] |
2 changes: 1 addition & 1 deletion
2
test/randomized_benchmarking/rb_interleaved_1qubit_output_data.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
test/randomized_benchmarking/rb_interleaved_2qubits_output_analysis.json
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| [{"name": "@Parameters_InterleavedRBAnalysis", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": {"__type__": "array", "__value__": [0.7342127078996477, 0.9884063217136179, 0.9927651616883224, 0.2543568492711422]}, "stderr": {"__type__": "array", "__value__": [0.004948839577232964, 0.00020370367690368603, 0.00044396411042263065, 0.004356375518781768]}, "unit": null}}}, "extra": {"popt_keys": ["a", "alpha", "alpha_c", "b"], "dof": 16, "covariance_mat": {"__type__": "array", "__value__": [[2.4491013161187343e-05, 5.236454920804876e-07, 1.2793043417064756e-06, -1.6442242444492406e-05], [5.236454920804876e-07, 4.149518798408131e-08, 4.9409520508775484e-08, -7.419439279427566e-07], [1.2793043417064754e-06, 4.940952050877548e-08, 1.971041313433578e-07, -1.5342339511770156e-06], [-1.6442242444492406e-05, -7.419439279427566e-07, -1.5342339511770158e-06, 1.8978007660641124e-05]]}}}, {"name": "alpha", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9884063217136179, "stderr": 0.00020370367690368603, "unit": null}}}, "extra": {}}, {"name": "alpha_c", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9927651616883224, "stderr": 0.00044396411042263065, "unit": null}}}, "extra": {}}, {"name": "EPC", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.005426128733758195, "stderr": 0.000332973082816973, "unit": null}}}, "extra": {"EPC_systematic_err": 0.01196438869581501, "EPC_systematic_bounds": [0, 0.017390517429573205]}}] | ||
| [{"name": "@Parameters_InterleavedRBAnalysis", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": {"__type__": "array", "__value__": [0.7251425386126389, 0.9874511785804855, 0.9927473424015756, 0.2664779856707594]}, "stderr": {"__type__": "array", "__value__": [0.005664202737254954, 0.00020569131958238083, 0.00039769928395310864, 0.005864117641934524]}, "unit": null}}}, "extra": {"popt_keys": ["a", "alpha", "alpha_c", "b"], "dof": 16, "covariance_mat": {"__type__": "array", "__value__": [[3.208319264872652e-05, 1.0448534717564974e-06, 1.627583546356998e-06, -3.285490958063846e-05], [1.0448534717564977e-06, 4.230891895154112e-08, 5.057408974150914e-08, -1.106317359642681e-06], [1.627583546356998e-06, 5.057408974150913e-08, 1.5816472045681535e-07, -1.750695025460556e-06], [-3.285490958063846e-05, -1.106317359642681e-06, -1.750695025460556e-06, 3.438787571844772e-05]]}, "fit_models": {"Standard": "a \\alpha^{x} + b", "Interleaved": "a (\\alpha_c\\alpha)^{x} + b"}}}, {"name": "alpha", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9874511785804855, "stderr": 0.00020569131958238083, "unit": null}}}, "extra": {}}, {"name": "alpha_c", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9927473424015756, "stderr": 0.00039769928395310864, "unit": null}}}, "extra": {}}, {"name": "EPC", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.005439493198818313, "stderr": 0.00029827446296483147, "unit": null}}}, "extra": {"EPC_systematic_err": 0.01338373893045347, "EPC_systematic_bounds": [0, 0.018823232129271783]}}] |
2 changes: 1 addition & 1 deletion
2
test/randomized_benchmarking/rb_interleaved_2qubits_output_data.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
test/randomized_benchmarking/rb_standard_1qubit_output_analysis.json
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| [{"name": "@Parameters_RBAnalysis", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": {"__type__": "array", "__value__": [0.9967817420311399, 0.9997606942463159, 2.813384952009873e-13]}, "stderr": {"__type__": "array", "__value__": [1.5428416345109068, 0.00041321430695411904, 1.5480528890603416]}, "unit": null}}}, "extra": {"popt_keys": ["a", "alpha", "b"], "dof": 7, "covariance_mat": {"__type__": "array", "__value__": [[2.3803603091802867, 0.0006371615470064913, -2.388380804138054], [0.0006371615470064913, 1.7074606347157292e-07, -0.0006393835737758766], [-2.388380804138054, -0.0006393835737758766, 2.3964677473280704]]}}}, {"name": "alpha", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.9997606942463159, "stderr": 0.00041321430695411904, "unit": null}}}, "extra": {}}, {"name": "EPC", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.00011965287684206904, "stderr": 0.00020660715347705952, "unit": null}}}, "extra": {}}, {"name": "EPG_x", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.0005083368294731997, "stderr": null, "unit": null}}}, "extra": {}}] | ||
| [{"name": "@Parameters_RBAnalysis", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": {"__type__": "array", "__value__": [0.35777153783730536, 0.999206126929566, 0.6424033472489555]}, "stderr": {"__type__": "array", "__value__": [0.13354619096959772, 0.0004296014698631278, 0.1381255753346132]}, "unit": null}}}, "extra": {"popt_keys": ["a", "alpha", "b"], "dof": 7, "covariance_mat": {"__type__": "array", "__value__": [[0.017834585122488263, 5.677840091061019e-05, -0.018423379167709843], [5.67784009106102e-05, 1.8455742290855988e-07, -5.902946904590408e-05], [-0.018423379167709843, -5.902946904590408e-05, 0.019078674561517905]]}, "fit_models": {"Series-0": "a \\alpha^x + b"}}}, {"name": "alpha", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.999206126929566, "stderr": 0.0004296014698631278, "unit": null}}}, "extra": {}}, {"name": "EPC", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.00039693653521699623, "stderr": 0.0002148007349315639, "unit": null}}}, "extra": {}}, {"name": "EPG_x", "value": {"__type__": "__object__", "__value__": {"__name__": "FitVal", "__module__": "qiskit_experiments.database_service.db_fitval", "__kwargs__": {"value": 0.001687416879912102, "stderr": null, "unit": null}}}, "extra": {}}] |
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.
Good catch.