AbsorbSingleQubitGates
class samplomatic.transpiler.passes.AbsorbSingleQubitGates(*args, **kwargs)
Bases: TransformationPass
Absorb all chains of single-qubit gates that are left of a box instruction into the box.
Any instruction that is not a single-qubit gate, including measurements, entanglers, barriers, and boxes, is considered an interruption and ends a chain. For example, if an X, a measurement, a Y, and a Z gate precede a box in this order, then the Y and the Z will be absorbed into the box, but the X and the measurement will not.
Methods Summary
Column 1 | Column 2 |
|---|---|
run(dag) | Perform rightwards absorption of chains of single-qubit gates. |
Methods Documentation
run
run(dag: DAGCircuit) → DAGCircuit
Perform rightwards absorption of chains of single-qubit gates.
Was this page helpful?
Report a bug, typo, or request content on GitHub.