-
Notifications
You must be signed in to change notification settings - Fork 131
Adjust T1 doc strings to automatic template #260
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
Conversation
|
Yes, CI agrees with my local run |
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.
Thanks @yaelbh . If you add template, this will be applied to all module under the autosummary. If you want to apply this partly, you can do something like
https://github.com/Qiskit/qiskit-experiments/blob/36fe3134e4f1ae9e3e2b5654d7169905ac191365/qiskit_experiments/library/__init__.py#L23-L35
Please let me know if you find any difficulty.
| - :math:`offset`: Base line of the decay curve | ||
| - :math:`t1`: This is the fit parameter of main interest | ||
| #section: fit Parameters | ||
| defpar amplitude: |
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.
| defpar amplitude: | |
| defpar a: |
This is written as a in the fit model. If you want to write some word here, you may want to add \rm, i.e. \rm amplitude, since this value will be shown in the math mode and become Itaric.
| .. autosummary:: | ||
| :toctree: ../stubs/ | ||
| :template: autosummary/experiment.rst |
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.
Oh I found why it caused an error. This is a wrong template.
https://github.com/Qiskit/qiskit-experiments/blob/36fe3134e4f1ae9e3e2b5654d7169905ac191365/qiskit_experiments/library/randomized_benchmarking/__init__.py#L35
|
@nkanazawa1989 Thanks for the review, I fixed according to your comments 😄 |
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.
Thanks @yaelbh. To write options, you need to provide documentation for analysis options and experiment options in self.__AnalysisClass__._default_options and self._default_experiment_options. Here you can find an example
These options are automatically parsed (if some options are already defined in the superclass the Sphinx extension will check superclass and port documentation from there, so you don't need to write documentation multiple times) and shown in the class documentation. This will be propagated to set_*_options method in future extension.
Calibration module has already completed so you can also check this :)
|
|
||
| @classmethod | ||
| def _default_options(cls): | ||
| """Default analysis options""" |
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.
You need to list descriptions introduced in this subclass here. i.e.
| """Default analysis options""" | |
| """Default analysis options | |
| Analysis Options: | |
| t1_guess (Type): Doc | |
| amplitude_guess (Type): Doc | |
| offset_guess (Type): Doc | |
| """ |
Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
|
Current status:
|
minor fix for merge
nkanazawa1989
left a comment
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.
LGTM thanks @yaelbh
* Adjust T1 doc strings to automatic template * fixes to t1_analysis doc strings * reverting previous changes to init files * changes to init * Update qiskit_experiments/library/characterization/t1_analysis.py Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> * Update qiskit_experiments/library/characterization/t1_analysis.py Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> * document t1 options * black * typo fix * moved experiment options doc to the correct location * black * minor fix Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> Co-authored-by: knzwnao <knzwnao@jp.ibm.com>

Summary
Addressing #254, mimicking #255.
Details and comments
Currently failing (at least locally, for me, let's see how the CI reacts) with:
Please fix it (probably @eggerdj), then I guess that this PR will be ready to go.