-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add supplementary information to transpiler module #4134
Conversation
qiskit/transpiler/__init__.py
Outdated
Transpiler API | ||
============== | ||
|
||
Pass Management | ||
=============== | ||
--------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add transpiler.preset_passmanagers
to the list of documented modules? There is helpful information in there about what exactly each level does, but right now it is not picked up by sphinx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already at the top-level of the documentation.
qiskit/transpiler/__init__.py
Outdated
We see that IBM Quantum devices support five native gates: four single-qubit gates | ||
[`u1`, `u2`, `u3`, and `id`] and one two-qubit entangling gate `cx`. In addition, the | ||
devices support qubit measurements (otherwise we can not read out an answer!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole section that goes into detail about u1,u2,u3,cx is a bit orthogonal to what the transpiler is. Those gates are already documented, here I think we should go into detail about different transpiler passes. Besides, these u gates are going to go obsolete soon: #4106
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok will cut out. Not sure how to reconcile the desire to talk about transpiler passes here with exposing them into the docs. Surely the passes module should discuss this. I can however link to the docs there and then the users would know exactly what is going on when someone gets around to making those docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passes are also already at top-level in the docs.
branches, and other complex behaviors. That being said, the basic building blocks | ||
follow the structure given below: | ||
|
||
.. image:: /source_images/transpiling_core_steps.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this to something more like:
Virtual circuit optimization
Decompose gates acting on 3 or more qubits
Placement on physical qubits ("layout")
Routing on restricted topology
Translate to basis
Physical circuit optimization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@ajavadia the requested changes have been made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the most part, just the layout algorithm for preset pass managers needs to be updated
needed to map a circuit onto a given device, is an important step (if not the most important) | ||
in the whole execution process. | ||
|
||
However, as with many important things in life, finding the optimal SWAP mapping is hard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, this is a bit philosophical for documentation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it is supplementary material so all bets are off.
Blocked by #4241 |
#4241 was closed. Is this ready? |
Been ready for a while now. |
requesting approval from @ajavadia and @mtreinish in that case. Thanks! |
* start adding transpiler docs * add more docs * add gate optim * tweak docs * more tweaks * requested updates * fix missing file * remove extra breaks * update default initial layout selections * fix line too long Co-authored-by: Luciano Bello <luciano.bello@ibm.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Summary
Add supplementary information that was originally in the tutorials to the transpiler module.
Details and comments