common#

Common python dataclasses for multiple backends.

Module Contents#

Classes#

SoftwareDistortionCorrection

Software distortion correction information for a port-clock combination.

DistortionCorrection

Software distortion correction information for a port-clock combination.

HardwareDistortionCorrection

Parent class for hardware distortion correction.

ModulationFrequencies

Modulation frequencies for a port-clock combination.

MixerCorrections

Mixer corrections for a port-clock combination.

HardwareOptions

Datastructure containing the hardware options for each port-clock combination.

LocalOscillatorDescription

Information needed to specify a Local Oscillator in the CompilationConfig.

IQMixerDescription

Information needed to specify an IQ Mixer in the CompilationConfig.

HardwareDescription

Specifies a piece of hardware and its instrument-specific settings.

Connectivity

Connectivity between ports on the quantum device and control hardware inputs/outputs.

HardwareCompilationConfig

Information required to compile a schedule to the control-hardware layer.

Attributes#

LatencyCorrection

Latency correction in seconds for a port-clock combination.

LatencyCorrection[source]#

Latency correction in seconds for a port-clock combination.

Positive values delay the operations on the corresponding port-clock combination, while negative values shift the operation backwards in time with respect to other operations in the schedule.

Note

If the port-clock combination of a signal is not specified in the corrections, it is set to zero in compilation. The minimum correction over all port-clock combinations is then subtracted to allow for negative latency corrections and to ensure minimal wait time (see determine_relative_latency_corrections()).

class SoftwareDistortionCorrection(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Software distortion correction information for a port-clock combination.

filter_func: str[source]#

The function applied to the waveforms.

input_var_name: str[source]#

The argument to which the waveforms will be passed in the filter_func.

kwargs: Dict[str, List | quantify_scheduler.structure.types.NDArray][source]#

The keyword arguments that are passed to the filter_func.

clipping_values: List | None = None[source]#

The optional boundaries to which the corrected pulses will be clipped, upon exceeding.

sampling_rate: float = 1000000000.0[source]#

The sample rate of the corrected pulse, in Hz.

class DistortionCorrection(**data)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Software distortion correction information for a port-clock combination.

Note: deprecated and to be removed after 0.23.0. Please use SoftwareDistortionCorrection instead.

filter_func: str[source]#

The function applied to the waveforms.

input_var_name: str[source]#

The argument to which the waveforms will be passed in the filter_func.

kwargs: Dict[str, List | quantify_scheduler.structure.types.NDArray][source]#

The keyword arguments that are passed to the filter_func.

clipping_values: List | None = None[source]#

The optional boundaries to which the corrected pulses will be clipped, upon exceeding.

sampling_rate: float = 1000000000.0[source]#
class HardwareDistortionCorrection(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Parent class for hardware distortion correction.

class ModulationFrequencies(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Modulation frequencies for a port-clock combination.

interm_freq: float | None = None[source]#

The intermodulation frequency (IF) used for this port-clock combination.

lo_freq: float | None = None[source]#

The local oscillator frequency (LO) used for this port-clock combination.

class MixerCorrections(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Mixer corrections for a port-clock combination.

dc_offset_i: float = 0.0[source]#

The DC offset on the I channel used for this port-clock combination.

dc_offset_q: float = 0.0[source]#

The DC offset on the Q channel used for this port-clock combination.

amp_ratio: float = 1.0[source]#

The mixer gain ratio used for this port-clock combination.

phase_error: float = 0.0[source]#

The mixer phase error used for this port-clock combination.

class HardwareOptions(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Datastructure containing the hardware options for each port-clock combination.

This datastructure contains the HardwareOptions that are currently shared among the existing backends. Subclassing is required to add backend-specific options, see e.g., QbloxHardwareOptions, ZIHardwareOptions.

latency_corrections: Dict[str, LatencyCorrection] | None = None[source]#

Dictionary containing the latency corrections (values) that should be applied to operations on a certain port-clock combination (keys).

distortion_corrections: Dict[str, SoftwareDistortionCorrection] | None = None[source]#

Dictionary containing the distortion corrections (values) that should be applied to waveforms on a certain port-clock combination (keys).

modulation_frequencies: Dict[str, ModulationFrequencies] | None = None[source]#

Dictionary containing the modulation frequencies (values) that should be used for signals on a certain port-clock combination (keys).

mixer_corrections: Dict[str, MixerCorrections] | None = None[source]#

Dictionary containing the mixer corrections (values) that should be used for signals on a certain port-clock combination (keys).

class LocalOscillatorDescription(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Information needed to specify a Local Oscillator in the CompilationConfig.

instrument_type: Literal['LocalOscillator'][source]#

The field discriminator for this HardwareDescription datastructure.

instrument_name: str | None = None[source]#

The QCoDeS instrument name corresponding to this Local Oscillator.

generic_icc_name: str | None = None[source]#

The name of the GenericInstrumentCoordinatorComponent corresponding to this Local Oscillator.

frequency_param: str = 'frequency'[source]#

The QCoDeS parameter that is used to set the LO frequency.

power_param: str = 'power'[source]#

The QCoDeS parameter that is used to set the LO power.

power: int | None = None[source]#

The power setting for this Local Oscillator.

class IQMixerDescription(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Information needed to specify an IQ Mixer in the CompilationConfig.

instrument_type: Literal['IQMixer'][source]#

The field discriminator for this HardwareDescription datastructure.

class HardwareDescription(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Specifies a piece of hardware and its instrument-specific settings.

Each supported instrument type should have its own datastructure that inherits from this class. For examples, see ClusterDescription, ZIHDAWG4Description, LocalOscillatorDescription.

This datastructure is used to specify the control-hardware ports that are included in the Connectivity graph.

instrument_type: str[source]#

The instrument type.

class Connectivity(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Connectivity between ports on the quantum device and control hardware inputs/outputs.

The connectivity graph can be parsed from a list of edges, which are given by a set of two strings that each correspond to an input/output on an instrument or a port on the quantum device.

Note

To specify connections between more than one pair of ports at once, one can also specify a list of ports within the edge input (see example below, and also see Connectivity examples).

The connectivity graph can be drawn using draw(), which groups the nodes according to the instrument name (specified by the string before the first "." in the node name; the name is omitted for the quantum device).

graph: quantify_scheduler.structure.types.Graph[source]#

The connectivity graph consisting of i/o ports (nodes) on the quantum device and on the control hardware, and their connections (edges).

_unroll_lists_of_ports_in_edges_input(graph)[source]#
draw(ax: matplotlib.axes.Axes | None = None, figsize: Tuple[float, float] = (20, 10), **options) matplotlib.axes.Axes[source]#

Draw the connectivity graph using matplotlib.

The nodes are positioned using a multipartite layout, where the nodes are grouped by instrument (identified by the first part of the node name).

Parameters:
  • ax – Matplotlib axis to plot the figure on.

  • figsize – Optional figure size, defaults to something slightly larger that fits the size of the nodes.

  • options – optional keyword arguments that are passed to networkx.draw_networkx.

Returns:

Matplotlib axis on which the figure is plotted.

class HardwareCompilationConfig(/, **data: Any)[source]#

Bases: quantify_scheduler.structure.model.DataStructure

Information required to compile a schedule to the control-hardware layer.

From a point of view of Compilation this information is needed to convert a schedule defined on a quantum-device layer to compiled instructions that can be executed on the control hardware.

This datastructure defines the overall structure of a HardwareCompilationConfig. Specific hardware backends should customize fields within this structure by inheriting from this class and specifying their own “config_type”, see e.g., QbloxHardwareCompilationConfig, ZIHardwareCompilationConfig.

config_type: Type[HardwareCompilationConfig][source]#

A reference to the HardwareCompilationConfig DataStructure for the backend that is used.

hardware_description: Dict[str, HardwareDescription][source]#

Datastructure describing the control hardware instruments in the setup and their high-level settings.

hardware_options: HardwareOptions[source]#

The HardwareOptions used in the compilation from the quantum-device layer to the control-hardware layer.

connectivity: Connectivity | Dict[source]#

Datastructure representing how ports on the quantum device are connected to ports on the control hardware.

compilation_passes: List[quantify_scheduler.backends.graph_compilation.SimpleNodeConfig] = [][source]#

The list of compilation nodes that should be called in succession to compile a schedule to instructions for the control hardware.

_serialize_backend_func(v)[source]#
_import_config_type_if_str(config_type: Type[HardwareCompilationConfig]) Callable[[quantify_scheduler.schedules.schedule.Schedule, Any], quantify_scheduler.schedules.schedule.Schedule][source]#
_latencies_in_hardware_config(connectivity)[source]#
_distortions_in_hardware_config(connectivity)[source]#
_check_connectivity_graph_nodes_format()[source]#
_connectivity_old_style_hw_cfg_empty_hw_options_and_descriptions()[source]#