Skip to content

Commit

Permalink
Merge pull request #14 from qua-platform/fix/pulse-id
Browse files Browse the repository at this point in the history
Change pulse.id from class variable to instance variable
  • Loading branch information
nulinspiratie authored Feb 21, 2024
2 parents a3fa57f + 05dd0f7 commit f09bfaa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions quam/components/pulses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tests/components/test_pulses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f09bfaa

Please sign in to comment.