-
Notifications
You must be signed in to change notification settings - Fork 164
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
Weird NoiseLearner.run parameter type in docs #1877
Comments
Yes, that is what's going on. I'm not sure why Sphinx is expanding inlining |
I have a fix for this in the works 🚀 Working on this discovered another issue that I'm working on and blocks this. I hope to have it up tomorrow. |
Closes Qiskit#1877. We now use `EstimatorPubLike` and `SamplerPubLike` for the type hints, rather than Sphinx fully expanding the types into extremely long values shown in Qiskit#1877. To fix the type hints, we have to stop using `sphinx-autodoc-typehints` and instead use autodoc's builtin support for type hints. I didn't realize we were still using `sphinx-autodoc-typehints` - the other Qiskit projects migrated off a while ago. This PR also makes some other improvements to align with changes we made in Qiskit Addons & qiskit-ibm-transpiler: * always show inheritance in class pages for the base class * index page should show the PyPI package name in code syntax * don't show signatures in `autosummary` tables, since they're noisy * show type hints for parameters that don't have docstring ## Introduces a regression: type hints for properties Unfortunately, switching off of `sphinx-autodoc-typehints` results in Qiskit/documentation#2346. This is a quirk of autosummary that we cannot easily fix. We have a plan to fix it, although realistically won't get to it until Q1 and possibly Q2. In the meantime, consider repeating some of the type information in the docstring. For example, in ``` <Attribute id="qiskit_ibm_runtime.EstimatorV2.mode"> Return the execution mode used by this primitive. ``` You could rewrite to say ``` <Attribute id="qiskit_ibm_runtime.EstimatorV2.mode"> Return the execution mode used by this primitive, either :class:~`.Session` or ~:class:~`.Batch`. ```
) Closes #1877. We now use `EstimatorPubLike` and `SamplerPubLike` for the type hints, rather than Sphinx fully expanding the types into extremely long values shown in #1877. To fix the type hints, we have to stop using `sphinx-autodoc-typehints` and instead use autodoc's builtin support for type hints. I didn't realize we were still using `sphinx-autodoc-typehints` - the other Qiskit projects migrated off a while ago. This PR also makes some other improvements to align with changes we made in Qiskit Addons & qiskit-ibm-transpiler: * always show inheritance in class pages for the base class * index page should show the PyPI package name in code syntax * don't show signatures in `autosummary` tables, since they're noisy * show type hints for parameters that don't have docstring ## Introduces a regression: type hints for properties Unfortunately, switching off of `sphinx-autodoc-typehints` results in Qiskit/documentation#2346. This is a quirk of autosummary that we cannot easily fix. We have a plan to fix it, although realistically won't get to it until Q1 and possibly Q2. In the meantime, consider repeating some of the type information in the docstring. For example, in ``` <Attribute id="qiskit_ibm_runtime.EstimatorV2.mode"> Return the execution mode used by this primitive. ``` You could rewrite to say ``` <Attribute id="qiskit_ibm_runtime.EstimatorV2.mode"> Return the execution mode used by this primitive, either :class:~`.Session` or ~:class:~`.Batch`. ```
Describe the bug
The
NoiseLearner.run
API page describes thecircuits
input type asThat's not exactly digestible.
Steps to reproduce
Expected behavior
Suggested solutions
Additional Information
@Eric-Arellano Maybe this is trying to reference
EstimatorPubLike
in a weird way? Estimator's API doc doesn't have this issue though.cc @SamFerracin
The text was updated successfully, but these errors were encountered: