Measure_CustomWaveforms#
- class iqm.pulse.gates.measure.Measure_CustomWaveforms(parent, name, locus, calibration_data, builder)#
Bases:
CustomIQWaveformsBase class for implementing dispersive measurement operations with custom probe pulse waveforms.
You may define a measurement implementation that uses the
WaveforminstancesSomethingandSomethingElseas the probe pulse waveforms in the I and Q channels as follows:class MyGate(Measure_CustomWaveforms, i_wave=Something, q_wave=SomethingElse).The
measureoperation is factorizable, and itsarityis 0, which together mean that it can operate on loci of any length, but is calibrated only on single component loci. When the gate is constructed in thelen(locus) > 1case (e.g.builder.get_implementation('measure', ('QB1', 'QB2', 'QB3'))()), the resultingTimeBoxis constructed from the calibrated single-component implementations.For each measured component, the readout
IQPulsewill be modulated with the intermediate frequency (IF), computed as the difference between the readout frequency of that component and the probe line center frequency, and offset in phase by the readout phase of the component.The measurement is implemented using a
ReadoutTriggerinstruction, with a duration set by the requirements of the acquisition(s). Note that this is typically different fromgates.measure.constant.{locus}.duration, which is the probe pulse duration.Module:
iqm.pulse.gates.measureAttributes
If set
True, the Q channel waveform is considered to depend on the I channel's waveform so that they share the waveform parameters, (e.g. a DRAG PRX implementation).Parameters independent of the of Waveforms.
wave_iWaveform for the I channel.
wave_qWaveform for the Q channel.
idUnique str identifier, needed for certain caching properties.
sub_implementationsSingle-component sub-implementations for factorizable gates with len(locus) > 1, otherwise empty.
Methods
Duration of the Schedule of the gate implementation (in seconds).
Get the name of the locus mapping stored in
ScheduleBuilder.ChipTopologyfor this implementation.Returns a "naked" probe timebox that supports convenient multiplexing through
MultiplexedProbeTimeBox.__add__.Returns a multiplexed simultaneous measurement with an additional time trace acquisition.
- Parameters:
parent (QuantumOp)
name (str)
locus (Locus)
calibration_data (OILCalibrationData)
builder (ScheduleBuilder)
- root_parameters: dict[str, Parameter | Setting] = {'acquisition_delay': Parameter(name='', label='Acquisition delay', unit='s', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), 'acquisition_type': Setting(parameter=Parameter(name='', label='Acquisition type', unit='', data_type=<DataType.STRING: 3>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), value='threshold', read_only=False, path=''), 'amplitude_i': Parameter(name='', label='Readout channel I amplitude', unit='', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), 'amplitude_q': Setting(parameter=Parameter(name='', label='Readout channel Q amplitude', unit='', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), value=0.0, read_only=False, path=''), 'duration': Parameter(name='', label='Readout pulse duration', unit='s', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), 'frequency': Parameter(name='', label='Readout pulse frequency', unit='Hz', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), 'integration_length': Parameter(name='', label='Integration length', unit='s', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), 'integration_threshold': Parameter(name='', label='Integration threshold', unit='', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None), 'integration_weights_I': Setting(parameter=Parameter(name='', label='Integration weights for channel I', unit='', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.NDARRAY: 2>, element_indices=None), value=array([], dtype=float64), read_only=False, path=''), 'integration_weights_Q': Setting(parameter=Parameter(name='', label='Integration weights for channel Q', unit='', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.NDARRAY: 2>, element_indices=None), value=array([], dtype=float64), read_only=False, path=''), 'phase': Parameter(name='', label='Readout pulse phase', unit='rad', data_type=<DataType.FLOAT: 1>, collection_type=<CollectionType.SCALAR: 0>, element_indices=None)}#
Parameters independent of the of Waveforms. Inheriting classes may override this to include parameters common to all such implementations.
- _build_instructions(waveform_params, root_params, if_freq)#
Builds a probe pulse and an acquisition method using the calibration data.
Subclasses may override this method if needed.
- probe_timebox(key='', feedback_key='', do_acquisition=True, **kwargs)#
Returns a “naked” probe timebox that supports convenient multiplexing through
MultiplexedProbeTimeBox.__add__.This method can be used if the user wants to control the multiplexing explicitly. With two
MultiplexedProbeTimeBox``es ``AandBthe resultA + Bhas all theReadoutTriggerinstructions on each probe channel ofAandBmultiplexed together and played simultaneously.- Parameters:
key (str) – The readout results generated on this trigger will be assigned to
f"{qubit}__{key}", wherequbitgoes over the component names inself.locus. If empty, the key “readout.result” will be used to maintain backwards compatibility.feedback_key (str) – The signals generated by this measure operation are routed using this key for fast feedback purposes. See
__call__().do_acquisition (bool) – if False, no acquisitions are added.
- Returns:
MultiplexedProbeTimeBox containing the ReadoutTrigger instruction.
- Return type:
- _call(key='', feedback_key='')#
Returns a TimeBox containing the multiplexed simultaneous measurement.
If
len(self.locus) == 1, the TimeBox contains the measurement for just that component, otherwise the measurements of components that belong to the same probeline are multiplexed together.The returned
TimeBoxinstances behave like any other TimeBox in scheduling and circuit generation. With measurement TimeBoxesAandBthe resultA + Bfirst plays theReadoutTriggerinstructions ofAand only then those ofBin each probe channel. If the multiplexing features ofMultiplexedProbeTimeBoxare needed, the methodprobe_timebox()can be used.In scheduling, the returned TimeBox blocks the locus components and the probe lines they are associated with.
- Parameters:
key (str) – Readout results generated on this trigger will be assigned to the acquisition labels
f"{qubit}__{key}", wherequbitgoes over the component names inself.locus. If empty, the key"readout.result"will be used to maintain backwards compatibility.feedback_key (str) – If the readout mode is “threshold”, the results generated by this
measureoperation are routed using the labelf"{qubit}__{feedback_key}"for fast feedback purposes. The signals are picked up byConditionalInstruction`s that have the same label. The default value `””`` means the signal is not routed anywhere. TODO: currently the HW does not support multiple feedback keys per drive channel, so the actual key used will beFEEDBACK_KEYwhenever any non-empty key is inputted. When the HW is improved, the actual key the user inputs should be passed.
- Returns:
TimeBox containing the
ReadoutTriggerinstruction.- Return type:
- _get_probe_timebox_for_time_trace(key='', feedback_key='')#
Utility method that can be overridden in subclasses if they have a return type .probe_pulse.
- time_trace(key='', acquisition_delay=None, acquisition_duration=None, feedback_key='')#
Returns a multiplexed simultaneous measurement with an additional time trace acquisition.
The returned
TimeBoxis the same as the one returned by__call__()except the time trace acquisition is appended to the acquisitions of each probe line’sReadoutTriggerinstruction.- Parameters:
key (str) – Readout results generated on this trigger will be used to assigned to
f"{qubit}__{key}", wherequbitgoes over the component names inself.locus, whereas the recorded time traces will be assigned tof"{probe_line}__{key}"whereprobe_linegoes through all the probe lines associated withself.locus. If empty, the key"readout.result"will be used for integrated results and the key"readout.time_trace"for the recorded time traces.acquisition_delay (float | None) – optionally override the time trace acquisition delay with this value (given in seconds). Does not affect the acqusition delays of the integrated measurements.
acquisition_duration (float | None) – optionally override the time trace acquisition duration with this value (given in seconds). Does not affect the integration lengths of the integrated measurements.
feedback_key (str) – The signals generated by the integration are routed using this label, prefixed by the component. See
__call__().
- Returns:
TimeBox containing the ReadoutTrigger instruction.
- Return type:
- duration_in_seconds()#
Duration of the Schedule of the gate implementation (in seconds).
Can be left unimplemented if the duration e.g. depends on the gate arguments. Subclasses can reimplement this method in case it makes sense in their context.
- Return type:
- classmethod get_locus_mapping_name(operation_name, implementation_name)#
Get the name of the locus mapping stored in
ScheduleBuilder.ChipTopologyfor this implementation.By default, it is
"<operation_name>.<implementation_name>". Inheriting classes may override this for different behaviour.