Skip to content

Increase documentation of built-in transpiler plugins (backport #13620) #13795

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

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 5, 2025

Summary

This overhauls how the qiskit.transpiler documentation talks about the transpiler plugins. All of the built-in plugins now have a decent amount of overview documentation, and the requirements and expectations for each stage of the preset pipelines is explained in more detail.

This form of the documentation makes the distinction between "a compilation routine in general" and "Qiskit's specific choice of default pipeline" clearer, to avoid confusion for advanced users.

Much of the guide-level explanations of the different preset pipeline stages moved to https://docs.quantum.ibm.com some time ago, so this PR removes those, in favour of focussing on the actual API, and inserts links to learn more about the principles elsewhere.

The guide-level explanation of scheduling is left in-place for now, because the content on the other parts of the IBM documentation isn't as complete for that.

Details and comments

I've attempted to draw a good line between explaining what Qiskit actually does, so users know, and maintaining that we reserve the right to modify specifics of things (especially default plugins) between minor versions.

This isn't a full rewrite of everything - I feel like we could probably do with revisiting the documentation of a lot of individual transpiler passes' classes - but I was writing my own plugin over the last month or so, and this is documentation I personally wanted to see.


This is an automatic backport of pull request #13620 done by Mergify.

@mergify mergify bot added the conflicts used by mergify when there are conflicts in a port label Feb 5, 2025
@mergify mergify bot requested a review from a team as a code owner February 5, 2025 19:31
Copy link
Contributor Author

mergify bot commented Feb 5, 2025

Cherry-pick of 4d2265f has failed:

On branch mergify/bp/stable/1.3/pr-13620
Your branch is up to date with 'origin/stable/1.3'.

You are currently cherry-picking commit 4d2265f62.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   qiskit/transpiler/layout.py
	modified:   qiskit/transpiler/passes/scheduling/scheduling/alap.py
	modified:   qiskit/transpiler/passes/scheduling/scheduling/asap.py
	modified:   qiskit/transpiler/preset_passmanagers/__init__.py
	modified:   qiskit/transpiler/preset_passmanagers/plugin.py
	modified:   releasenotes/notes/0.24/add-layout-attribute-c84e56c08ca93ada.yaml
	modified:   releasenotes/notes/1.1/add-elide-swaps-b0a4c373c9af1efd.yaml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   qiskit/transpiler/__init__.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@github-actions github-actions bot added documentation Something is not clear or an error documentation Changelog: None Do not include in changelog labels Feb 5, 2025
@coveralls
Copy link

coveralls commented Feb 5, 2025

Pull Request Test Coverage Report for Build 13168405910

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 24 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 88.913%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
crates/qasm2/src/lex.rs 5 92.23%
crates/qasm2/src/parse.rs 18 96.69%
Totals Coverage Status
Change from base Build 13161813023: -0.02%
Covered Lines: 79155
Relevant Lines: 89025

💛 - Coveralls

* Increase documentation of built-in transpiler plugins

This overhauls how the `qiskit.transpiler` documentation talks about the
transpiler plugins.  All of the built-in plugins now have a decent
amount of overview documentation, and the requirements and expectations
for each stage of the preset pipelines is explained in more detail.

This form of the documentation makes the distinction between "a
compilation routine in general" and "Qiskit's specific choice of default
pipeline" clearer, to avoid confusion for advanced users.

Much of the guide-level explanations of the different preset pipeline
stages moved to https://docs.quantum.ibm.com some time ago, so this PR
removes those, in favour of focussing on the actual API, and inserts
links to learn more about the principles elsewhere.

The guide-level explanation of scheduling is left in-place for now,
because the content on the other parts of the IBM documentation isn't as
complete for that.

* Fix cross references in release notes

* Include Elena's suggestions

Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>

* Apply copy-editing suggestions

Co-authored-by: abbycross <across@us.ibm.com>

* Add manual copy-editing suggestions

* Reflow text

* Copy edit

Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>

* Add missed copy edit

Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>

* Reflow line breaks

* Apply Elena's suggestions

Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>

* Apply Elena's suggestions that needed line wraps

* Correct layout description

* Mark stochastic plugin as deprecated

---------

Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
(cherry picked from commit 4d2265f)
@jakelishman jakelishman force-pushed the mergify/bp/stable/1.3/pr-13620 branch from cb41b1d to d3fee66 Compare February 5, 2025 23:19
@jakelishman jakelishman removed the conflicts used by mergify when there are conflicts in a port label Feb 5, 2025
@jakelishman jakelishman enabled auto-merge February 5, 2025 23:19
@jakelishman jakelishman added this pull request to the merge queue Feb 6, 2025
Merged via the queue into stable/1.3 with commit 40c1c39 Feb 6, 2025
19 checks passed
@mtreinish mtreinish deleted the mergify/bp/stable/1.3/pr-13620 branch February 19, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog documentation Something is not clear or an error documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants