common#
Common python dataclasses for multiple backends.
Module Contents#
Classes#
Latency correction in seconds for a port-clock combination. |
|
Distortion correction information for a port-clock combination. |
|
Modulation frequencies for a port-clock combination. |
|
Mixer corrections for a port-clock combination. |
|
Datastructure containing the hardware options for each port-clock combination. |
|
Information needed to specify a Local Oscillator in the |
|
Specifies a piece of hardware and its instrument-specific settings. |
|
Connectivity between ports on the quantum device and on the control hardware. |
|
Information required to compile a schedule to the control-hardware layer. |
- class LatencyCorrection[source]#
Bases:
float
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()
).Example
Let’s say we have specified two latency corrections in the CompilationConfig:
compilation_config.hardware_options.latency_corrections = { "q0:res-q0.ro": LatencyCorrection(-20e-9), "q0:mw-q0.01": LatencyCorrection(120e9), }
In this case, all operations on port
"q0:mw"
and clock"q0.01"
will be delayed by 140 ns with respect to operations on port"q0:res"
and clock"q0.ro"
.Initialize self. See help(type(self)) for accurate signature.
- class DistortionCorrection(**data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
Distortion correction information for a port-clock combination.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- kwargs: Dict[str, Union[List, quantify_scheduler.structure.types.NDArray]][source]#
The keyword arguments that are passed to the filter_func.
- clipping_values: Optional[List][source]#
The optional boundaries to which the corrected pulses will be clipped, upon exceeding.
Example
compilation_config.hardware_options.distortion_corrections = { "q0:fl-cl0.baseband": DistortionCorrection( filter_func = "scipy.signal.lfilter", input_var_name = "x", kwargs = { "b": [0, 0.25, 0.5], "a": [1] }, clipping_values = [-2.5, 2.5] ) }
- class ModulationFrequencies(**data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
Modulation frequencies for a port-clock combination.
Example
compilation_config.hardware_options.modulation_frequencies = { "q0:res-q0.ro": ModulationFrequencies( interm_freq = None, lo_freq = 6e9, ) }
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- class MixerCorrections(**data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
Mixer corrections for a port-clock combination.
Example
compilation_config.hardware_options.mixer_corrections = { "q0:mw-q0.01": MixerCorrections( dc_offset_i = -0.0542, dc_offset_q = -0.0328, amp_ratio = 0.95, phase_error_deg= 0.07, ) }
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- dc_offset_i: float = 0.0[source]#
The DC offset on the I channel 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
.Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- latency_corrections: Optional[Dict[str, LatencyCorrection]][source]#
Dictionary containing the latency corrections (values) that should be applied to operations on a certain port-clock combination (keys).
- distortion_corrections: Optional[Dict[str, DistortionCorrection]][source]#
Dictionary containing the distortion corrections (values) that should be applied to waveforms on a certain port-clock combination (keys).
- modulation_frequencies: Optional[Dict[str, ModulationFrequencies]][source]#
Dictionary containing the modulation frequencies (values) that should be used for signals on a certain port-clock combination (keys).
- mixer_corrections: Optional[Dict[str, MixerCorrections]][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
.Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- instrument_type: Literal[LocalOscillator][source]#
The field discriminator for this HardwareDescription datastructure.
- instrument_name: Optional[str][source]#
The QCoDeS instrument name corresponding to this Local Oscillator.
- generic_icc_name: Optional[str][source]#
The name of the
GenericInstrumentCoordinatorComponent
corresponding to this Local Oscillator.
- class HardwareDescription(**data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
Specifies a piece of hardware and its instrument-specific settings.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- class Connectivity(**data: Any)[source]#
Bases:
quantify_scheduler.structure.model.DataStructure
Connectivity between ports on the quantum device and on the control hardware.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- 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 may customize fields within this structure by inheriting from this class, see e.g.,
QbloxHardwareCompilationConfig
,ZIHardwareCompilationConfig
.Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- backend: Callable[[quantify_scheduler.schedules.schedule.Schedule, Any], quantify_scheduler.schedules.schedule.Schedule][source]#
A . separated string specifying the location of the compilation backend this configuration is intended for.
- hardware_description: Dict[str, HardwareDescription][source]#
Datastructure describing the control hardware instruments in the setup and their high-level settings.
- connectivity: Union[Connectivity, Dict][source]#
Datastructure representing how ports on the quantum device are connected to ports on the control hardware.
- hardware_options: Optional[HardwareOptions][source]#
The HardwareOptions used in the compilation from the quantum-device layer to the control-hardware layer.
- _import_backend_if_str(fun: Callable[[quantify_scheduler.schedules.schedule.Schedule, Any], quantify_scheduler.schedules.schedule.Schedule]) Callable[[quantify_scheduler.schedules.schedule.Schedule, Any], quantify_scheduler.schedules.schedule.Schedule] [source]#