From 426af1283a8d157ac7e84477d9a4cd3488047d2e Mon Sep 17 00:00:00 2001 From: "INSTITUT2B\\lab2" Date: Tue, 18 Jun 2024 16:09:33 +0200 Subject: [PATCH] Measurements can handle break_conditions that are None (instead of only empty lists) --- src/qumada/measurement/measurement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qumada/measurement/measurement.py b/src/qumada/measurement/measurement.py index 1f2431a..f38e112 100644 --- a/src/qumada/measurement/measurement.py +++ b/src/qumada/measurement/measurement.py @@ -301,8 +301,9 @@ def generate_lists(self) -> None: self.gettable_parameters.append({"gate": gate, "parameter": parameter}) self.gettable_channels.append(channel) with suppress(KeyError): - for condition in self.properties[gate][parameter]["break_conditions"]: - self.break_conditions.append({"channel": channel, "break_condition": condition}) + if self.properties[gate][parameter]["break_conditions"] is not None: + for condition in self.properties[gate][parameter]["break_conditions"]: + self.break_conditions.append({"channel": channel, "break_condition": condition}) if self.properties[gate][parameter]["type"].find("comp") >= 0: self.compensating_parameters.append({"gate": gate, "parameter": parameter}) self.compensating_channels.append(channel)