CXDirection

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

Rearrange the direction of the cx nodes to match the directed coupling map.

Flip the cx nodes to match the directed coupling map. This pass makes use of the following equivalence:

---(+)---      --[H]---.---[H]--
    |      =           |
----.----      --[H]--(+)--[H]--

CXDirection initializer.

Parameters

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

Attributes

CXDirection.is_analysis_pass

Check if the pass is an analysis pass.

CXDirection.is_transformation_pass

Check if the pass is a transformation pass.

Methods

CXDirection.name()

Return the name of the pass.

CXDirection.run(dag)

Run the CXDirection pass on dag.