Skip to content
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

Update Runtime API docs to 0.13 #222

Merged
merged 3 commits into from
Oct 24, 2023
Merged

Update Runtime API docs to 0.13 #222

merged 3 commits into from
Oct 24, 2023

Conversation

Eric-Arellano
Copy link
Collaborator

@Eric-Arellano Eric-Arellano commented Oct 20, 2023

Now that we fixed #67, we can regenerate the API docs. The issues were due to changes with modern Sphinx 7.2.

There was one regression I noticed, but it's not enough of a show-stopper to block this PR: #224.

Comment on lines +45 to 49
### key\_separator = '

<span id="qiskit_ibm_runtime.RuntimeEncoder.key_separator" />
`= ':`

`= ': '`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a regression.

Now:

Screenshot 2023-10-20 at 5 19 17 PM

Before:

Screenshot 2023-10-20 at 5 19 30 PM

qiskit.org:

Screenshot 2023-10-20 at 5 19 57 PM

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah this seems like a regression, but honestly the "before" layout also doesn't look great, I don't think the = should be there at all if it's on the second line

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tracked by #224

The [`run()`](qiskit_ibm_runtime.Estimator#run "qiskit_ibm_runtime.Estimator.run") can be used to submit circuits, observables, and parameters to the Estimator primitive.
The [`run()`](#qiskit_ibm_runtime.Estimator.run "qiskit_ibm_runtime.Estimator.run") can be used to submit circuits, observables, and parameters to the Estimator primitive.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change is fine. The link still works. Although I'm not certain why it happened.

Copy link
Collaborator

Choose a reason for hiding this comment

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

are you sure this works? I just tried in prod and that syntax doesn't seem interchangeable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it still works because we create two IDs for the same headers:

Screenshot 2023-10-23 at 12 40 06 PM

The id is what allows the anchor to work.

This continues to be the case.

The other important detail is that the link is in the same file, which is why it's fine to have # in the beginning. Before, it was saying go to the file qiskit_ibm_runtime.Estimator, then use the anchor #run

@@ -73,13 +70,9 @@ Initializes the Estimator primitive.

## Attributes

<span id="estimator-circuits" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems fine to remove these. I'm not sure where we were getting them from before. I imagine the old Sphinx output - I don't think our script was dynamically computing the name estimator-circuits.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is there any specific css set with this id?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, there shouldn't be. The reason we had these <span>s is solely for # anchors. I couldn't find anywhere using these anchors in production, so removing the link seems fine.

<span id="qiskit_ibm_runtime.Estimator.circuits" />

`tuple[qiskit.circuit.quantumcircuit.QuantumCircuit, ...]`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a good change - we were saying the return type twice for some reason.

Before:

Screenshot 2023-10-20 at 5 22 15 PM

This PR:
Screenshot 2023-10-20 at 5 22 35 PM

Comment on lines -174 to +149
`Estimator.run(circuits, observables, parameter_values=None, **kwargs)`
`run(circuits, observables, parameter_values=None, **kwargs)`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change is reflected on qiskit.org, too. It's fine.

@Eric-Arellano Eric-Arellano changed the title DO NOT MERGE - Update Runtime API docs to 0.13 Update Runtime API docs to 0.13 Oct 20, 2023
@Eric-Arellano Eric-Arellano marked this pull request as ready for review October 20, 2023 21:30
Copy link
Collaborator

@javabster javabster left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@Eric-Arellano Eric-Arellano merged commit d666b50 into main Oct 24, 2023
4 checks passed
@Eric-Arellano Eric-Arellano deleted the EA/regen-runtime branch October 24, 2023 15:07
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
Now that we fixed Qiskit#67, we
can regenerate the API docs. The issues were due to changes with modern
Sphinx 7.2.

There was one regression I noticed, but it's not enough of a
show-stopper to block this PR:
Qiskit#224.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Fix regressions in API generation script
2 participants