CSPLayout¶
- class CSPLayout(*args, **kwargs)[source]¶
If possible, chooses a Layout as a CSP, using backtracking.
If possible, chooses a Layout as a CSP, using backtracking.
If not possible, does not set the layout property. In all the cases, the property
qiskit.transpiler.passes.CSPLayout_stop_reason()
will be added with one of the following values:solution found: If a perfect layout was found.
nonexistent solution: If no perfect layout was found and every combination was checked.
call limit reached: If no perfect layout was found and the call limit was reached.
time limit reached: If no perfect layout was found and the time limit was reached.
- Parameters
coupling_map (Coupling) – Directed graph representing a coupling map.
strict_direction (bool) – If True, considers the direction of the coupling map. Default is False.
seed (int) – Sets the seed of the PRNG.
call_limit (int) – Amount of times that
constraint.RecursiveBacktrackingSolver.recursiveBacktracking
will be called. None means no call limit. Default: 1000.time_limit (int) – Amount of seconds that the pass will try to find a solution. None means no time limit. Default: 10 seconds.
Attributes
Check if the pass is an analysis pass.
Check if the pass is a transformation pass.
Methods
Return the name of the pass.
CSPLayout.run
(dag)Run a pass on the DAGCircuit.