Unroller

class Unroller(*args, **kwargs)[source]

Unroll a circuit to a given basis.

Unroll (expand) non-basis, non-opaque instructions recursively to a desired basis, using decomposition rules defined for each instruction.

Unroller initializer.

Parameters

basis (list[str] or None) – Target basis names to unroll to, e.g. [‘u3’, ‘cx’] . If None, does not unroll any gate.

Attributes

Unroller.is_analysis_pass

Check if the pass is an analysis pass.

Unroller.is_transformation_pass

Check if the pass is a transformation pass.

Methods

Unroller.name()

Return the name of the pass.

Unroller.run(dag)

Run the Unroller pass on dag.