- Target.build_coupling_map(two_q_gate=None, filter_idle_qubits=False)¶
CouplingMapfrom this target.
If there is a mix of two qubit operations that have a connectivity constraint and those that are globally defined this will also return
Nonebecause the globally connectivity means there is no constraint on the target. If you wish to see the constraints of the two qubit operations that have constraints you should use the
two_q_gateargument to limit the output to the gates which have a constraint.
two_q_gate (str) – An optional gate name for a two qubit gate in the Target to generate the coupling map for. If specified the output coupling map will only have edges between qubits where this gate is present.
filter_idle_qubits (bool) – If set to
CouplingMapwill remove any qubits that don’t have any operations defined in the target. Note that using this argument will result in an output
CouplingMapobject which has holes in its indices which might differ from the assumptions of the class. The typical use case of this argument is to be paired with with
CouplingMap.connected_components()which will handle the holes as expected.
for this target. If there are no connectivity constraints in the target this will return
- Type renvoyé
ValueError – If a non-two qubit gate is passed in for
IndexError – If an Instruction not in the Target is passed in for