qiskit-optimization icon indicating copy to clipboard operation
qiskit-optimization copied to clipboard

Documentation of qiskit.optimization.INFINITY looks strange

Open t-imamichi opened this issue 5 years ago • 3 comments

What is the expected enhancement?

INFINITY is a constant to represent the infinite number. The current description seems to be strange.

Convert a string or number to a floating point number, if possible.

https://qiskit.org/documentation/stubs/qiskit.optimization.INFINITY.html#infinity

t-imamichi avatar May 11 '20 09:05 t-imamichi

Yes, I saw that. I tried with some constants in the operator code to do better. In the end I just listed the constants with a description rather than linking to the entity. For a simple entity like this I was going to change it to be similar, since it does not need to be so prominent

woodsp-ibm avatar May 11 '20 10:05 woodsp-ibm

@woodsp-ibm seems like Sphinx does not parse docstrings and #: style comments for the variables at the module level. I tried to add a constant at the class level and properly commented it and everything is fine in the generated documentation. Also my IDE provides me with the same docstring for the float function. So, I think Sphinx actually takes it from the standard documentation for an unknown reason.

adekusar-drl avatar Jul 14 '20 17:07 adekusar-drl

@adekusar-drl I had a thought on changing this that I shared earlier. To me in come out in the present docs much too prominently for my taste. I had not given this the highest priority to look at but had expected to do something ahead of the next release.

woodsp-ibm avatar Jul 14 '20 18:07 woodsp-ibm

That link is dead, I suppose this issue could be closed?

3yakuya avatar Nov 14 '23 19:11 3yakuya

The docs were moved and it looks like redirect that was in place has been discontinued. It can be seen here now

https://qiskit.org/ecosystem/optimization/apidocs/qiskit_optimization.html

image

woodsp-ibm avatar Nov 14 '23 19:11 woodsp-ibm