Transpiler Passes
qiskit.transpiler.passes
Layout Selection (Placement)
SetLayout(*args, **kwargs) | Set the layout property to the given layout. |
TrivialLayout(*args, **kwargs) | Choose a Layout by assigning n circuit qubits to device qubits 0, .., n-1. |
DenseLayout(*args, **kwargs) | Choose a Layout by finding the most connected subset of qubits. |
SabreLayout(*args, **kwargs) | Choose a Layout via iterative bidirectional routing of the input circuit. |
CSPLayout(*args, **kwargs) | If possible, chooses a Layout as a CSP, using backtracking. |
VF2Layout(*args, **kwargs) | A pass for choosing a Layout of a circuit onto a Coupling graph, as a subgraph isomorphism problem, solved by VF2++. |
ApplyLayout(*args, **kwargs) | Apply or update the mapping of virtual qubits to physical qubits in the DAGCircuit. |
Layout2qDistance(*args, **kwargs) | Evaluate how good the layout selection was. |
EnlargeWithAncilla(*args, **kwargs) | Extend the dag with virtual qubits that are in layout but not in the circuit yet. |
FullAncillaAllocation(*args, **kwargs) | Allocate all idle nodes from the coupling map or target as ancilla on the layout. |
SabrePreLayout(*args, **kwargs) | Choose a starting layout to use for additional Sabre layout trials. |
Routing
BasicSwap(*args, **kwargs) | Map (with minimum effort) a DAGCircuit onto a coupling_map adding swap gates. |
Commuting2qGateRouter(*args, **kwargs) | A class to swap route one or more commuting gates to the coupling map. |
LayoutTransformation(*args, **kwargs) | Adds a Swap circuit for a given (partial) permutation to the circuit. |
LookaheadSwap(*args, **kwargs) | Map input circuit onto a backend topology via insertion of SWAPs. |
SabreSwap(*args, **kwargs) | Map input circuit onto a backend topology via insertion of SWAPs. |
StarPreRouting(*args, **kwargs) | Run star to linear pre-routing |
Basis Change
BasisTranslator(*args, **kwargs) | Translates gates to a target basis by searching for a set of translations from a given EquivalenceLibrary. |
Decompose(*args, **kwargs) | Expand a gate in a circuit using its decomposition rules. |
TranslateParameterizedGates(*args, **kwargs) | Translate parameterized gates to a supported basis set. |
Unroll3qOrMore(*args, **kwargs) | Recursively expands 3q+ gates until the circuit only contains 2q or 1q gates. |
UnrollCustomDefinitions(*args, **kwargs) | Unrolls instructions with custom definitions. |
Optimizations
Collect1qRuns(*args, **kwargs) | Collect one-qubit subcircuits. |
Collect2qBlocks(*args, **kwargs) | Collect two-qubit subcircuits. |
CollectAndCollapse(*args, **kwargs) | A general transpiler pass to collect and to consolidate blocks of nodes in a circuit. |
CollectCliffords(*args, **kwargs) | Collects blocks of Clifford gates and replaces them by a Clifford object. |
CollectLinearFunctions(*args, **kwargs) | Collect blocks of linear gates (CXGate and SwapGate gates) and replaces them by linear functions (LinearFunction). |
CollectMultiQBlocks(*args, **kwargs) | Collect sequences of uninterrupted gates acting on groups of qubits. |
CommutationAnalysis(*args, **kwargs) | Analysis pass to find commutation relations between DAG nodes. |
CommutativeCancellation(*args, **kwargs) | Cancel the redundant (self-adjoint) gates through commutation relations. |
CommutativeInverseCancellation(*args, **kwargs) | Cancel pairs of inverse gates exploiting commutation relations. |
ConsolidateBlocks(*args, **kwargs) | Replace each block of consecutive gates by a single Unitary node. |
ContractIdleWiresInControlFlow(*args, **kwargs) | Remove idle qubits from control-flow operations of a DAGCircuit. |
ElidePermutations(*args, **kwargs) | Remove permutation operations from a pre-layout circuit |
HoareOptimizer(*args, **kwargs) | This is a transpiler pass using Hoare logic circuit optimization. |
InverseCancellation(*args, **kwargs) | Cancel specific Gates which are inverses of each other when they occur back-to- back. |
LitinskiTransformation(*args, **kwargs) | Applies Litinski transform to a circuit. |
Optimize1qGates(*args, **kwargs) | Optimize chains of single-qubit u1, u2, u3 gates by combining them into a single gate. |
Optimize1qGatesDecomposition(*args, **kwargs) | Optimize chains of single-qubit gates by combining them into a single gate. |
Optimize1qGatesSimpleCommutation(*args, **kwargs) | Optimizes 1Q gate strings interrupted by 2Q gates by commuting the components and resynthesizing the results. |
OptimizeAnnotated(*args, **kwargs) | Optimization pass on circuits with annotated operations. |
OptimizeCliffordT(*args, **kwargs) | An optimization pass for Clifford+T circuits. |
OptimizeCliffords(*args, **kwargs) | Combine consecutive Cliffords over the same qubits. |
OptimizeSwapBeforeMeasure(*args, **kwargs) | Remove the swaps followed by measurement (and adapt the measurement). |
RemoveDiagonalGatesBeforeMeasure(*args, **kwargs) | Remove diagonal gates (including diagonal 2Q gates) before a measurement. |
RemoveFinalReset(*args, **kwargs) | Remove reset when it is the final instruction on a qubit wire. |
RemoveIdentityEquivalent(*args, **kwargs) | Remove gates with negligible effects. |
RemoveResetInZeroState(*args, **kwargs) | Remove reset gate when the qubit is in zero state. |
ResetAfterMeasureSimplification(*args, **kwargs) | This pass replaces reset after measure with a conditional X gate. |
Split2QUnitaries(*args, **kwargs) | Attempt to splits two-qubit unitaries in a DAGCircuit into two single-qubit gates. |
TemplateOptimization(*args, **kwargs) | Class for the template optimization pass. |
Scheduling
ALAPScheduleAnalysis(*args, **kwargs) | ALAP Scheduling pass, which schedules the stop time of instructions as late as possible. |
ASAPScheduleAnalysis(*args, **kwargs) | ASAP Scheduling pass, which schedules the start time of instructions as early as possible. |
ConstrainedReschedule(*args, **kwargs) | Rescheduler pass that updates node start times to conform to the hardware alignments. |
ContextAwareDynamicalDecoupling(*args, **kwargs) | Implement an X-sequence dynamical decoupling considering the gate- and qubit-context. |
InstructionDurationCheck(*args, **kwargs) | Duration validation pass for reschedule. |
PadDelay(*args, **kwargs) | Padding idle time with Delay instructions. |
PadDynamicalDecoupling(*args, **kwargs) | Dynamical decoupling insertion pass. |
SetIOLatency(*args, **kwargs) | Set IOLatency information to the input circuit. |
TimeUnitConversion(*args, **kwargs) | Choose a time unit to be used in the following time-aware passes, and make all circuit time units consistent with that. |
Circuit Analysis
CountOps(*args, **kwargs) | Count the operations in a DAG circuit. |
CountOpsLongestPath(*args, **kwargs) | Count the operations on the longest path in a DAGCircuit. |
DAGLongestPath(*args, **kwargs) | Return the longest path in a DAGCircuit as a list of DAGOpNodes, DAGInNodes, and DAGOutNodes. |
Depth(*args, **kwargs) | Calculate the depth of a DAG circuit. |
NumTensorFactors(*args, **kwargs) | Calculate the number of tensor factors of a DAG circuit. |
ResourceEstimation(*args, **kwargs) | Automatically require analysis passes for resource estimation. |
Size(*args, **kwargs) | Calculate the size of a DAG circuit. |
Width(*args, **kwargs) | Calculate the width of a DAG circuit. |
Synthesis
The synthesis transpiler plugin documentation can be found in the qiskit.transpiler.passes.synthesis.plugin page.
HLSConfig([use_default_on_unspecified, ...]) | The high-level-synthesis config allows to specify a list of "methods" used by HighLevelSynthesis transformation pass to synthesize different types of higher-level objects. |
HighLevelSynthesis(*args, **kwargs) | Synthesize higher-level objects and unroll custom definitions. |
LinearFunctionsToPermutations(*args, **kwargs) | Promotes linear functions to permutations when possible. |
SolovayKitaev(*args, **kwargs) | Approximately decompose 1q gates to a discrete basis using the Solovay-Kitaev algorithm. |
UnitarySynthesis(*args, **kwargs) | Synthesize gates according to their basis gates. |
Post Layout
These are post qubit selection.
VF2PostLayout(*args, **kwargs) | A pass for improving an existing Layout after transpilation of a circuit onto a Coupling graph, as a subgraph isomorphism problem, solved by VF2++. |
Additional Passes
BarrierBeforeFinalMeasurements(*args, **kwargs) | Add a barrier before final measurements. |
CheckGateDirection(*args, **kwargs) | Check if the two-qubit gates follow the right direction with respect to the coupling map. |
CheckMap(*args, **kwargs) | Check if a DAG circuit is already mapped to a coupling map. |
ContainsInstruction(*args, **kwargs) | An analysis pass to detect if the DAG contains a specific instruction. |
DAGFixedPoint(*args, **kwargs) | Check if the DAG has reached a fixed point. |
Error(*args, **kwargs) | Error pass to be called when an error happens. |
FilterOpNodes(*args, **kwargs) | Remove all operations that match a filter function |
FixedPoint(*args, **kwargs) | Check if a property reached a fixed point. |
GateDirection(*args, **kwargs) | Modify asymmetric gates to match the hardware coupling direction. |
GatesInBasis(*args, **kwargs) | Check if all gates in a DAG are in a given set of gates |
MergeAdjacentBarriers(*args, **kwargs) | Return a circuit with any adjacent barriers merged together. |
MinimumPoint(*args, **kwargs) | Check if the DAG has reached a relative semi-stable point over previous runs |
RemoveBarriers(*args, **kwargs) | Return a circuit with any barrier removed. |
RemoveFinalMeasurements(*args, **kwargs) | Remove final measurements and barriers at the end of a circuit. |
UnrollForLoops(*args, **kwargs) | UnrollForLoops transpilation pass unrolls for-loops when possible. |
WrapAngles(*args, **kwargs) | Wrap angles outside the bound specified in the target. |
Was this page helpful?
Report a bug, typo, or request content on GitHub.