Skip to content

Commit

Permalink
Merge commit '54b2b16eeb95ff32e85a9f115b0f8e57c3ef9c23' into feat/pyt…
Browse files Browse the repository at this point in the history
…hon3_12
  • Loading branch information
nulinspiratie committed Dec 9, 2024
2 parents c4f05ca + 54b2b16 commit 5d7d9aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 12 additions & 8 deletions qualang_tools/external_frameworks/qcodes/opx_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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):
"""
Expand Down

0 comments on commit 5d7d9aa

Please sign in to comment.