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

Reorganize transpiler modules in API docs (cherry-pick of #1645) #1646

Merged
merged 1 commit into from
May 1, 2024

Conversation

Eric-Arellano
Copy link
Collaborator

Closes Qiskit/documentation#1240 and partially addresses Qiskit/documentation#942 for runtime.

Reduces transpiler modules

Before:

module status
qiskit.transpiler only links to passes
qiskit.transpiler.passes only links to basis and scheduling

Now:

module status
qiskit.transpiler.passes links to ConvertIdToDelay and scheduling

This saves the user clicks. Now each page is useful enough to stand on its own.

This is what the index page now looks like:

Screenshot 2024-04-30 at 4 20 41 PM

This change assumes that we will not add new modules to qiskit.transpiler for some time, such as qiskit.transpiler.my_module. If we do eventually add a new module, then we can easily revert transpiler.rst to point to qiskit_ibm_runtime.transpiler again.

This change also assumes that we won't lots of new APIs to qiskit.transpiler.passes.basis. If we do, we would want to consider going back to qiskit.transpiler.passes.basis being its own standalone page. We can do that easily if necessary in the future.

Improves header hierarchy

Options

Before, we were using bold text to act like headers. Instead, we should be using proper headers for styling, SEO, and accessibility (screen readers).

qiskit_ibm_runtime.transpiler.passes.scheduling

This PR moves the classes list to be higher in the file and fixes some of the other headers to higher heading levels.

Removes unused docstrings

The utils module is not exposed, and Kevin said it should not be since it's internal. So I deleted its docstring to make this more clear.

Closes Qiskit/documentation#1240 and partially addresses Qiskit/documentation#942 for runtime.

## Reduces `transpiler` modules

Before:

| module | status |
| --- | --- |
| qiskit.transpiler | only links to `passes` |
| qiskit.transpiler.passes | only links to `basis` and `scheduling` |
| qiskit.transpiler.passes.basis | empty, should link to ConvertIdToDelay but doesn't |
| qiskit.transpiler.passes.scheduling | useful |

Now:

| module | status |
| --- | --- |
| qiskit.transpiler.passes | links to `ConvertIdToDelay` and `scheduling` |
| qiskit.transpiler.passes.scheduling | useful |

This saves the user clicks. Now each page is useful enough to stand on its own.

This is what the index page now looks like:

<img width="689" alt="Screenshot 2024-04-30 at 4 20 41 PM" src="https://github.com/Qiskit/qiskit-ibm-runtime/assets/14852634/8cdefee6-b8a7-491d-be32-aeb974fce92b">

This change assumes that we will not add new modules to `qiskit.transpiler` for some time, such as `qiskit.transpiler.my_module`. If we do eventually add a new module, then we can easily revert `transpiler.rst` to point to `qiskit_ibm_runtime.transpiler` again.

This change also assumes that we won't lots of new APIs to `qiskit.transpiler.passes.basis`. If we do, we would want to consider going back to `qiskit.transpiler.passes.basis` being its own standalone page. We can do that easily if necessary in the future.

## Improves header hierarchy

### Options

Before, we were using bold text to act like headers. Instead, we should be using proper headers for styling, SEO, and accessibility (screen readers).

### `qiskit_ibm_runtime.transpiler.passes.scheduling`

This PR moves the `classes` list to be higher in the file and fixes some of the other headers to higher heading levels.

## Removes unused docstrings

The `utils` module is not exposed, and Kevin said it should not be since it's internal. So I deleted its docstring to make this more clear.
@Eric-Arellano Eric-Arellano requested a review from kt474 May 1, 2024 03:52
@Eric-Arellano Eric-Arellano changed the base branch from main to stable/0.23 May 1, 2024 03:53
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8905113783

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 3 files are covered.
  • 92 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.09%) to 83.704%

Files with Coverage Reduction New Missed Lines %
qiskit_ibm_runtime/estimator.py 2 97.62%
qiskit_ibm_runtime/api/clients/base_websocket_client.py 2 90.43%
qiskit_ibm_runtime/base_runtime_job.py 2 77.67%
qiskit_ibm_runtime/base_primitive.py 9 95.34%
qiskit_ibm_runtime/session.py 10 85.04%
qiskit_ibm_runtime/qiskit_runtime_service.py 67 78.89%
Totals Coverage Status
Change from base Build 8695950048: 0.09%
Covered Lines: 6277
Relevant Lines: 7499

💛 - Coveralls

@kt474 kt474 merged commit 60b894c into Qiskit:stable/0.23 May 1, 2024
20 checks passed
@Eric-Arellano Eric-Arellano deleted the cp-reorg branch May 1, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revisit the transpiler module pages for Runtime API docs
3 participants