iqm-pulse 10.0.0__py3-none-any.whl → 10.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
iqm/pulse/builder.py CHANGED
@@ -83,7 +83,7 @@ class CircuitOperation:
83
83
 
84
84
  name: str
85
85
  """name of the quantum operation"""
86
- locus: tuple[str, ...]
86
+ locus: Locus
87
87
  """names of the information-bearing QPU components (qubits, computational resonators...) the operation acts on"""
88
88
  args: dict[str, Any] = field(default_factory=dict)
89
89
  """arguments for the operation"""
iqm/pulse/gates/prx.py CHANGED
@@ -50,6 +50,7 @@ from iqm.pulse.playlist.instructions import Block, IQPulse
50
50
  from iqm.pulse.playlist.schedule import TOLERANCE, Schedule
51
51
  from iqm.pulse.playlist.waveforms import (
52
52
  Constant,
53
+ Cosine,
53
54
  CosineFall,
54
55
  CosineRise,
55
56
  CosineRiseFall,
@@ -419,6 +420,13 @@ class PRX_HdDrag(PRX_CustomWaveforms, wave_i=HdDragI, wave_q=HdDragQ): # type:i
419
420
  """
420
421
 
421
422
 
423
+ class PRX_Cosine(PRX_CustomWaveforms, wave_i=Cosine, wave_q=Cosine): # type:ignore[call-arg]
424
+ """Special modulated pulse resulting in two frequency sidebands.
425
+
426
+ See :class:`.PRX_CustomWaveforms`.
427
+ """
428
+
429
+
422
430
  def _normalize_params(angle: float, phase: float) -> tuple[float, float]:
423
431
  """Algebraic normalization of ``angle`` to [0, pi] and ``phase`` to (-pi, pi].
424
432
 
@@ -145,7 +145,35 @@ class Cosine(Waveform):
145
145
 
146
146
  @staticmethod
147
147
  def non_timelike_attributes() -> dict[str, str]:
148
- return {"frequency": "Hz"}
148
+ return {"frequency": "Hz", "phase": "rad"}
149
+
150
+
151
+ @dataclass(frozen=True)
152
+ class PolynomialCosine(Waveform):
153
+ r"""Polynomial of a periodic sinusoidal waveform which defaults to cosine.
154
+
155
+ .. math::
156
+ f(t) = P(\cos(2\pi \: f \: t + \phi))
157
+
158
+ where :math:`P(x)` is a polynomial, :math:`f` is the frequency, and :math:`\phi` the phase of the wave.
159
+
160
+ Args:
161
+ frequency: frequency of the wave, in units of inverse sampling window duration
162
+ phase: phase of the wave, in radians
163
+
164
+ """
165
+
166
+ frequency: float
167
+ coefficients: np.ndarray
168
+ phase: float = 0.0
169
+
170
+ def _sample(self, sample_coords: np.ndarray) -> np.ndarray:
171
+ cosine = np.cos(2 * np.pi * self.frequency * sample_coords + self.phase)
172
+ return np.polynomial.polynomial.polyval(cosine, self.coefficients)
173
+
174
+ @staticmethod
175
+ def non_timelike_attributes() -> dict[str, str]:
176
+ return {"frequency": "Hz", "phase": "rad", "coefficients": ""}
149
177
 
150
178
 
151
179
  @dataclass(frozen=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-pulse
3
- Version: 10.0.0
3
+ Version: 10.2.0
4
4
  Summary: A Python-based project for providing interface and implementations for control pulses.
5
5
  Author-email: IQM Finland Oy <info@meetiqm.com>
6
6
  License: Apache License
@@ -1,6 +1,6 @@
1
1
  iqm/pulse/__init__.py,sha256=FxgHlv3bF8bQCREwOJ1yu_nsrfJq0g0HdovvT1wUnCI,881
2
2
  iqm/pulse/base_utils.py,sha256=tLbmnWGmHsjcA8QFCiqvHfgSJJNWS4AVTcD2y4M2ipU,2641
3
- iqm/pulse/builder.py,sha256=YB-oiCqOka32Xyyjydomzq_tIwaE_4LsHkyLI4zGWCk,72482
3
+ iqm/pulse/builder.py,sha256=uHgl1Oc4ZIKuJbq_exgSVsQ3ClG3nueQCLRQU67fBAs,72472
4
4
  iqm/pulse/circuit_operations.py,sha256=i-sUx-JZOKAMKWgYq1c5KIR2Ons9Uyq_meEmppAmwI8,22387
5
5
  iqm/pulse/gate_implementation.py,sha256=yyj2d1aDL0K_qouo0qLHnZ49_1qHsJEShKW14398t8Q,39546
6
6
  iqm/pulse/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -19,7 +19,7 @@ iqm/pulse/gates/enums.py,sha256=ATwb6vZYpfgQ1gQyFPW53JyIKrdAP3FPHm6jV-t9OAk,2532
19
19
  iqm/pulse/gates/flux_multiplexer.py,sha256=sk84ItEvkx7Z0pCHt8MCCczBe7_BHNvqS4_oeNghZw8,9757
20
20
  iqm/pulse/gates/measure.py,sha256=5yG5dQeDljZewrPdy6vwejz5m3KU-9SlXQco9oAyssw,44488
21
21
  iqm/pulse/gates/move.py,sha256=L8wDcc7He43sUrwQs24lNydxdM9bKN27zlEdnDucDfc,17490
22
- iqm/pulse/gates/prx.py,sha256=Vl7t26mDRjj-6sC8jmpAgzTAtaTubVx6Ib_lpx_HmCk,24978
22
+ iqm/pulse/gates/prx.py,sha256=gWT4vEL6BZvRNOkwlxSg_V8nq7baFgh2K-V8q3bqLjI,25203
23
23
  iqm/pulse/gates/reset.py,sha256=idsknRq_z2JKIq4zXc4LvdE2czE5-KgGTdLPmYVyWIg,7480
24
24
  iqm/pulse/gates/rz.py,sha256=kr8Y5ap1MN81InCSmzGkxejvUcNszl1sxpG7yacvDM0,9684
25
25
  iqm/pulse/gates/sx.py,sha256=3s7lo5ib2HZh-kzZd95-JqL41LxCX5GA4QZ0h7u3WCQ,1736
@@ -31,7 +31,7 @@ iqm/pulse/playlist/hd_drag.py,sha256=JYRy3aPu0LD9y0H3UncOiWI39eV9-TARvgLonNUsaO0
31
31
  iqm/pulse/playlist/instructions.py,sha256=PyIjJJN58rbfIFqgRaynsnsHXywy6xBpkAtQuifgoJY,9930
32
32
  iqm/pulse/playlist/playlist.py,sha256=7MIX4iRfh2Nit8AnpNyqv5A5ZmK7JR-v201DXVL6kUk,685
33
33
  iqm/pulse/playlist/schedule.py,sha256=VYrVyPlB04Rm8iOYBXu2uOpsLBqczJRx3L2VU53CxVU,17989
34
- iqm/pulse/playlist/waveforms.py,sha256=Xa7P3V0rRIn7sQIoLKqXaWwtAbyQWjdVGW6bKOGNcOQ,17898
34
+ iqm/pulse/playlist/waveforms.py,sha256=Id6SIWVMXFrpUVbIec5Wun3vD-5AC_dPh9t3s2bY66M,18813
35
35
  iqm/pulse/playlist/visualisation/__init__.py,sha256=wCNfJHIR_bqG3ZBlgm55v90Rih7VCpfctoIMfwRMgjk,567
36
36
  iqm/pulse/playlist/visualisation/base.py,sha256=svigM5LRvU4eLLE4dhkKA_ZY0NyDBsva7tHnYCvq0I4,8892
37
37
  iqm/pulse/playlist/visualisation/templates/playlist_inspection.jinja2,sha256=4XPmpISH5LLOf3YjmK3OKfvkAWj4TlzD2K4ClFTvZhI,11511
@@ -39,8 +39,8 @@ iqm/pulse/playlist/visualisation/templates/static/logo.png,sha256=rbfQZ6_UEaztpY
39
39
  iqm/pulse/playlist/visualisation/templates/static/moment.min.js,sha256=4iQZ6BVL4qNKlQ27TExEhBN1HFPvAvAMbFavKKosSWQ,53324
40
40
  iqm/pulse/playlist/visualisation/templates/static/vis-timeline-graph2d.min.css,sha256=svzNasPg1yR5gvEaRei2jg-n4Pc3sVyMUWeS6xRAh6U,19837
41
41
  iqm/pulse/playlist/visualisation/templates/static/vis-timeline-graph2d.min.js,sha256=OqCqCyA6JnxPz3PGXq_P_9VuSqWptgNt5Ev3T-xjefQ,570288
42
- iqm_pulse-10.0.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
43
- iqm_pulse-10.0.0.dist-info/METADATA,sha256=5-Re6d58u6Ek98qU8ea3CyYKoH5kh2eGw7lkTvGZQXI,14551
44
- iqm_pulse-10.0.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
45
- iqm_pulse-10.0.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
46
- iqm_pulse-10.0.0.dist-info/RECORD,,
42
+ iqm_pulse-10.2.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
43
+ iqm_pulse-10.2.0.dist-info/METADATA,sha256=Reav1wwhurtRr9lN2bLmXK0WHeGFZQ6yVH_Rw2oz-R4,14551
44
+ iqm_pulse-10.2.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
45
+ iqm_pulse-10.2.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
46
+ iqm_pulse-10.2.0.dist-info/RECORD,,