Adds drive_channel, measure_channel, acquire_channel, and control_channel methods to DynamicsBackend, and includes tests for these methods.
Details
The drive_channel, measure_channel, and acquire_channel methods first check if the requested qubit index is in options.subsystem_list, and if so, returns pulse.ChannelClass(qubit) (where ChannelClass is either DriveChannel, MeasureChannel, or AcquireChannel).
As there isn't an automatic relationship between control channels and any existing backend parameters, to implement control_channel, a further option, control_channel_map, has been added. This is a user-specified dictionary indication a mapping between control channel labels and control channel indices. E.g. a control channel map specified as {(0, 1): 0} could be used to indicate that the control channel associated with a CR drive from qubit 0 with target 1 is pulse.ControlChannel(0). If this option is specified, then control_channel uses the dictionary to return the correct ControlChannel instance. The default for the option is None. When None, the control_channel will raise a NotImplementedError, which is the default behaviour from the base class.
Tests have been added to verify validation steps are working, and that the methods return the correct channels.
Summary
Closes #144
Adds
drive_channel
,measure_channel
,acquire_channel
, andcontrol_channel
methods toDynamicsBackend
, and includes tests for these methods.Details
The
drive_channel
,measure_channel
, andacquire_channel
methods first check if the requested qubit index is inoptions.subsystem_list
, and if so, returnspulse.ChannelClass(qubit)
(whereChannelClass
is eitherDriveChannel
,MeasureChannel
, orAcquireChannel
).As there isn't an automatic relationship between control channels and any existing backend parameters, to implement
control_channel
, a further option,control_channel_map
, has been added. This is a user-specified dictionary indication a mapping between control channel labels and control channel indices. E.g. a control channel map specified as{(0, 1): 0}
could be used to indicate that the control channel associated with a CR drive from qubit 0 with target 1 ispulse.ControlChannel(0)
. If this option is specified, thencontrol_channel
uses the dictionary to return the correctControlChannel
instance. The default for the option isNone
. WhenNone
, thecontrol_channel
will raise aNotImplementedError
, which is the default behaviour from the base class.Tests have been added to verify validation steps are working, and that the methods return the correct channels.