Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change pulse.id from class variable to instance variable #14

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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