Skip to content

Commit

Permalink
Merge pull request #1127 from qiboteam/qm-default-inputs
Browse files Browse the repository at this point in the history
Fix for running QM mixer calibration
  • Loading branch information
stavros11 authored Jan 7, 2025
2 parents e00cfe1 + 4d9895a commit bfb48cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/qibolab/instruments/qm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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": {},
}

Expand All @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_instruments_qm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
}
Expand All @@ -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]},
Expand Down

0 comments on commit bfb48cc

Please sign in to comment.