Source code for quantify_scheduler.backends.qblox.enums

# Repository: https://gitlab.com/quantify-os/quantify-scheduler
# Licensed according to the LICENCE file on the main branch
"""Enums used by Qblox backend."""
from __future__ import annotations

from enum import Enum


[docs] class ChannelMode(str, Enum): """Enum for the channel mode of the Sequencer."""
[docs] COMPLEX = "complex"
[docs] REAL = "real"
[docs] DIGITAL = "digital"
[docs] class QbloxFilterConfig(str, Enum): """Configuration of a filter."""
[docs] BYPASSED = "bypassed"
[docs] ENABLED = "enabled"
[docs] DELAY_COMP = "delay_comp"
[docs] class QbloxFilterMarkerDelay(str, Enum): """Marker delay setting of a filter."""
[docs] BYPASSED = "bypassed"
[docs] DELAY_COMP = "delay_comp"
[docs] class DistortionCorrectionLatencyEnum(int, Enum): """Settings related to distortion corrections."""
[docs] NO_DELAY_COMP = 0
"""Setting for no distortion correction delay compensation"""
[docs] BT = 1
"""Setting for delay compensation equal to bias tee correction"""
[docs] EXP0 = 2
"""Setting for delay compensation equal to exponential overshoot or undershoot correction"""
[docs] EXP1 = 4
"""Setting for delay compensation equal to exponential overshoot or undershoot correction"""
[docs] EXP2 = 8
"""Setting for delay compensation equal to exponential overshoot or undershoot correction"""
[docs] EXP3 = 16
"""Setting for delay compensation equal to exponential overshoot or undershoot correction"""
[docs] FIR = 32
"""Setting for delay compensation equal to FIR filter""" def __int__(self) -> int: """Enable direct conversion to int.""" return self.value def __index__(self) -> int: """Support index operations.""" return self.value def __and__(self, other: DistortionCorrectionLatencyEnum | int) -> int: """Support bitwise AND operations.""" if isinstance(other, Enum): return self.value & other.value return self.value & other def __rand__(self, other: DistortionCorrectionLatencyEnum | int) -> int: """Support bitwise AND operations, other order.""" return self.__and__(other) def __or__(self, other: DistortionCorrectionLatencyEnum | int) -> int: """Support bitwise OR operations.""" if isinstance(other, Enum): return self.value | other.value return self.value | other def __ror__(self, other: DistortionCorrectionLatencyEnum | int) -> int: """Support bitwise OR operations, other order.""" return self.__or__(other)
[docs] class LoCalEnum(str, Enum): """Settings related to the LO part of automatic mixer corrections."""
[docs] OFF = "off"
[docs] ON_LO_FREQ_CHANGE = "on_lo_freq_change"
[docs] ON_LO_INTERM_FREQ_CHANGE = "on_lo_interm_freq_change"
[docs] class SidebandCalEnum(str, Enum): """Settings related to the NCO part of automatic mixer corrections."""
[docs] OFF = "off"
[docs] ON_INTERM_FREQ_CHANGE = "on_interm_freq_change"
[docs] class TimetagTraceType(str, Enum): """Types trace acquisition possible for a QTM."""
[docs] SCOPE = "scope"
[docs] TIMETAG = "timetag"