Skip to content

Commit

Permalink
Fixes Qiskit#7078: Tidying after self-review.
Browse files Browse the repository at this point in the history
  • Loading branch information
pollyshaw committed Jul 18, 2022
1 parent e62ec22 commit c273892
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 1 addition & 4 deletions qiskit/pulse/instructions/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ def __init__(
Args:
duration: Length of time of the delay in terms of dt.
channel: The channel that will have the delay.
name: Name of the delay for display purposes.
Raises:
PulseError: If `channel` cannot be delayed because it is a classical IO channel.
name: Name of the delay for display purposes.k
"""
super().__init__(operands=(duration, channel), name=name)

Expand Down
2 changes: 1 addition & 1 deletion qiskit/pulse/instructions/frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(
frequency = float(frequency)
if not isinstance(channel, PulseChannel):
raise PulseError(
"The `channel` argument to `SetFrequency` must be of type `channels.PulseChannel`."
"The `channel` argument to `ShiftFrequency` must be of type `channels.PulseChannel`."
)
super().__init__(operands=(frequency, channel), name=name)

Expand Down
8 changes: 7 additions & 1 deletion test/python/pulse/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,13 @@ def test_pad_no_delay_on_classical_io_channels(self):
+ Delay(delay, SnapshotChannel())
)

self.assertEqual(transforms.pad(sched, until=15), sched)
ref_sched = (
Delay(delay, MemorySlot(0)).shift(20)
+ Delay(delay, RegisterSlot(0)).shift(10)
+ Delay(delay, SnapshotChannel())
)

self.assertEqual(transforms.pad(sched, until=15), ref_sched)


def get_pulse_ids(schedules: List[Schedule]) -> Set[int]:
Expand Down

0 comments on commit c273892

Please sign in to comment.