Commit 1c581663 authored by Edgar Reehuis's avatar Edgar Reehuis
Browse files

Fix weighted append acquisition (SE-219)

parent d8e5a1a6
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
- Acquisition - New acquisition protocol for thresholded acquisitions: `ThresholdedAcquisition` (!617)
- Pin version of `dataclasses-json` due to breaking pipelines. (!727)
- Schedulables - Store references to `Schedulables` in timing contraints as `string` rather than `Schedulable`. (!717)
- Qblox backend - Fix weighted acquisition in append mode. (!725)

## 0.15.0 (2023-07-13)

+7 −0
Original line number Diff line number Diff line
@@ -335,6 +335,13 @@ class WeightedAcquisitionStrategy(AcquisitionStrategyPartial):
                comment=f"Store acq in acq_channel:{self.acq_channel}, "
                f"bin_idx:{acq_bin_idx_reg}",
            )
            qasm_program.emit(
                q1asm_instructions.ADD,
                acq_bin_idx_reg,
                1,
                acq_bin_idx_reg,
                comment=f"Increment bin_idx for ch{self.acq_channel}",
            )
            qasm_program.emit(q1asm_instructions.NEW_LINE)
            qasm_program.elapsed_time += constants.GRID_TIME

+2 −2
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ class TestWeightedAcquisitionStrategy:
            },
        ]
        data = {
            "bin_mode": BinMode.AVERAGE,
            "bin_mode": BinMode.AVERAGE,  # FIXME: this is ignored
            "acq_channel": 2,
            "acq_index": 12,
            "waveforms": weights,
@@ -388,7 +388,6 @@ class TestWeightedAcquisitionStrategy:
        # act
        strategy.acquire_append(qasm)

        # assert
        assert qasm.instructions == [
            ["", "", "", ""],
            ["", "move", "0,R1", "# Store idx of acq I wave in R1"],
@@ -399,6 +398,7 @@ class TestWeightedAcquisitionStrategy:
                "2,R0,R1,R10,4",
                "# Store acq in acq_channel:2, bin_idx:R0",
            ],
            ["", "add", "R0,1,R0", "# Increment bin_idx for ch2"],
            ["", "", "", ""],
        ]