Source code for qblox_scheduler.backends.types.qblox.calibration
# 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 typing import Optional
from qblox_scheduler.backends.types.common import (
ExpCoeffs, # noqa: F401 (re-exported for backwards compatibility)
IHPCoeffs, # noqa: F401 (re-exported for backwards compatibility)
)
from qblox_scheduler.structure.model import DataStructure
RealInputGain = int
"""
Input gain settings for a real input connected to a port-clock combination.
This gain value will be set on the QRM input ports
that are connected to this port-clock combination.
.. admonition:: Example
:class: dropdown
.. code-block:: python
hardware_compilation_config.hardware_options.input_gain = {
"q0:res-q0.ro": RealInputGain(2),
}
"""
OutputAttenuation = float
"""
Output attenuation setting for a port-clock combination.
This attenuation value will be set on each control-hardware output
port that is connected to this port-clock combination.
.. admonition:: Example
:class: dropdown
.. code-block:: python
hardware_compilation_config.hardware_options.output_att = {
"q0:res-q0.ro": OutputAttenuation(10),
}
"""
InputAttenuation = float
"""
Input attenuation setting for a port-clock combination.
This attenuation value will be set on each control-hardware output
port that is connected to this port-clock combination.
.. admonition:: Example
:class: dropdown
.. code-block:: python
hardware_compilation_config.hardware_options.input_att = {
"q0:res-q0.ro": InputAttenuation(10),
}
"""
[docs]
class DigitizationThresholds(DataStructure):
"""The settings that determine when an analog voltage is counted as a pulse."""
analog_threshold: Optional[float] = None
"""
For QTM modules only, this is the voltage threshold above which an input signal is
registered as high.
"""
[docs]
class NetZeroPulseParameters(DataStructure):
"""The settings to control the net-zero compensation pulse."""
max_amplitude: float
"""The maximum amplitude of the net-zero compensation pulse, in V/V_max."""
slew_rate: float
"""The slew rate of the net-zero compensation pulse, in V/V_max/s."""
__all__ = [
"ComplexInputGain",
"DigitizationThresholds",
"InputAttenuation",
"NetZeroPulseParameters",
"OutputAttenuation",
"RealInputGain",
]