From df0e849280c4c58bb623a382e863c18ddda1666e Mon Sep 17 00:00:00 2001 From: Serwan Asaad Date: Wed, 21 Feb 2024 11:02:30 +0100 Subject: [PATCH 1/2] Change pulse.id from class variable to instance variable --- CHANGELOG.md | 1 + quam/components/pulses.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40d1991f..17c45b05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ This happens if channel.id is not set, and channel.parent does not have a name either - `Pulse.axis_angle` is now in radians instead of degrees. - Channel offsets (e.g. `SingleChannel.opx_output_offset`) is None by default (see note in Fixed) +- `Pulse.id` is now an instance variable instead of a class variable ### Fixed - Don't raise instantiation error when required_type is not a class diff --git a/quam/components/pulses.py b/quam/components/pulses.py index 193e68e0..4f3042fe 100644 --- a/quam/components/pulses.py +++ b/quam/components/pulses.py @@ -52,10 +52,9 @@ class Pulse(QuamComponent): The digital marker label is defined as `"{channel_name}.{pulse_name}.dm"`. """ - - id: ClassVar[str] = None operation: ClassVar[str] = "control" length: int + id: str = None digital_marker: Union[str, List[Tuple[int, int]]] = None From 05dd0f76f69fbdf3136152d08150e0dd9688f7d0 Mon Sep 17 00:00:00 2001 From: Serwan Asaad Date: Wed, 21 Feb 2024 11:28:13 +0100 Subject: [PATCH 2/2] fix: drag pulse test --- tests/components/test_pulses.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/components/test_pulses.py b/tests/components/test_pulses.py index 50712d4f..eb86dd74 100644 --- a/tests/components/test_pulses.py +++ b/tests/components/test_pulses.py @@ -14,6 +14,7 @@ def test_drag_pulse(): assert drag_pulse.operation == "control" assert drag_pulse.length == 20 assert drag_pulse.get_attrs() == { + "id": None, "length": 20, "axis_angle": 0.0, "digital_marker": None,