qilimanjaro-tech / qililab

Qililab is a generic and scalable quantum control library used for fast characterization and calibration of quantum chips. Qililab also offers the ability to execute high-level quantum algorithms with your quantum hardware.
Apache License 2.0
29 stars 2 forks source link

Add threshold to qblox_measurement_result.py in QProgram #704

Closed 4dri8 closed 4 months ago

4dri8 commented 5 months ago

Feature details

I would like the possibility to get the thresholded acquisitions other than the IQ array, just like Qililab does.

Implementation

This idea is already working, not sure if it is well written and general. In the measurement_result.py the next property should be added:

    @property
    @abstractmethod
    def threshold(self) -> np.ndarray:
        """Returns the thresholded data for the result.

        Returns:
            np.ndarray: Thresholded data for the result.
        """

And in qblox_measurement_result.py this property which returns the thresholded bins from the raw results:

    @property
    def threshold(self) -> np.ndarray:
        """Get the thresholded data as an np.ndarray.

        Returns:
            np.ndarray: The thresholded data.
        """
        return np.array(self.raw_measurement_data["bins"]["threshold"])

How important would you say this feature is?

1: Not important. Would be nice to have.

Additional information

No response

linear[bot] commented 5 months ago

QHC-300 Add threshold to qblox_measurement_result.py in QProgram

GuillermoAbadLopez commented 4 months ago

PR tackling this: https://github.com/qilimanjaro-tech/qililab/pull/718