iqm-pulse 9.20.0__py3-none-any.whl → 9.21.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
@@ -1311,7 +1311,7 @@ class ScheduleBuilder:
1311
1311
  }
1312
1312
 
1313
1313
  pl = Playlist()
1314
- mapped_instructions: dict[str, dict[int, Any]] = {}
1314
+ mapped_instructions: dict[str, dict[int | Instruction, Any]] = {}
1315
1315
 
1316
1316
  def _append_to_schedule(sc_schedule: SC_Schedule, channel_name: str, instr: Instruction) -> None:
1317
1317
  """Append ``instr`` to ``sc_schedule`` into the channel``channel_name``."""
@@ -1320,10 +1320,12 @@ class ScheduleBuilder:
1320
1320
  # 2 dataclasses can have the same hash if their fields are identical. We must
1321
1321
  # distinguish between different Waveform classes which may have identical fields,
1322
1322
  # so we use the instruction itself as a key, so that the class is checked too.
1323
- instr_id = hash(instr)
1323
+ instr_id = instr # type: ignore[attr-defined]
1324
+ is_mapped = instr_id in mapped_instructions.setdefault(channel_name, {})
1324
1325
  except TypeError:
1325
1326
  instr_id = instr.id # type: ignore[attr-defined]
1326
- if instr_id not in mapped_instructions.setdefault(channel_name, {}):
1327
+ is_mapped = instr_id in mapped_instructions.setdefault(channel_name, {})
1328
+ if not is_mapped:
1327
1329
  mapped = _map_instruction(instr)
1328
1330
  idx = pl.channel_descriptions[channel_name].add_instruction(mapped)
1329
1331
  sc_schedule.instructions.setdefault(channel_name, []).append(idx)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-pulse
3
- Version: 9.20.0
3
+ Version: 9.21.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=G9AydyZHy3YX6h-BMvPxqqcMieTRq1PoWJ_Bau9uWH4,67024
3
+ iqm/pulse/builder.py,sha256=gqVK2RGrXD1gVSc42uY3nHFyrIbnOiEdo2PtPFNw9z0,67189
4
4
  iqm/pulse/circuit_operations.py,sha256=i6v6dW-F_YATSFwZWbi8OTkcS_HCAqfJdfZ7ZfVzcmU,22743
5
5
  iqm/pulse/gate_implementation.py,sha256=iD9qdXbcJVXqa8xU0gJ1KSkhe02NsXpbmuAiRvvAdWo,33956
6
6
  iqm/pulse/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -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-9.20.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
43
- iqm_pulse-9.20.0.dist-info/METADATA,sha256=P35RKE4Ooe9mXe6ifYgmX2B3wCKo5p21MVAdDngKEU8,14551
44
- iqm_pulse-9.20.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
45
- iqm_pulse-9.20.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
46
- iqm_pulse-9.20.0.dist-info/RECORD,,
42
+ iqm_pulse-9.21.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
43
+ iqm_pulse-9.21.0.dist-info/METADATA,sha256=M6sSPzS0mH27H4qdDdadrkUXmNRm9NjXceegJhBztY4,14551
44
+ iqm_pulse-9.21.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
45
+ iqm_pulse-9.21.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
46
+ iqm_pulse-9.21.0.dist-info/RECORD,,