CheckCXDirection

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

Check if the CNOTs follow the right direction with respect to the coupling map.

This pass checks if the CNOTs (or any other 2Q) in the DAG follow the right direction with respect to the coupling map.

CheckCXDirection initializer.

Checks if the CNOTs in DAGCircuit are in the allowed direction with respect to coupling_map.

Parameters

coupling_map (CouplingMap) – Directed graph representing a coupling map.

Attributes

CheckCXDirection.is_analysis_pass

Check if the pass is an analysis pass.

CheckCXDirection.is_transformation_pass

Check if the pass is a transformation pass.

Methods

CheckCXDirection.name()

Return the name of the pass.

CheckCXDirection.run(dag)

Run the CheckCXDirection pass on dag.