Skip to content

Python Utils Feedback Model

zhinst.utils.feedback_model

Feedback Data Latency model for PQSC, SHF- and HDAWG systems.

Typical usage example:

model = QCCSFeedbackModel(
    description=get_feedback_system_description(
        generator_type=SGType.HDAWG,
        analyzer_type=QAType.SHFQA,
        pqsc_mode=PQSCMode.DECODER
    )
)

FeedbackPath

Bases: IntEnum

Different handling of feedback data from the PQSC.

.. versionadded:: 0.3

INTERNAL = 3 class-attribute instance-attribute

ZSYNC = 1 class-attribute instance-attribute

PQSCMode

Bases: IntEnum

Different handling of feedback data from the PQSC.

DECODER = 2 class-attribute instance-attribute

REGISTER_FORWARD = 1 class-attribute instance-attribute

QAType

Bases: IntEnum

Different quantum analyzer types used in a QCCS setup.

SHFQA = 1 class-attribute instance-attribute

SHFQC = 2 class-attribute instance-attribute

QCCSFeedbackModel dataclass

A model that calculates the latency of feedback data.

Estimates are provided for the selected Signal Generator. The 'start trigger' from the PQSC is used as starting point for the latency estimate.

Attributes:

Name Type Description
description QCCSSystemDescription

The QCCS system configuration description as returned from get_feedback_system_description()

description: QCCSSystemDescription instance-attribute

get_latency(length)

Provide the expected latency relative to the integration length.

Parameters:

Name Type Description Default
length int

Integration length in samples

required

Returns:

Type Description
int

The expected latency in AWG clock cycles

QCCSSystemDescription dataclass

Describe the behavior of a QCCS system with respect to feedback latency.

initial_latency_cycles: int instance-attribute

[clock cycles] Minimum latency for the smallest amount of integration length.

initial_steps: int instance-attribute

[steps] Integration length increment steps, until the first latency increment.

latency_in_period_cycles: int = 25 class-attribute instance-attribute

[clock cycles] Latency increment for a full period.

pattern: List[Tuple[int, int]] instance-attribute

[(clock cycles, steps),...] The pattern of periodic latency increments with respect to integration length increments

period_steps: int = 50 class-attribute instance-attribute

[steps] Period of the latency increment pattern.

rtlogger_correction: int = 0 class-attribute instance-attribute

[clock cycles] Correction needed on top of the RTLogger recorded latency, to match the latency seen by the sequencer

SGType

Bases: IntEnum

Different signal generator types used in a QCCS setup.

HDAWG = 1 class-attribute instance-attribute

SHFQC = 3 class-attribute instance-attribute

SHFSG = 2 class-attribute instance-attribute

get_feedback_system_description(generator_type, analyzer_type, pqsc_mode=None, feedback_path=FeedbackPath.ZSYNC)

Returns a QCCSSysDescription object for a given configuration.

Parameters:

Name Type Description Default
generator_type SGType

Signal generator used (SHFSG/HDAWG).

required
analyzer_type QAType

Quantum analyzer used.

required
pqsc_mode PQSCMode

Mode of operation for the PQSC.

None
feedback_path FeedbackPath

Used only when the generator type is SHFQC to select between local feedback or through PQSC

ZSYNC

Returns:

Type Description
QCCSSystemDescription

A QCCS system description object to be used in a QCCSFeedbackModel object.

Raises:

Type Description
ValueError

Incorrect values for 'generator_type', 'analyzer_type', 'pqsc_mode' or 'feedback_path'.

.. versionchanged:: 0.3

Added `feedback_path` argument.