Skip to content

Commit

Permalink
fix: Issue with resonator spectroscopy at low power addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed Mar 4, 2024
1 parent acef62e commit 72873bb
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dataclasses import dataclass, field
from dataclasses import dataclass, field, fields
from typing import Optional, Union

import numpy as np
Expand Down Expand Up @@ -82,6 +82,14 @@ class ResonatorSpectroscopyResults(Results):
)
"""Readout attenuation [dB] for each qubit."""

def __contains__(self, key: QubitId):
return all(
key in getattr(self, field.name)
for field in fields(self)
if isinstance(getattr(self, field.name), dict)
and field.name != "bare_frequency"
)


@dataclass
class ResonatorSpectroscopyData(Data):
Expand Down

0 comments on commit 72873bb

Please sign in to comment.