Source code for qblox_scheduler.backends.types.qblox.filters
# SPDX-FileCopyrightText: Copyright 2020-2025, Quantify Consortium
# SPDX-FileCopyrightText: © 2025 Qblox <https://qblox.com>
# SPDX-License-Identifier: BSD-3-Clause
"""Python dataclasses for compilation to Qblox hardware."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from dataclasses_json import DataClassJsonMixin
from qblox_scheduler.backends.qblox.enums import FilterConfig, FilterMarkerDelay
from qblox_scheduler.backends.types.common import ExpCoeffs, IHPCoeffs
@dataclass
class RealTimeFilterBase(DataClassJsonMixin):
"""An individual real time filter on Qblox hardware."""
config: FilterConfig = FilterConfig.BYPASSED
"""Configuration of the filter.
One of 'BYPASSED', 'ENABLED',
or 'DELAY_COMP'."""
marker_delay: FilterMarkerDelay = FilterMarkerDelay.BYPASSED
"""State of the marker delay.
One of 'BYPASSED' or 'ENABLED'."""
[docs]
@dataclass
class ExpOvershootFilter(RealTimeFilterBase):
"""An individual real time filter on Qblox hardware."""
coeffs: Optional[ExpCoeffs] = None
"""Coefficient(s) of the filter.
Can be None if there is no filter
or if it is inactive."""
[docs]
@dataclass
class FIRFilter(RealTimeFilterBase):
"""An individual real time filter on Qblox hardware."""
coeffs: Optional[list[float]] = None
"""Coefficient(s) of the filter.
Can be None if there is no filter
or if it is inactive."""
[docs]
@dataclass
class IHPFilter(RealTimeFilterBase):
"""An individual real time filter on Qblox hardware."""
coeffs: Optional[IHPCoeffs] = None
"""Coefficient(s) of the filter.
Can be None if there is no filter
or if it is inactive."""
__all__ = ["ExpOvershootFilter", "FIRFilter", "IHPFilter"]