diff --git a/CHANGELOG.md b/CHANGELOG.md index dc42be59..99552efb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Fixed +- control_panel - Fix voltage booking error introduced in the previous fix. - control_panel - Fix rounding error in `ManualOutputControl` that caused voltage drifts. - octave_tools - Fix bug when setting calibrate to False in ``get_correction_for_each_LO_and_IF()``. - unit - ``to_clock_cycles()`` now always returns an integer. diff --git a/qualang_tools/control_panel/manual_output_control.py b/qualang_tools/control_panel/manual_output_control.py index da9d2151..9e18b673 100644 --- a/qualang_tools/control_panel/manual_output_control.py +++ b/qualang_tools/control_panel/manual_output_control.py @@ -247,13 +247,10 @@ def set_amplitude(self, element, value, ignore_missing_elements=False): raise Exception(f"The absolute value of the amplitude must smaller than 0.5, {value} was given") prev_value = self.analog_data[element]["amplitude"] - if value != 0: - delta_value = (value - prev_value) * (1 / self.ANALOG_WAVEFORM_AMPLITUDE) - delta_value = _round_to_fixed_point_accuracy(delta_value) - if delta_value == 0: - return - else: - delta_value = value + delta_value = (value - prev_value) * (1 / self.ANALOG_WAVEFORM_AMPLITUDE) + delta_value = _round_to_fixed_point_accuracy(delta_value) + if delta_value == 0: + return self.analog_data[element]["amplitude"] = _floor_to_fixed_point_accuracy( prev_value + delta_value * self.ANALOG_WAVEFORM_AMPLITUDE ) @@ -618,10 +615,7 @@ def _QUA_update_freq_or_amp(self, input1, input2): with switch_(input1): for i in range(len(self.analog_elements)): with case_(i): - with if_(a == 0): - ramp_to_zero(self.analog_elements[i], 1) - with else_(): - play("play" * amp(a), self.analog_elements[i]) + play("play" * amp(a), self.analog_elements[i]) with else_(): freq = declare(int) assign(freq, input2)