# Repository: https://gitlab.com/quantify-os/quantify-scheduler
# Licensed according to the LICENCE file on the main branch
"""Constants for compilation to Qblox hardware."""
"""Size of gain instruction immediates in Q1ASM programs."""
"""Max size of wait instruction immediates in Q1ASM programs. Max value allowed by
assembler is 2**16-1, but this is the largest that is a multiple of 4 ns."""
"""Size of offset instruction immediates in Q1ASM programs."""
[docs]REGISTER_SIZE = pow(2, 32) - 1
"""Size of registers in Q1ASM programs."""
[docs]NCO_PHASE_DEG_STEP_COARSE = 0.9
"""The phase (in deg) corresponding to an increase of 1 in the course argument of the
q1asm instructions related to the NCO phases."""
[docs]NCO_PHASE_NUM_STEP_COARSE = 400
"""The maximum value of the course argument of the nco phase instructions."""
[docs]NCO_PHASE_DEG_STEP_FINE = 2.25e-3
"""The phase (in deg) corresponding to an increase of 1 in the fine argument of the
q1asm instructions related to the NCO phases."""
[docs]NCO_PHASE_NUM_STEP_FINE = 400
"""The maximum value of the fine argument of the nco phase instructions."""
[docs]NCO_PHASE_DEG_STEP_U_FINE = 3.6e-7
"""The phase (in deg) corresponding to an increase of 1 in the ultra-fine argument of
the q1asm instructions related to the NCO phases."""
[docs]NCO_PHASE_NUM_STEP_U_FINE = 6250
"""The maximum value of the ultra-fine argument of the nco phase instructions."""
"""
Clock period of the sequencers. All time intervals used must be multiples of this value.
"""
[docs]MIN_TIME_BETWEEN_ACQUISITIONS = 1000 # ns
"""Minimum time between two acquisitions to prevent FIFO errors."""
[docs]SAMPLING_RATE = 1_000_000_000 # 1GS/s
"""Sampling rate of the Qblox control/readout instruments."""
[docs]PULSE_STITCHING_DURATION = 1e-6
"""Duration of the individual pulses when pulse stitching is used."""
[docs]NUMBER_OF_SEQUENCERS_QCM = 6
"""Number of sequencers supported by a QCM in the latest firmware."""
[docs]NUMBER_OF_SEQUENCERS_QRM = 6
"""Number of sequencers supported by a QRM in the latest firmware."""
[docs]MIN_MIXER_PHASE_ERROR_DEG = -45
"""Lowest phase shift that can be configured in the instruments for mixer corrections.
"""
[docs]MAX_MIXER_PHASE_ERROR_DEG = 45
"""Lowest phase shift that can be configured in the instruments for mixer corrections.
"""
[docs]MIN_MIXER_AMP_RATIO = 0.5
"""Lowest value the amplitude correction can be set to. N.B. This correction is defined
as Q/I."""
[docs]MAX_MIXER_AMP_RATIO = 2.0
"""Highest value the amplitude correction can be set to. N.B. This correction is defined
as Q/I."""
[docs]NUMBER_OF_REGISTERS: int = 64
"""Number of registers available in the Qblox sequencers."""
[docs]DOWNCONVERTER_FREQ: float = 4.4e9
"""LO frequency used by the Qblox downconverter."""
[docs]GENERIC_IC_COMPONENT_NAME: str = "generic"
"""Default name for the generic instrument coordinator component."""