Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for running QM mixer calibration #1127

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading