measurement_factories#
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#
|
Generator function for a standard dispersive measurement. |
|
Generator function for an optical measurement with multiple excitation pulses. |
- 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: quantify_scheduler.operations.pulse_library.ReferenceMagnitude | None = 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: str | None = None, acq_rotation: float | None = None, acq_threshold: float | None = None) quantify_scheduler.Operation [source]#
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.
- 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 [source]#
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 negativeacq_delay
causes the acquisition to be scheduled at time 0 and the pulses at the positive time-acq_delay
.- Parameters:
pulse_amplitudes – list of amplitudes of the corresponding pulses
pulse_durations – list of durations of the corresponding pulses
pulse_ports – Port names, where the corresponding pulses are applied
pulse_clocks – Clock names of the corresponding pulses
acq_duration – Duration of the acquisition
acq_delay – Delay between the start of the readout pulse and the start of the acquisition: acq_delay = t0_pulse - t0_acquisition.
acq_port – Port name of the acquisition
acq_clock – Clock name of the acquisition
acq_channel – Default acquisition channel of the device element
acq_channel_override – Acquisition channel of the operation
acq_index – Acquisition index as defined in the Schedule
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 toBinMode.APPEND
.acq_protocol – Acquisition protocol. “Trace” returns a time trace of the collected signal. “TriggerCount” returns the number of times the trigger threshold is surpassed.
acq_protocol_default – Acquisition protocol if
acq_protocol
is Nonepulse_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.
NotImplementedError – If an unknown
pulse_type
oracq_protocol
are used.