qiskit.transpiler.Target.operations_for_qargs¶
- Target.operations_for_qargs(qargs)[source]¶
Get the operation class object for a specified qargs tuple
- Parameters
qargs (tuple) -- A qargs tuple of the qubits to get the gates that apply to it. For example,
(0,)
will return the set of all instructions that apply to qubit 0. If set toNone
this will return any globally defined operations in the target.- Returns
The list of
Instruction
instances that apply to the specified qarg. This may also be a class if a variable width operation is globally defined.- Return type
list
- Raises
KeyError -- If qargs is not in target