Skip to content

Commit

Permalink
Measurements can handle break_conditions that are None (instead of on…
Browse files Browse the repository at this point in the history
…ly empty lists)
  • Loading branch information
INSTITUT2B\lab2 committed Jun 18, 2024
1 parent 00237fa commit 426af12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qumada/measurement/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Check warning on line 306 in src/qumada/measurement/measurement.py

View check run for this annotation

Codecov / codecov/patch

src/qumada/measurement/measurement.py#L304-L306

Added lines #L304 - L306 were not covered by tests
if self.properties[gate][parameter]["type"].find("comp") >= 0:
self.compensating_parameters.append({"gate": gate, "parameter": parameter})
self.compensating_channels.append(channel)
Expand Down

0 comments on commit 426af12

Please sign in to comment.