Transpiler (qiskit.transpiler
)¶
Overview¶
Transpilation is the process of rewriting a given input circuit to match the topology of a specific quantum device, and/or to optimize the circuit for execution on present day noisy quantum systems.
Most circuits must undergo a series of transformations that make them compatible with a given target device, and optimize them to reduce the effects of noise on the resulting outcomes. Rewriting quantum circuits to match hardware constraints and optimizing for performance can be far from trivial. The flow of logic in the rewriting tool chain need not be linear, and can often have iterative sub-loops, conditional branches, and other complex behaviors. That being said, the basic building blocks follow the structure given below:

Qiskit has four pre-built transpilation pipelines available here:
qiskit.transpiler.preset_passmanagers
. Unless the reader is familiar with
quantum circuit optimization methods and their usage, it is best to use one of
these ready-made routines.
Supplementary Information¶
Transpiler API¶
Pass Manager Construction¶
|
Manager for a set of Passes and their scheduling during transpilation. |
|
Pass Manager Configuration. |
A default dictionary-like object |
|
|
Base class for multiple types of working list. |
Layout and Topology¶
|
Two-ways dict to represent a Layout. |
|
Directed graph specifying fixed coupling. |
Scheduling¶
|
Helper class to provide durations of instructions for scheduling. |
Fenced Objects¶
|
A dag circuit that cannot be modified (via remove_op_node) |
|
A property set that cannot be written (via __setitem__) |
Abstract Passes¶
|
A transformation pass: change DAG, not property set. |
|
An analysis pass: change property set, not DAG. |
Exceptions¶
|
Exceptions raised during transpilation. |
|
DEPRECATED: Exception of access error in the transpiler passes. |