measurement_factories ===================== .. py:module:: quantify_scheduler.operations.measurement_factories .. autoapi-nested-parse:: A module containing factory functions for measurements on the quantum-device layer. These factories are used to take a parametrized representation of on a operation and use that to create an instance of the operation itself. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: quantify_scheduler.operations.measurement_factories.dispersive_measurement quantify_scheduler.operations.measurement_factories.optical_measurement .. py:function:: dispersive_measurement(pulse_amp: float, pulse_duration: float, port: str, clock: str, acq_duration: float, acq_delay: float, acq_channel: Hashable, acq_channel_override: Hashable | None, acq_index: int, acq_protocol: str | None, pulse_type: Literal[quantify_scheduler.operations.pulse_library.SquarePulse] = 'SquarePulse', bin_mode: quantify_scheduler.enums.BinMode | None = BinMode.AVERAGE, acq_protocol_default: str = 'SSBIntegrationComplex', reset_clock_phase: bool = True, reference_magnitude: Optional[quantify_scheduler.operations.pulse_library.ReferenceMagnitude] = None, acq_weights_a: List[complex] | numpy.ndarray | None = None, acq_weights_b: List[complex] | numpy.ndarray | None = None, acq_weights_sampling_rate: float | None = None, feedback_trigger_label: Optional[str] = None, acq_rotation: float | None = None, acq_threshold: float | None = None) -> quantify_scheduler.Operation Generator function for a standard dispersive measurement. A dispersive measurement (typically) exists of a pulse being applied to the device followed by an acquisition protocol to interpret the signal coming back from the device. .. py:function:: optical_measurement(pulse_amplitudes: List[float], pulse_durations: List[float], pulse_ports: List[str], pulse_clocks: List[str], acq_duration: float, acq_delay: float, acq_port: str, acq_clock: str, acq_channel: Hashable, acq_channel_override: Hashable | None, acq_index: int, bin_mode: quantify_scheduler.enums.BinMode | None, acq_protocol: Literal[quantify_scheduler.operations.acquisition_library.Trace, quantify_scheduler.operations.acquisition_library.TriggerCount] | None, acq_protocol_default: Literal[quantify_scheduler.operations.acquisition_library.Trace, quantify_scheduler.operations.acquisition_library.TriggerCount], pulse_type: Literal[quantify_scheduler.operations.pulse_library.SquarePulse]) -> quantify_scheduler.Operation Generator function for an optical measurement with multiple excitation pulses. An optical measurement generates a square pulse in the optical range and uses either the Trace acquisition to return the output of a photon detector as a function of time or the TriggerCount acquisition to return the number of photons that are collected. All pulses can have different amplitudes, durations, ports and clocks. All pulses start simultaneously. The acquisition can have an ``acq_delay`` with respect to the pulses. A negative ``acq_delay`` causes the acquisition to be scheduled at time 0 and the pulses at the positive time ``-acq_delay``. :param pulse_amplitudes: list of amplitudes of the corresponding pulses :param pulse_durations: list of durations of the corresponding pulses :param pulse_ports: Port names, where the corresponding pulses are applied :param pulse_clocks: Clock names of the corresponding pulses :param acq_duration: Duration of the acquisition :param acq_delay: Delay between the start of the readout pulse and the start of the acquisition: acq_delay = t0_pulse - t0_acquisition. :param acq_port: Port name of the acquisition :param acq_clock: Clock name of the acquisition :param acq_channel: Default acquisition channel of the device element :param acq_channel_override: Acquisition channel of the operation :param acq_index: Acquisition index as defined in the Schedule :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list. "average" which stores the count value of the new result and the old register value is not currently implemented. ``None`` internally resolves to ``BinMode.APPEND``. :param acq_protocol: Acquisition protocol. "Trace" returns a time trace of the collected signal. "TriggerCount" returns the number of times the trigger threshold is surpassed. :param acq_protocol_default: Acquisition protocol if ``acq_protocol`` is None :param pulse_type: Shape of the pulse to be generated :returns: Operation with the generated pulses and acquisition :raises ValueError: If first four function arguments do not have the same length. :raises NotImplementedError: If an unknown ``pulse_type`` or ``acq_protocol`` are used.