PulseSystemModel
class PulseSystemModel(hamiltonian=None, u_channel_lo=None, control_channel_labels=None, subsystem_list=None, dt=None)
Bases: object
Physical model object for pulse simulator.
This class contains model information required by the PulseSimulator
. It contains:
"hamiltonian"
: aHamiltonianModel
object representing the Hamiltonian of the system."u_channel_lo"
: A description ofControlChannel
local oscillator frequencies in terms of qubit local oscillator frequencies."control_channel_labels"
: Optional list of identifying information for eachControlChannel
that the model supports."subsystem_list"
: List of subsystems in the model."dt"
: Sample width size for OpenPulse instructions.
A model can be instantiated from the helper function duffing_system_model()
, or using the PulseSystemModel.from_backend()
constructor.
Example
Constructing from a backend:
Initialize a PulseSystemModel.
Parameters
- hamiltonian (HamiltonianModel) – The Hamiltonian of the system.
- u_channel_lo (list) – list of ControlChannel frequency specifications.
- control_channel_labels (list) – list of labels for control channels, which can be of any type.
- subsystem_list (list) – list of valid qubit indicies for the model.
- dt (float) – pixel size for pulse Instructions.
Raises
AerError – if hamiltonian is not None or a HamiltonianModel
Methods
calculate_channel_frequencies
PulseSystemModel.calculate_channel_frequencies(qubit_lo_freq=None)
Calculate frequencies for each channel given qubit_lo_freq.
Parameters
qubit_lo_freq (list or None) – list of qubit linear oscillator drive frequencies.
Returns
a dictionary of channel frequencies.
Return type
OrderedDict
Raises
ValueError – If channel or u_channel_lo are invalid.
control_channel_index
PulseSystemModel.control_channel_index(label)
Return the index of the control channel with identifying label.
Parameters
label (Any) – label that identifies a control channel
Returns
index of the ControlChannel
Return type
int or None
from_backend
classmethod PulseSystemModel.from_backend(backend, subsystem_list=None)
Returns a PulseSystemModel constructed from an OpenPulse enabled backend object.
Parameters
- backend (Backend) – backend object to draw information from.
- subsystem_list (list) – a list of ints for which qubits to include in the model.
Returns
the PulseSystemModel constructed from the backend.
Return type
Raises
AerError – If channel or u_channel_lo are invalid.
from_config
classmethod PulseSystemModel.from_config(configuration, subsystem_list=None)
Construct a model from configuration and defaults.