Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
  • Loading branch information
mtreinish and ElePT authored Oct 1, 2024
1 parent c0e7431 commit 3fc0e90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions qiskit/circuit/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ def __init__(self, name, num_qubits, num_clbits, params, duration=None, unit="dt
self._definition = None
if duration is not None:
warnings.warn(
"Setting a custom duration per instruction is deprecated as of qiskit "
"Setting a custom duration per instruction is deprecated as of Qiskit "
"1.3.0. It will be removed in Qiskit 2.0.0.",
DeprecationWarning,
stacklevel=2,
)
self._duration = duration
if unit is not None and unit != "dt":
warnings.warn(
"Setting a custom duration per instruction is deprecated as of qiskit "
"Setting a custom duration per instruction is deprecated as of Qiskit "
"1.3.0. It will be removed in Qiskit 2.0.0.",
DeprecationWarning,
stacklevel=2,
Expand Down
4 changes: 2 additions & 2 deletions qiskit/visualization/timeline/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def load_program(self, program: circuit.QuantumCircuit, target: Target | None =
Args:
program: Scheduled circuit object to draw.
target: The target for the backend the circuit is scheduled for
this contains the instruction durations.
target: The target the circuit is scheduled for. This contains backend information
including the instruction durations used in scheduling.
Raises:
VisualizationError: When circuit is not scheduled.
Expand Down
2 changes: 1 addition & 1 deletion qiskit/visualization/timeline/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def draw(

if target is None:
warnings.warn(
"Target is not specified in Qiskit 2.0.0 this will be required to get the duration of "
"Target is not specified. In Qiskit 2.0.0 this will be required to get the duration of "
"instructions.",
PendingDeprecationWarning,
stacklevel=2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ features_visualization:
- |
The :func:`.timeline_drawer` visualization function has a new argument
``target``, used to specify a :class:`.Target` object for the
visualization. By default the function using the
:attr:`.Instruction.duration` to get the duration of a given isntruction,
visualization. By default the function used the
:attr:`.Instruction.duration` to get the duration of a given instruction,
but specifying the target will leverage the timing details inside the
target instead.
deprecations_circuits:
Expand All @@ -31,7 +31,7 @@ deprecations_circuits:
- |
The :attr:`.Instruction.duration` and :attr:`.Instruction.unit` attributes
have been deprecated and will be removed in Qiskit 2.0.0. This includes
setting the ``unit`` or ``duration`` arguments for any :class:`.Instruction`
setting the ``unit`` or ``duration`` arguments for any :class:`qiskit.circuit.Instruction`
or subclass. These attributes were used to attach a custom execution
duration and unit for that duration to an individual instruction. However,
the source of truth of the duration of a gate is the :class:`.BackendV2`
Expand Down

0 comments on commit 3fc0e90

Please sign in to comment.