-
Notifications
You must be signed in to change notification settings - Fork 131
Autodoc migration for RB #255
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
Autodoc migration for RB #255
Conversation
qiskit_experiments/library/randomized_benchmarking/interleaved_rb_analysis.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/library/randomized_benchmarking/interleaved_rb_analysis.py
Show resolved
Hide resolved
| the interleaved gate error. See Ref. [1] for details. | ||
| See :class:`InterleavedRBAnalysis` documentation for additional | ||
| information on interleaved RB experiment analysis. |
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.
Do we really want to remove this sentence? Maybe it can be helpful.
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.
Do we need this? Because another dedicated section for analysis class reference is generated and other experiment class doesn't write this.
| `arXiv:quant-ph/1203.4550 <https://arxiv.org/pdf/1203.4550>`_ | ||
| Analysis Class | ||
| :class:`InterleavedRBAnalysis` |
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.
Maybe it's good to refer to the corresponding analysis class
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.
It's automatically generated.
| - **lengths**: A list of RB sequences lengths. | ||
| - **num_samples**: Number of samples to generate for each sequence length. | ||
| - **interleaved_element**: The element to interleave, | ||
| given either as a group element or as an instruction/circuit |
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.
Why was this section removed?
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.
It's automatically generated.
|
Thanks @yaelbh for the comments. I reverted some changes. |
* autodoc migration * remove change * revert changes Co-authored-by: Helena Zhang <Helena.Zhang@ibm.com>
Summary
This is an example of how to migrate to autodoc syntax.
What you need to do is
:template:underautosummarydirective# section: overviewAnalysisClass._default_optionsmethod **ExperimentClass._default_experiment_optionsmethod **defparsyntax for fit parameter description** Use Google style docstring. Documentation of arguments in the superclass is automatically extracted so you only need to write documentation for newly introduced argument in the class.
Tips for math
To write math equations, you need to avoid writing something like
**n,e**(a+b),a*b,3*xetc... Note that in the math directive you need to use standard latex syntax.Details and comments
See example documentation for available syntax.
https://github.com/Qiskit/qiskit-experiments/blob/a8b0210f5a6eed2d13e5129e15e766b6a0e7fd2f/docs/_ext/custom_styles/example/example_experiment.py#L120-L170
Local build
For the first time
I added one package to the
requirements-devso you may need-roption to recreate the environment This will take some itme. If you have already renewed the environment after #116,-ris not necessary.