Skip to content

Copied changes to readoutAngle from qiskit-monitoring to qiskit-exper…#586

Merged
merav-aharoni merged 5 commits into
qiskit-community:mainfrom
merav-aharoni:readoutAngle
Jan 10, 2022
Merged

Copied changes to readoutAngle from qiskit-monitoring to qiskit-exper…#586
merav-aharoni merged 5 commits into
qiskit-community:mainfrom
merav-aharoni:readoutAngle

Conversation

@merav-aharoni
Copy link
Copy Markdown
Contributor

…iments

co-authored-by mattias.fitzpatrick@ibm.com

Summary

Details and comments

…iments

co-authored-by mattias.fitzpatrick@ibm.com
Copy link
Copy Markdown
Collaborator

@yaelbh yaelbh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that it's still WIP (WIP in the title, lint, tests). Anyway when you're closer to get done there are a couple of things that I suggest to do:

  1. Save an experiment to the result db, check that it looks ok on the web (that the analysis results and figures are fine), load and verify that the loaded experiment is identical to the saved one.
  2. Check if other custom analysis should be migrated to qiskit-experiments as well.

from qiskit_experiments.framework import BaseAnalysis, AnalysisResultData

from qiskit_experiments.framework import BaseAnalysis, AnalysisResultData, Options
from qiskit_experiments.framework.matplotlib import get_non_gui_ax
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this one, so someone who's familiar should check it. If other experiments work in other ways then it's suspicious.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I ran the experiment on a device and verified the results.
  2. How do you load an experiment from the web?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding get_non_gui_ax, I found this was used by curve_analysis. Perhaps @nkanazawa1989 can answer whether this is correct usage here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding your comment @yaelbh about other moving other customAnalysis functions, I will do that in a separate PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkanazawa1989 , can you please check if the usage of get_non_gui_ax is correct here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you get an answer from @nkanazawa1989 ?

Comment thread qiskit_experiments/library/characterization/analysis/readout_angle_analysis.py Outdated
Comment thread qiskit_experiments/library/characterization/analysis/readout_angle_analysis.py Outdated
]
name="readout_angle_qiskit_monitoring",
value=angle),
AnalysisResultData(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if what we want is multiple analysis results or one result with an extra parameter that stores all the extra information. Maybe consult with Mattias and Will.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattias, @wshanks can you comment on Yael's comment above.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I haven't heard much discussion in general about using separate analysis results vs. extra fields of a single result in qiskit-experiments. What makes sense to me is to use separate AnalysisResultData entries for quantities that are of interest independently and extra for quantities that are only of interest in the context of another result. Here, I think readout_angle is the only quantity of interest outside of the analysis (the others are helpful for debugging or qualifying the result value), so I would make the others extras. These quantities could be of interest for calculating something else like readout SNR, but that would probably be done in a separate analysis class.

@merav-aharoni merav-aharoni changed the title [WIP] Copied changes to readoutAngle from qiskit-monitoring to qiskit-exper… Copied changes to readoutAngle from qiskit-monitoring to qiskit-exper… Dec 30, 2021
@merav-aharoni
Copy link
Copy Markdown
Contributor Author

@yaelbh - can you approve this PR?

Copy link
Copy Markdown
Collaborator

@yaelbh yaelbh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you save an experiment to the result db, check that it looks ok on the web (that the analysis results and figures are fine), load and verify that the loaded experiment is identical to the saved one?

from qiskit_experiments.framework import BaseAnalysis, AnalysisResultData

from qiskit_experiments.framework import BaseAnalysis, AnalysisResultData, Options
from qiskit_experiments.framework.matplotlib import get_non_gui_ax
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you get an answer from @nkanazawa1989 ?

@merav-aharoni
Copy link
Copy Markdown
Contributor Author

merav-aharoni commented Jan 10, 2022

@yaelbh - 'Yes' to your first question, 'no' to your second question (I already asked twice).

@merav-aharoni merav-aharoni merged commit 2e2a79f into qiskit-community:main Jan 10, 2022
@merav-aharoni merav-aharoni deleted the readoutAngle branch January 10, 2022 12:27
nkanazawa1989 pushed a commit to nkanazawa1989/qiskit-experiments that referenced this pull request Jan 19, 2022
qiskit-community#586)

* Copied changes to readoutAngle from qiskit-monitoring to qiskit-experiments

co-authored-by mattias.fitzpatrick@ibm.com

* lint and black

* Removed qiskit_monitoring from the names

* Moved all results except for readout_angle, to be extra_results
paco-ri pushed a commit to paco-ri/qiskit-experiments that referenced this pull request Jul 11, 2022
qiskit-community#586)

* Copied changes to readoutAngle from qiskit-monitoring to qiskit-experiments

co-authored-by mattias.fitzpatrick@ibm.com

* lint and black

* Removed qiskit_monitoring from the names

* Moved all results except for readout_angle, to be extra_results
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.

3 participants