DynamicCircuitInstructionDurations.get#
- DynamicCircuitInstructionDurations.get(inst, qubits, unit='dt', parameters=None)#
Get the duration of the instruction with the name, qubits, and parameters.
Some instructions may have a parameter dependent duration.
Deprecated since version 0.19.0: Using a Qubit or List[Qubit] for the
qubits
argument to InstructionDurations.get() is deprecated as of qiskit-terra 0.19.0. It will be removed no earlier than 3 months after the release date. Instead, use an integer for the qubit index.- Parameters:
inst (str | qiskit.circuit.Instruction) – An instruction or its name to be queried.
qubits (int | list[int] | Qubit | list[Qubit] | list[int | Qubit]) – Qubits or its indices that the instruction acts on.
unit (str) – The unit of duration to be returned. It must be ‘s’ or ‘dt’.
parameters (list[float] | None) – The value of the parameters of the desired instruction.
- Returns:
The duration of the instruction on the qubits.
- Return type:
float|int
- Raises:
TranspilerError – No duration is defined for the instruction.