Skip to content

Commit 1406c5f

Browse files
fix: Skip also channels related to the qubit
1 parent 91cd552 commit 1406c5f

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/qibocal/cli/update.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ def merge_with_skipped_qubits(
5858
]
5959
}
6060
)
61+
for attr in new.qubits[q].model_fields_set:
62+
ch = getattr(new.qubits[q], attr)
63+
if isinstance(ch, dict):
64+
for ch_ in ch.values():
65+
new.update({f"configs.{ch_}": old.config(ch_)})
66+
else:
67+
new.update({f"configs.{ch}": old.config(ch)})
68+
6169
new.calibration.single_qubits = {
6270
q: new.calibration.single_qubits[q]
6371
if q not in skip_qubits

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_skip_qubits_option(skip_qubits, tmp_path, monkeypatch, platform):
7575
catch_exceptions=False,
7676
)
7777
new_platform = create_calibration_platform("mock")
78-
for i in platform.qubits:
78+
for i in new_platform.qubits:
7979
if i in list(skip_qubits):
8080
assert old_platform.config(
8181
old_platform.qubits[i].acquisition

0 commit comments

Comments
 (0)