Transpiler Passes (qiskit.transpiler.passes
)¶
Layout Selection (Placement)¶
|
Set the |
|
Choose a Layout by assigning |
|
Choose a Layout by finding the most connected subset of qubits. |
|
Choose a noise-adaptive Layout based on current calibration data for the backend. |
|
Choose a Layout via iterative bidirectional routing of the input circuit. |
|
If possible, chooses a Layout as a CSP, using backtracking. |
|
A pass for choosing a Layout of a circuit onto a Coupling graph, as a subgraph isomorphism problem, solved by VF2++. |
|
Transform a circuit with virtual qubits into a circuit with physical qubits. |
|
Evaluate how good the layout selection was. |
|
Extend the dag with virtual qubits that are in layout but not in the circuit yet. |
|
Allocate all idle nodes from the coupling map or target as ancilla on the layout. |
|
Choose a starting layout to use for additional Sabre layout trials. |
Routing¶
|
Map (with minimum effort) a DAGCircuit onto a |
|
Map input circuit onto a backend topology via insertion of SWAPs. |
|
Map a DAGCircuit onto a coupling_map adding swap gates. |
|
Map input circuit onto a backend topology via insertion of SWAPs. |
|
A class to swap route one or more commuting gates to the coupling map. |
Basis Change¶
|
Translates gates to a target basis by searching for a set of translations from a given EquivalenceLibrary. |
|
Expand a gate in a circuit using its decomposition rules. |
|
Translate parameterized gates to a supported basis set. |
|
Recursively expands 3q+ gates until the circuit only contains 2q or 1q gates. |
|
Unrolls instructions with custom definitions. |
|
Unroll a circuit to a given basis. |
Optimizations¶
|
Optimize chains of single-qubit u1, u2, u3 gates by combining them into a single gate. |
|
Optimize chains of single-qubit gates by combining them into a single gate. |
|
Collect one-qubit subcircuits. |
|
Collect two-qubit subcircuits. |
|
Collect sequences of uninterrupted gates acting on groups of qubits. |
|
Collect blocks of linear gates ( |
|
Collects blocks of Clifford gates and replaces them by a |
|
Replace each block of consecutive gates by a single Unitary node. |
|
Cancel back-to-back |
|
Cancel specific Gates which are inverses of each other when they occur back-to- back. |
|
Analysis pass to find commutation relations between DAG nodes. |
|
Cancel the redundant (self-adjoint) gates through commutation relations. |
|
Cancel pairs of inverse gates exploiting commutation relations. |
|
Optimizes 1Q gate strings interrupted by 2Q gates by commuting the components and resynthesizing the results. |
|
Remove diagonal gates (including diagonal 2Q gates) before a measurement. |
|
Remove reset gate when the qubit is in zero state. |
|
Crosstalk mitigation through adaptive instruction scheduling. |
|
This is a transpiler pass using Hoare logic circuit optimization. |
|
Class for the template optimization pass. |
|
Rewrite two-qubit gates using the Weyl decomposition. |
|
This pass replaces reset after measure with a conditional X gate. |
|
Combine consecutive Cliffords over the same qubits. |
|
Normalize theta parameter of RXGate instruction. |
Calibration¶
|
Pulse gate adding pass. |
|
Creates calibrations for RZXGate(theta) by stretching and compressing Gaussian square pulses in the CX gate. |
|
Creates calibrations for RZXGate(theta) by stretching and compressing Gaussian square pulses in the CX gate. |
|
Add single-pulse RX calibrations that are bootstrapped from the SX calibration. |
Scheduling¶
|
Choose a time unit to be used in the following time-aware passes, and make all circuit time units consistent with that. |
|
ALAP Scheduling pass, which schedules the stop time of instructions as late as possible. |
|
ASAP Scheduling pass, which schedules the start time of instructions as early as possible. |
|
Dynamical decoupling insertion pass. |
|
Padding idle time with Delay instructions. |
|
Rescheduler pass that updates node start times to conform to the hardware alignments. |
|
Check custom gate length. |
|
Duration validation pass for reschedule. |
|
Set IOLatency information to the input circuit. |
|
ALAP Scheduling pass, which schedules the stop time of instructions as late as possible. |
|
ASAP Scheduling pass, which schedules the start time of instructions as early as possible.. |
|
Dynamical decoupling insertion pass. |
|
Measurement alignment. |
Circuit Analysis¶
|
Calculate the width of a DAG circuit. |
|
Calculate the depth of a DAG circuit. |
|
Calculate the size of a DAG circuit. |
|
Count the operations in a DAG circuit. |
|
Count the operations on the longest path in a |
|
Calculate the number of tensor factors of a DAG circuit. |
|
Return the longest path in a |
Synthesis¶
|
Synthesize gates according to their basis gates. |
|
DEPRECATED: Synthesize linear functions. |
|
Promotes linear functions to permutations when possible. |
|
Synthesize higher-level objects and unroll custom definitions. |
|
Approximately decompose 1q gates to a discrete basis using the Solovay-Kitaev algorithm. |
A Solovay-Kitaev Qiskit unitary synthesis plugin. |
Post Layout (Post transpile qubit selection)¶
|
A pass for choosing a Layout after transpilation of a circuit onto a Coupling graph, as a subgraph isomorphism problem, solved by VF2++. |
Additional Passes¶
|
Check if a DAG circuit is already mapped to a coupling map. |
|
Check if the two-qubit gates follow the right direction with respect to the coupling map. |
|
Modify asymmetric gates to match the hardware coupling direction. |
|
Return a circuit with any adjacent barriers merged together. |
|
Return a circuit with any barrier removed. |
|
Add a barrier before final measurements. |
|
Remove final measurements and barriers at the end of a circuit. |
|
Check if the DAG has reached a fixed point. |
|
Check if a property reached a fixed point. |
|
Check if the DAG has reached a relative semi-stable point over previous runs |
|
An analysis pass to detect if the DAG contains a specific instruction. |
|
Check if all gates in a DAG are in a given set of gates |
|
Convert instructions whose |
|
|