qat.runtime.post_processing module
- apply_post_processing(response, post_processing, axes)
Applies software post processing to the results.
Uses the information in the
PostProcessinginstruction to determine what method to apply.- Parameters:
response¶ (
ndarray) – Readout results from an execution engine.post_processing¶ (
PostProcessing) – The post processing instruction.axes¶ (
dict[ProcessAxis,int]) – A dictionary containing which axes contain the shots and which contain time series.
- Return type:
tuple[ndarray,dict[ProcessAxis,int]]- Returns:
The processed results as an array and the axis map.
- discriminate(response, axes, threshold)
Discriminates a real value to a classical bit by comparison to a supplied discrimination threshold.
- Parameters:
- Returns:
The processed results as an array and the axis map.
- get_axis_map(mode, response)
Given the acquisition mode, determine what each axis corresponds to.
The way the results are returned are defined by the acquisition mode: this could be averaged over shots, averaged over time, or neither. We must determine how to unpack the results.
- linear_map_complex_to_real(response, axes, multiplier, constant)
Maps complex values onto a real z-projection using a provided linear mapping.
- Parameters:
response¶ (np.ndarray) – Readout results from an execution engine.
axes¶ (dict[ProcessAxis, Int]) – A dictionary containing which axes contain the shots and which contain time series.
multiplier¶ (numbers.Number) – Coeffecient for the linear map.
constant¶ (numbers.Number) – Constant for the linear map.
- Returns:
The processed results as an array and the axis map.
- mean(response, axes, target_axes)
Calculates the mean over the given axes.
- Parameters:
- Returns:
The processed results as an array and the axis map.