diff --git a/CHANGELOG.md b/CHANGELOG.md index 38d58573..5951f98d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added - Support for Python 3.12 +### Fixed +- external_frameworks/qcodes - Fixed the driver to be compatible with qm-qua==1.2.1. + ## [0.18.1] - 2024-11-05 ### Added - wirer - Support for fixed-frequency transmons, i.e., cross-resonant drive lines and zz drive lines diff --git a/qualang_tools/external_frameworks/qcodes/opx_driver.py b/qualang_tools/external_frameworks/qcodes/opx_driver.py index 8bf76725..1808045e 100644 --- a/qualang_tools/external_frameworks/qcodes/opx_driver.py +++ b/qualang_tools/external_frameworks/qcodes/opx_driver.py @@ -364,16 +364,18 @@ def _extend_result(self, gene, count, averaging_buffer): self.results["buffers"].append([]) self.results["scale_factor"].append(1) # Check if next buffer is for averaging - if len(gene.values[2].list_value.values[1].list_value.values) > 0: - if gene.values[2].list_value.values[1].list_value.values[0].string_value == "average": - averaging_buffer = True + if hasattr(gene.values[2].list_value.values[1], "list_value"): + if len(gene.values[2].list_value.values[1].list_value.values) > 0: + if gene.values[2].list_value.values[1].list_value.values[0].string_value == "average": + averaging_buffer = True elif gene.values[0].string_value == "buffer": if not averaging_buffer: self.results["buffers"][count].append(int(gene.values[1].string_value)) # Check if next buffer is for averaging - if len(gene.values[2].list_value.values[1].list_value.values) > 0: - if gene.values[2].list_value.values[1].list_value.values[0].string_value == "average": - averaging_buffer = True + if hasattr(gene.values[2].list_value.values[1], "list_value"): + if len(gene.values[2].list_value.values[1].list_value.values) > 0: + if gene.values[2].list_value.values[1].list_value.values[0].string_value == "average": + averaging_buffer = True else: averaging_buffer = False elif gene.values[0].string_value == "@macro_adc_trace": @@ -383,9 +385,11 @@ def _extend_result(self, gene, count, averaging_buffer): else: pass if len(gene.values) > 2: - self._extend_result(gene.values[2].list_value, count, averaging_buffer) + if hasattr(gene.values[2], "list_value"): + self._extend_result(gene.values[2].list_value, count, averaging_buffer) elif gene.values[0].string_value == "average": - self._extend_result(gene.values[1].list_value, count, averaging_buffer) + if hasattr(gene.values[1], "list_value"): + self._extend_result(gene.values[1].list_value, count, averaging_buffer) def _get_stream_processing(self, prog): """