quantify_scheduler.operations.acquisition_library
Standard acquisition protocols for use with the quantify_scheduler.
Module Contents
Classes
This class is used to help differentiate an acquisition operation from the regular |
|
The Trace acquisition protocol measures a signal s(t). |
|
Weighted integration acquisition protocol on a |
|
This class implements a SingleSideBand Integration acquisition protocol with |
|
Implements a WeightedIntegratedComplex class using parameterized waveforms and |
|
Trigger counting acquisition protocol returning an integer. |
- class AcquisitionOperation(name: str, data: dict = None)[source]
Bases:
quantify_scheduler.Operation
This class is used to help differentiate an acquisition operation from the regular operations. This enables us to use
plot_acquisition_operations()
to highlight acquisition pulses in the pulse diagrams.
- class Trace(duration: float, port: str, clock: str, acq_channel: int = 0, acq_index: int = 0, bin_mode: Union[quantify_scheduler.enums.BinMode, str] = BinMode.AVERAGE, t0: float = 0, data: Optional[dict] = None)[source]
Bases:
AcquisitionOperation
The Trace acquisition protocol measures a signal s(t).
Creates a new instance of Trace. The Trace acquisition protocol measures a signal s(t).
Only processing performed is rescaling and adding units based on a calibrated scale. Values are returned as a raw trace (numpy array of float datatype). Length of this array depends on the sampling rate of the acquisition device.
- Parameters:
port – The acquisition port.
clock – The clock used to demodulate the acquisition.
duration – The acquisition duration in seconds.
acq_channel – The data channel in which the acquisition is stored, is by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.
acq_index – The data register in which the acquisition is stored, by default 0. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).
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 or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND
t0 – The acquisition start time in seconds, by default 0
data –
The operation’s dictionary, by default None
Note: if the data parameter is not None all other parameters are overwritten using the contents of data.
Deprecated: support for the data argument will be dropped in quantify-scheduler >= 0.13.0. Please consider updating the data dictionary after initialization.
- class WeightedIntegratedComplex(waveform_a: Dict[str, Any], waveform_b: Dict[str, Any], port: str, clock: str, duration: float, acq_channel: int = 0, acq_index: int = 0, bin_mode: Union[quantify_scheduler.enums.BinMode, str] = BinMode.APPEND, phase: float = 0, t0: float = 0, data: Optional[dict] = None)[source]
Bases:
AcquisitionOperation
Weighted integration acquisition protocol on a complex signal in a custom complex window.
Creates a new instance of WeightedIntegratedComplex. Weighted integration acquisition protocol on a complex signal in a custom complex window.
A weighted integrated acquisition on a complex signal using custom complex windows.
Weights are applied as:
\[\widetilde{A} = \int ( \mathrm{Re}(S(t))\cdot \mathrm{Re}(W_A(t)) + \mathrm{Im}(S(t))\cdot \mathrm{Im}(W_A(t)) ) \mathrm{d}t\]\[\widetilde{B} = \int ( \mathrm{Re}(S(t))\cdot \mathrm{Re}(W_B(t)) + \mathrm{Im}(S(t))\cdot \mathrm{Im}(W_B(t)) ) \mathrm{d}t\]- Parameters:
waveform_a – The complex waveform used as integration weights \(A(t)\).
waveform_b – The complex waveform used as integration weights \(B(t)\).
port – The acquisition port.
clock – The clock used to demodulate the acquisition.
duration – The acquisition duration in seconds.
acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.
acq_index – The data register in which the acquisition is stored, by default 0. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).
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 or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND
phase – The phase of the pulse and acquisition in degrees, by default 0
t0 – The acquisition start time in seconds, by default 0
data – The operation’s dictionary, by default Nonen Note: if the data parameter is not None all other parameters are overwritten using the contents of data.n Deprecated: support for the data argument will be dropped in quantify-scheduler >= 0.13.0. Please consider updating the data dictionary after initialization.
- Raises:
- class SSBIntegrationComplex(port: str, clock: str, duration: float, acq_channel: int = 0, acq_index: int = 0, bin_mode: Union[quantify_scheduler.enums.BinMode, str] = BinMode.AVERAGE, phase: float = 0, t0: float = 0, data: Optional[dict] = None)[source]
Bases:
AcquisitionOperation
This class implements a SingleSideBand Integration acquisition protocol with complex results.
Creates a new instance of SSBIntegrationComplex. Single Sideband Integration acquisition protocol with complex results.
A weighted integrated acquisition on a complex signal using a square window for the acquisition weights.
The signal is demodulated using the specified clock, and the square window then effectively specifies an integration window.
- Parameters:
port – The acquisition port.
clock – The clock used to demodulate the acquisition.
duration – The acquisition duration in seconds.
acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.
acq_index – The data register in which the acquisition is stored, by default 0. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).
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 or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.AVERAGE
phase – The phase of the pulse and acquisition in degrees, by default 0
t0 – The acquisition start time in seconds, by default 0
data –
The operation’s dictionary, by default None
Note: if the data parameter is not None all other parameters are overwritten using the contents of data.
Deprecated: support for the data argument will be dropped in quantify-scheduler >= 0.13.0. Please consider updating the data dictionary after initialization.
- class NumericalWeightedIntegrationComplex(weights_a: Union[List[complex], numpy.ndarray], weights_b: Union[List[complex], numpy.ndarray], t: Union[List[float], numpy.ndarray], port: str, clock: str, interpolation: str = 'linear', acq_channel: int = 0, acq_index: int = 0, bin_mode: Union[quantify_scheduler.enums.BinMode, str] = BinMode.APPEND, phase: float = 0, t0: float = 0, data: Optional[dict] = None)[source]
Bases:
WeightedIntegratedComplex
Implements a WeightedIntegratedComplex class using parameterized waveforms and interpolation as the integration weights.
Creates a new instance of NumericalWeightedIntegrationComplex. NumericalWeightedIntegrationComplex inherits from
WeightedIntegratedComplex
that uses parameterized waveforms and interpolation as integration weights.Weights are applied as:
\[\widetilde{A} = \int ( \mathrm{Re}(S(t))\cdot \mathrm{Re}(W_A(t)) + \mathrm{Im}(S(t))\cdot \mathrm{Im}(W_A(t)) ) \mathrm{d}t\]\[\widetilde{B} = \int ( \mathrm{Re}(S(t))\cdot \mathrm{Re}(W_B(t)) + \mathrm{Im}(S(t))\cdot \mathrm{Im}(W_B(t)) ) \mathrm{d}t\]- Parameters:
weights_a – The list of complex values used as weights \(A(t)\) on the incoming complex signal.
weights_b – The list of complex values used as weights \(B(t)\) on the incoming complex signal.
t – The time values of each weight.
port – The acquisition port.
clock – The clock used to demodulate the acquisition.
interpolation – The type of interpolation to use, by default “linear”. This argument is passed to
interp1d
.acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.
acq_index – The data register in which the acquisition is stored, by default 0. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).
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 or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND
phase – The phase of the pulse and acquisition in degrees, by default 0
t0 – The acquisition start time in seconds, by default 0
data – The operation’s dictionary, by default Nonen Note: if the data parameter is not None all other parameters are overwritten using the contents of data.n Deprecated: support for the data argument will be dropped in quantify-scheduler >= 0.13.0. Please consider updating the data dictionary after initialization.
- class TriggerCount(port: str, clock: str, duration: float, acq_channel: int = 0, acq_index: int = 0, bin_mode: Union[quantify_scheduler.enums.BinMode, str] = BinMode.APPEND, t0: float = 0)[source]
Bases:
AcquisitionOperation
Trigger counting acquisition protocol returning an integer.
Creates a new instance of TriggerCount, trigger counting acquisition protocol, returning an integer.
The trigger acquisition mode is used to measure how many times the trigger level is surpassed. The level is set in the hardware configuration.
- Parameters:
port – The acquisition port.
clock – The clock used to demodulate the acquisition.
duration – The acquisition duration in seconds.
acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.
acq_index – The data register in which the acquisition is stored, by default 0. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).
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 or “average” which stores the count value of the new result and the old register value, by default BinMode.APPEND
t0 – The acquisition start time in seconds, by default 0