-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Serializable parametric pulse #7821
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
Changes from 18 commits
afe4f96
9a8a582
6f2496a
0424636
1bf11fa
2335f32
2af235d
0cc7383
a59af77
21ef762
509470a
ed2f661
c4b41d5
71ef841
cf7f302
c2981d0
cf17341
ba685ef
f2ef950
2ea6390
f48796e
0738497
92f42eb
1440a23
4345c3b
1c63ddb
d121b0d
48ff3cc
b9cab67
42b3dd9
761235d
cc12bf8
6c21edd
43e0e0b
6b956de
eefa5e4
252f62b
f24e648
4d191be
2c8e7f8
3a0f506
d5517d5
be2ed0c
67ac61f
78288ac
cbada64
ecb4ea7
45ae755
a4a56db
d957458
6776743
d4e8c43
41bf4f5
2aa4f5a
2e521a7
09855d7
b99eb5c
ac23d6f
401c1f4
686e77b
84344c2
914018e
045d67b
3b2c571
8edaba9
9b0adc3
cda7336
ef35cd9
15e9f7c
d844253
526aaed
87d3538
be2b4e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,8 @@ class Pulse(ABC): | |
| modulation phase and frequency are specified separately from ``Pulse``s. | ||
| """ | ||
|
|
||
| __slots__ = ("duration", "name") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will slotting this class have any upgrade implications. I don't think so because it's an abc and all the subclasses will have
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just added a slots for efficiency of instance generation. As experiment scales with larger processor, we need to create tons of pulse instance internally. Perhaps my code is doing something wrong in this context? |
||
|
|
||
| limit_amplitude = True | ||
|
|
||
| @abstractmethod | ||
|
|
@@ -47,7 +49,7 @@ def __init__( | |
| self.duration = duration | ||
| self.name = name | ||
| if limit_amplitude is not None: | ||
| self.limit_amplitude = limit_amplitude | ||
| self.__class__.limit_amplitude = limit_amplitude | ||
|
|
||
| @property | ||
| def id(self) -> int: # pylint: disable=invalid-name | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.