quantify_scheduler.visualization.pulse_diagram
Functions for drawing pulse diagrams
Module Contents
Functions
|
Dynamically add up to 8 ports to the port_map dictionary. |
|
Validates if the pulse/acquisition information is valid for visualization. |
|
Produce a plotly visualization of the pulses used in the schedule. |
|
Sample a schedule at discrete points in time. |
Plots a schedule using matplotlib. |
|
|
Return a list of all |
Plot the window operations in a schedule. |
|
|
Plot the acquisition operations in a schedule. |
Attributes
- _populate_port_mapping(schedule, portmap: Dict[str, int], ports_length) None [source]
Dynamically add up to 8 ports to the port_map dictionary.
- validate_operation_data(operation_data, port_map, schedulable, operation)[source]
Validates if the pulse/acquisition information is valid for visualization.
- pulse_diagram_plotly(schedule: Union[quantify_scheduler.Schedule, quantify_scheduler.CompiledSchedule], port_list: Optional[List[str]] = None, fig_ch_height: float = 300, fig_width: float = 1000, modulation: Literal[off, if, clock] = 'off', modulation_if: float = 0.0, sampling_rate: float = 1000000000.0) plotly.graph_objects.Figure [source]
Produce a plotly visualization of the pulses used in the schedule.
- Parameters
schedule – The schedule to render.
port_list – A list of ports to show. if set to None will use the first 8 ports it encounters in the sequence.
fig_ch_height – Height for each channel subplot in px.
fig_width – Width for the figure in px.
modulation – Determines if modulation is included in the visualization.
modulation_if – Modulation frequency used when modulation is set to “if”.
sampling_rate – The time resolution used to sample the schedule in Hz.
- Returns
the plot
- Return type
plotly.graph_objects.Figure
- sample_schedule(schedule: quantify_scheduler.Schedule, port_list: Optional[List[str]] = None, modulation: Literal[off, if, clock] = 'off', modulation_if: float = 0.0, sampling_rate: float = 1000000000.0) Tuple[numpy.ndarray, Dict[str, numpy.ndarray]] [source]
Sample a schedule at discrete points in time.
- Parameters
schedule – The schedule to render.
port_list – A list of ports to show. if set to None will use the first 8 ports it encounters in the sequence.
modulation – Determines if modulation is included in the visualization.
modulation_if – Modulation frequency used when modulation is set to “if”.
sampling_rate – The time resolution used to sample the schedule in Hz.
- Returns
timestamps – Sample times.
waveforms – Dictionary with the data samples for each port.
- pulse_diagram_matplotlib(schedule: Union[quantify_scheduler.Schedule, quantify_scheduler.CompiledSchedule], port_list: Optional[List[str]] = None, sampling_rate: float = 1000000000.0, modulation: Literal[off, if, clock] = 'off', modulation_if: float = 0.0, ax: Optional[matplotlib.axes.Axes] = None) Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] [source]
Plots a schedule using matplotlib.
- Parameters
schedule – The schedule to plot.
port_list – A list of ports to show. if set to None will use the first 8 ports it encounters in the sequence.
modulation – Determines if modulation is included in the visualization.
modulation_if – Modulation frequency used when modulation is set to “if”.
sampling_rate – The time resolution used to sample the schedule in Hz.
ax – Axis onto which to plot.
- Returns
fig – The matplotlib figure.
ax – The matplotlib ax.
- get_window_operations(schedule: quantify_scheduler.Schedule) List[Tuple[float, float, quantify_scheduler.Operation]] [source]
Return a list of all
WindowOperation
s with start and end time.- Parameters
schedule – Schedule to use.
- Returns
List of all window operations in the schedule.
- plot_window_operations(schedule: quantify_scheduler.Schedule, ax: Optional[matplotlib.axes.Axes] = None, time_scale_factor: float = 1) Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] [source]
Plot the window operations in a schedule.
- Parameters
schedule – Schedule from which to plot window operations.
ax – Axis handle to use for plotting.
time_scale_factor – Used to scale the independent data before using as data for the x-axis of the plot.
- Returns
fig – The matplotlib figure.
ax – The matplotlib ax.
- plot_acquisition_operations(schedule: quantify_scheduler.Schedule, ax: Optional[matplotlib.axes.Axes] = None, **kwargs) List[Any] [source]
Plot the acquisition operations in a schedule.
- Parameters
schedule – Schedule from which to plot window operations.
ax – Axis handle to use for plotting.
kwargs – Passed to matplotlib plotting routine
- Returns
List of handles