iqm-client 33.0.1__tar.gz → 33.0.3__tar.gz

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.
Files changed (106) hide show
  1. {iqm_client-33.0.1 → iqm_client-33.0.3}/CHANGELOG.rst +19 -0
  2. {iqm_client-33.0.1 → iqm_client-33.0.3}/PKG-INFO +3 -3
  3. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/base.txt +2 -2
  4. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_server_client/iqm_server_client.py +1 -2
  5. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_job.py +29 -22
  6. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm_client.egg-info/PKG-INFO +3 -3
  7. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm_client.egg-info/SOURCES.txt +0 -1
  8. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm_client.egg-info/requires.txt +2 -2
  9. iqm_client-33.0.3/version.txt +1 -0
  10. iqm_client-33.0.1/src/iqm/iqm_server_client/errors.py +0 -6
  11. iqm_client-33.0.1/version.txt +0 -1
  12. {iqm_client-33.0.1 → iqm_client-33.0.3}/AUTHORS.rst +0 -0
  13. {iqm_client-33.0.1 → iqm_client-33.0.3}/CHANGELOG_cirq-iqm.rst +0 -0
  14. {iqm_client-33.0.1 → iqm_client-33.0.3}/CHANGELOG_cortex-cli.rst +0 -0
  15. {iqm_client-33.0.1 → iqm_client-33.0.3}/CHANGELOG_qiskit-iqm.rst +0 -0
  16. {iqm_client-33.0.1 → iqm_client-33.0.3}/INTEGRATION_GUIDE.rst +0 -0
  17. {iqm_client-33.0.1 → iqm_client-33.0.3}/LICENSE.txt +0 -0
  18. {iqm_client-33.0.1 → iqm_client-33.0.3}/MANIFEST.in +0 -0
  19. {iqm_client-33.0.1 → iqm_client-33.0.3}/README.rst +0 -0
  20. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/API.rst +0 -0
  21. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/_static/images/favicon.ico +0 -0
  22. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/_static/images/logo.png +0 -0
  23. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/_templates/autosummary-class-template.rst +0 -0
  24. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/_templates/autosummary-module-template.rst +0 -0
  25. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/authors.rst +0 -0
  26. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/changelog.rst +0 -0
  27. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/conf.py +0 -0
  28. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/index.rst +0 -0
  29. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/integration_guide.rst +0 -0
  30. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/license.rst +0 -0
  31. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/readme.rst +0 -0
  32. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/user_guide_cirq.rst +0 -0
  33. {iqm_client-33.0.1 → iqm_client-33.0.3}/docs/user_guide_qiskit.rst +0 -0
  34. {iqm_client-33.0.1 → iqm_client-33.0.3}/pyproject.toml +0 -0
  35. {iqm_client-33.0.1 → iqm_client-33.0.3}/pytest.ini +0 -0
  36. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/base.in +0 -0
  37. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/base.in.internal +0 -0
  38. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/cirq.in +0 -0
  39. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/cirq.in.internal +0 -0
  40. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/cirq.txt +0 -0
  41. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/cli.in +0 -0
  42. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/cli.in.internal +0 -0
  43. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/cli.txt +0 -0
  44. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/qiskit.in +0 -0
  45. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/qiskit.in.internal +0 -0
  46. {iqm_client-33.0.1 → iqm_client-33.0.3}/requirements/qiskit.txt +0 -0
  47. {iqm_client-33.0.1 → iqm_client-33.0.3}/setup.cfg +0 -0
  48. {iqm_client-33.0.1 → iqm_client-33.0.3}/setup.py +0 -0
  49. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/__init__.py +0 -0
  50. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/devices/__init__.py +0 -0
  51. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/devices/adonis.py +0 -0
  52. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/devices/aphrodite.py +0 -0
  53. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/devices/apollo.py +0 -0
  54. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/devices/iqm_device.py +0 -0
  55. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/devices/iqm_device_metadata.py +0 -0
  56. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/examples/demo_adonis.py +0 -0
  57. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/examples/demo_apollo.py +0 -0
  58. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/examples/demo_common.py +0 -0
  59. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/examples/demo_iqm_execution.py +0 -0
  60. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/examples/usage.ipynb +0 -0
  61. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/extended_qasm_parser.py +0 -0
  62. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/iqm_gates.py +0 -0
  63. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/iqm_sampler.py +0 -0
  64. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/optimizers.py +0 -0
  65. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/py.typed +0 -0
  66. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/serialize.py +0 -0
  67. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/cirq_iqm/transpiler.py +0 -0
  68. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/__init__.py +0 -0
  69. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/errors.py +0 -0
  70. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/iqm_client.py +0 -0
  71. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/models.py +0 -0
  72. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/py.typed +0 -0
  73. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/transpile.py +0 -0
  74. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/util.py +0 -0
  75. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_client/validation.py +0 -0
  76. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_server_client/__init__.py +0 -0
  77. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_server_client/models.py +0 -0
  78. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/iqm_server_client/py.typed +0 -0
  79. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/__init__.py +0 -0
  80. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/examples/__init__.py +0 -0
  81. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/examples/bell_measure.py +0 -0
  82. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/examples/transpile_example.py +0 -0
  83. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/fake_backends/__init__.py +0 -0
  84. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/fake_backends/fake_adonis.py +0 -0
  85. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/fake_backends/fake_aphrodite.py +0 -0
  86. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/fake_backends/fake_apollo.py +0 -0
  87. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/fake_backends/fake_deneb.py +0 -0
  88. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/fake_backends/fake_garnet.py +0 -0
  89. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py +0 -0
  90. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_backend.py +0 -0
  91. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_circuit.py +0 -0
  92. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_circuit_validation.py +0 -0
  93. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_move_layout.py +0 -0
  94. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_naive_move_pass.py +0 -0
  95. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_provider.py +0 -0
  96. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_target.py +0 -0
  97. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/iqm_transpilation.py +0 -0
  98. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/move_gate.py +0 -0
  99. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/py.typed +0 -0
  100. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/qiskit_to_iqm.py +0 -0
  101. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm/qiskit_iqm/transpiler_plugins.py +0 -0
  102. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm_client.egg-info/dependency_links.txt +0 -0
  103. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm_client.egg-info/entry_points.txt +0 -0
  104. {iqm_client-33.0.1 → iqm_client-33.0.3}/src/iqm_client.egg-info/top_level.txt +0 -0
  105. {iqm_client-33.0.1 → iqm_client-33.0.3}/tests/__init__.py +0 -0
  106. {iqm_client-33.0.1 → iqm_client-33.0.3}/tests/conftest.py +0 -0
@@ -1,3 +1,22 @@
1
+ Version 33.0.3 (2026-01-15)
2
+ ===========================
3
+
4
+ - Patch release, no functional changes.
5
+
6
+ Version 33.0.2 (2025-12-09)
7
+ ===========================
8
+
9
+ Bug fixes
10
+ ---------
11
+
12
+ - :meth:`IQMJob.result` now correctly retrieves results also for jobs that already are in a terminal
13
+ state.
14
+
15
+ Changes
16
+ -------
17
+
18
+ - Remove unused module ``errors`` from :mod:`iqm.iqm_server_client`.
19
+
1
20
  Version 33.0.1 (2025-12-02)
2
21
  ===========================
3
22
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 33.0.1
3
+ Version: 33.0.3
4
4
  Summary: Client library for accessing an IQM quantum computer
5
5
  Author-email: IQM Finland Oy <developers@meetiqm.com>
6
6
  License: Apache License
@@ -220,8 +220,8 @@ Requires-Dist: numpy<3.0,>=1.26.4
220
220
  Requires-Dist: packaging==24.1
221
221
  Requires-Dist: pydantic<3.0,>=2.9.2
222
222
  Requires-Dist: requests==2.32.3
223
- Requires-Dist: iqm-pulse<13,>=12.7.1
224
- Requires-Dist: iqm-station-control-client<13,>=12.0.1
223
+ Requires-Dist: iqm-pulse<13,>=12.7.3
224
+ Requires-Dist: iqm-station-control-client<13,>=12.0.3
225
225
  Provides-Extra: cirq
226
226
  Requires-Dist: cirq-core[contrib]~=1.2; extra == "cirq"
227
227
  Requires-Dist: ply==3.11; extra == "cirq"
@@ -3,5 +3,5 @@ packaging == 24.1
3
3
  pydantic >= 2.9.2, <3.0
4
4
  requests == 2.32.3
5
5
 
6
- iqm-pulse>=12.7.1,<13
7
- iqm-station-control-client>=12.0.1,<13
6
+ iqm-pulse>=12.7.3,<13
7
+ iqm-station-control-client>=12.0.3,<13
@@ -31,7 +31,6 @@ from urllib.parse import urlparse
31
31
  from uuid import UUID
32
32
  import warnings
33
33
 
34
- from iqm.iqm_server_client.errors import ClientConfigurationError
35
34
  from iqm.iqm_server_client.models import (
36
35
  CalibrationSet,
37
36
  JobData,
@@ -48,7 +47,7 @@ import requests
48
47
 
49
48
  from exa.common.data.setting_node import SettingNode
50
49
  from exa.common.errors.station_control_errors import map_from_status_code_to_error
51
- from iqm.station_control.client.authentication import TokenManager
50
+ from iqm.station_control.client.authentication import ClientConfigurationError, TokenManager
52
51
  from iqm.station_control.client.list_models import (
53
52
  DutList,
54
53
  ListModel,
@@ -30,7 +30,7 @@ from iqm.iqm_client import (
30
30
  from iqm.iqm_client import (
31
31
  JobStatus as IQMJobStatus,
32
32
  )
33
- from iqm.iqm_client.errors import APITimeoutError
33
+ from iqm.iqm_client.errors import APITimeoutError, CircuitExecutionError
34
34
  from iqm.qiskit_iqm.qiskit_to_iqm import MeasurementKey
35
35
  import numpy as np
36
36
  from qiskit.providers import JobStatus, JobV1
@@ -147,7 +147,7 @@ class IQMJob(JobV1):
147
147
  for s in range(shots)
148
148
  ]
149
149
 
150
- def submit(self): # noqa: ANN201
150
+ def submit(self) -> None:
151
151
  raise NotImplementedError(
152
152
  "You should never have to submit jobs by calling this method. When running circuits through "
153
153
  "RemoteIQMBackend, the submission will happen under the hood. The job instance that you get is only for "
@@ -183,10 +183,11 @@ class IQMJob(JobV1):
183
183
 
184
184
  """
185
185
  job = self._iqm_job
186
- # TODO we might want to cache these
186
+ # TODO we might want to cache these as well
187
187
  circuits, job_parameters = job.payload()
188
+
189
+ # wait for job to finish if it hasn't already
188
190
  if job.status not in IQMJobStatus.terminal_statuses():
189
- # wait for job to finish and cache the result
190
191
  status = job.wait_for_completion(timeout_secs=timeout)
191
192
  if status not in IQMJobStatus.terminal_statuses():
192
193
  msg = f"The job {job.job_id} didn't finish in {timeout} seconds."
@@ -196,9 +197,29 @@ class IQMJob(JobV1):
196
197
  msg += " Cancelled."
197
198
  raise APITimeoutError(msg)
198
199
 
199
- # retrieve the results if job completed successfully
200
- if status == IQMJobStatus.COMPLETED and (result_batch := job.result()) is not None:
201
- # now job has up-to-date information
200
+ # job has reached a terminal status, which means no status update is necessary, and we can return a Result
201
+ result_dict: dict[str, Any] = {
202
+ "backend_name": self.backend().name,
203
+ "backend_version": "",
204
+ "qobj_id": "",
205
+ "job_id": str(job.job_id),
206
+ "success": False,
207
+ "date": date.today().isoformat(),
208
+ "results": [],
209
+ # the ones below go into result._metadata
210
+ "circuits": circuits,
211
+ "parameters": job_parameters,
212
+ "timeline": job.data.timeline.copy(),
213
+ }
214
+
215
+ # try to return results if job completed successfully
216
+ if job.status == IQMJobStatus.COMPLETED:
217
+ if self._iqm_result is None:
218
+ # retrieve and cache the results
219
+ if (result_batch := job.result()) is None:
220
+ raise CircuitExecutionError(
221
+ f"No results were available for job {job.job_id} even though it is completed."
222
+ )
202
223
  # IQMBackend.run() populates IQMJob.circuit_metadata, so it may be None if this IQMJob
203
224
  # was created manually from a job_id. In that case retrieve circuit metadata from
204
225
  # the job payload which we just retrieved.
@@ -214,21 +235,7 @@ class IQMJob(JobV1):
214
235
  job_parameters.heralding_mode == HeraldingMode.NONE,
215
236
  )
216
237
 
217
- # job has reached a terminal status, which means we can return a Result
218
- result_dict: dict[str, Any] = {
219
- "backend_name": self.backend().name,
220
- "backend_version": "",
221
- "qobj_id": "",
222
- "job_id": str(job.job_id),
223
- "success": False,
224
- "date": date.today().isoformat(),
225
- "results": [],
226
- # the ones below go into result._metadata
227
- "circuits": circuits,
228
- "parameters": job_parameters,
229
- "timeline": job.data.timeline.copy(),
230
- }
231
- if self._iqm_result:
238
+ # return the results
232
239
  result_dict["success"] = True # job is successful iff it is IQMJobStatus.COMPLETED (and we got result data)
233
240
  result_dict["results"] = [
234
241
  {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 33.0.1
3
+ Version: 33.0.3
4
4
  Summary: Client library for accessing an IQM quantum computer
5
5
  Author-email: IQM Finland Oy <developers@meetiqm.com>
6
6
  License: Apache License
@@ -220,8 +220,8 @@ Requires-Dist: numpy<3.0,>=1.26.4
220
220
  Requires-Dist: packaging==24.1
221
221
  Requires-Dist: pydantic<3.0,>=2.9.2
222
222
  Requires-Dist: requests==2.32.3
223
- Requires-Dist: iqm-pulse<13,>=12.7.1
224
- Requires-Dist: iqm-station-control-client<13,>=12.0.1
223
+ Requires-Dist: iqm-pulse<13,>=12.7.3
224
+ Requires-Dist: iqm-station-control-client<13,>=12.0.3
225
225
  Provides-Extra: cirq
226
226
  Requires-Dist: cirq-core[contrib]~=1.2; extra == "cirq"
227
227
  Requires-Dist: ply==3.11; extra == "cirq"
@@ -65,7 +65,6 @@ src/iqm/iqm_client/transpile.py
65
65
  src/iqm/iqm_client/util.py
66
66
  src/iqm/iqm_client/validation.py
67
67
  src/iqm/iqm_server_client/__init__.py
68
- src/iqm/iqm_server_client/errors.py
69
68
  src/iqm/iqm_server_client/iqm_server_client.py
70
69
  src/iqm/iqm_server_client/models.py
71
70
  src/iqm/iqm_server_client/py.typed
@@ -2,8 +2,8 @@ numpy<3.0,>=1.26.4
2
2
  packaging==24.1
3
3
  pydantic<3.0,>=2.9.2
4
4
  requests==2.32.3
5
- iqm-pulse<13,>=12.7.1
6
- iqm-station-control-client<13,>=12.0.1
5
+ iqm-pulse<13,>=12.7.3
6
+ iqm-station-control-client<13,>=12.0.3
7
7
 
8
8
  [cirq]
9
9
  cirq-core[contrib]~=1.2
@@ -0,0 +1 @@
1
+ 33.0.3
@@ -1,6 +0,0 @@
1
- class ClientAuthenticationError(RuntimeError):
2
- """Something went wrong with user authentication."""
3
-
4
-
5
- class ClientConfigurationError(RuntimeError):
6
- """Wrong configuration provided."""
@@ -1 +0,0 @@
1
- 33.0.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes