From 74b86173e93daa53ef87a535fe897773bcc7827b Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sat, 28 Dec 2024 00:22:23 +0400 Subject: [PATCH 1/2] fix: compilation error when running mixer calibration --- src/qibolab/instruments/qm/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qibolab/instruments/qm/config.py b/src/qibolab/instruments/qm/config.py index 578efc24a..7915f1b91 100644 --- a/src/qibolab/instruments/qm/config.py +++ b/src/qibolab/instruments/qm/config.py @@ -11,7 +11,7 @@ SAMPLING_RATE = 1 """Sampling rate of Quantum Machines OPX in GSps.""" -DEFAULT_INPUTS = {1: {}, 2: {}} +DEFAULT_INPUTS = {1: {"offset": 0}, 2: {"offset": 0}} """Default controller config section. Inputs are always registered to avoid issues with automatic mixer @@ -57,7 +57,7 @@ def register_port(self, port): controllers[port.device] = {"type": "opx1000", "fems": {}} else: controllers[port.device] = { - "analog_inputs": DEFAULT_INPUTS, + "analog_inputs": DEFAULT_INPUTS.copy(), "digital_outputs": {}, } @@ -66,7 +66,7 @@ def register_port(self, port): if port.fem_number not in fems: fems[port.fem_number] = { "type": port.fem_type, - "analog_inputs": DEFAULT_INPUTS, + "analog_inputs": DEFAULT_INPUTS.copy(), "digital_outputs": {}, } device = fems[port.fem_number] From 4d9895aca0adc7e2479aa321e86238d195b0f518 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sat, 28 Dec 2024 00:35:15 +0400 Subject: [PATCH 2/2] fix: tests --- tests/test_instruments_qm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_instruments_qm.py b/tests/test_instruments_qm.py index fee863370..f018e554e 100644 --- a/tests/test_instruments_qm.py +++ b/tests/test_instruments_qm.py @@ -158,7 +158,7 @@ def test_qm_register_port(qmcontroller, offset): controllers = qmcontroller.config.controllers assert controllers == { "con1": { - "analog_inputs": {1: {}, 2: {}}, + "analog_inputs": {1: {"offset": 0}, 2: {"offset": 0}}, "analog_outputs": {1: {"offset": offset, "filter": {}}}, "digital_outputs": {}, } @@ -173,7 +173,7 @@ def test_qm_register_port_filter(qmcontroller): controllers = qmcontroller.config.controllers assert controllers == { "con1": { - "analog_inputs": {1: {}, 2: {}}, + "analog_inputs": {1: {"offset": 0}, 2: {"offset": 0}}, "analog_outputs": { 2: { "filter": {"feedback": [0.95], "feedforward": [1, -1]},