Skip to content

Commit

Permalink
add docuemntation about instruction duration
Browse files Browse the repository at this point in the history
  • Loading branch information
1ucian0 committed Dec 21, 2024
1 parent 053ee32 commit 53e112d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qiskit/circuit/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,18 @@ class Instruction(Operation):
def __init__(self, name, num_qubits, num_clbits, params, duration=None, unit="dt", label=None):
"""Create a new instruction.
.. deprecated:: 1.3
The parameters ``duration`` and ``unit`` are deprecated since
Qiskit 1.3, and they will be removed in 2.0 or more later.
An instruction's duration is defined in a backend's Target object.
Args:
name (str): instruction name
num_qubits (int): instruction's qubit width
num_clbits (int): instruction's clbit width
params (list[int|float|complex|str|ndarray|list|ParameterExpression]):
list of parameters
duration (int or float): instruction's duration. it must be integer if ``unit`` is 'dt'
duration (int|float): instruction's duration. it must be integer if ``unit`` is ``'dt'``
unit (str): time unit of duration
label (str or None): An optional label for identifying the instruction.
Expand Down

0 comments on commit 53e112d

Please sign in to comment.