iqm-client 33.0.0__tar.gz → 33.0.2__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 (107) hide show
  1. {iqm_client-33.0.0 → iqm_client-33.0.2}/CHANGELOG.rst +22 -0
  2. {iqm_client-33.0.0 → iqm_client-33.0.2}/PKG-INFO +16 -13
  3. {iqm_client-33.0.0 → iqm_client-33.0.2}/README.rst +13 -10
  4. iqm_client-33.0.2/requirements/base.in.internal +2 -0
  5. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/base.txt +2 -2
  6. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_server_client/iqm_server_client.py +1 -2
  7. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/examples/bell_measure.py +3 -3
  8. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/examples/transpile_example.py +4 -2
  9. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_job.py +29 -22
  10. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm_client.egg-info/PKG-INFO +16 -13
  11. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm_client.egg-info/SOURCES.txt +0 -1
  12. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm_client.egg-info/requires.txt +2 -2
  13. iqm_client-33.0.2/version.txt +1 -0
  14. iqm_client-33.0.0/requirements/base.in.internal +0 -2
  15. iqm_client-33.0.0/src/iqm/iqm_server_client/errors.py +0 -6
  16. iqm_client-33.0.0/version.txt +0 -1
  17. {iqm_client-33.0.0 → iqm_client-33.0.2}/AUTHORS.rst +0 -0
  18. {iqm_client-33.0.0 → iqm_client-33.0.2}/CHANGELOG_cirq-iqm.rst +0 -0
  19. {iqm_client-33.0.0 → iqm_client-33.0.2}/CHANGELOG_cortex-cli.rst +0 -0
  20. {iqm_client-33.0.0 → iqm_client-33.0.2}/CHANGELOG_qiskit-iqm.rst +0 -0
  21. {iqm_client-33.0.0 → iqm_client-33.0.2}/INTEGRATION_GUIDE.rst +0 -0
  22. {iqm_client-33.0.0 → iqm_client-33.0.2}/LICENSE.txt +0 -0
  23. {iqm_client-33.0.0 → iqm_client-33.0.2}/MANIFEST.in +0 -0
  24. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/API.rst +0 -0
  25. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/_static/images/favicon.ico +0 -0
  26. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/_static/images/logo.png +0 -0
  27. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/_templates/autosummary-class-template.rst +0 -0
  28. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/_templates/autosummary-module-template.rst +0 -0
  29. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/authors.rst +0 -0
  30. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/changelog.rst +0 -0
  31. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/conf.py +0 -0
  32. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/index.rst +0 -0
  33. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/integration_guide.rst +0 -0
  34. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/license.rst +0 -0
  35. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/readme.rst +0 -0
  36. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/user_guide_cirq.rst +0 -0
  37. {iqm_client-33.0.0 → iqm_client-33.0.2}/docs/user_guide_qiskit.rst +0 -0
  38. {iqm_client-33.0.0 → iqm_client-33.0.2}/pyproject.toml +0 -0
  39. {iqm_client-33.0.0 → iqm_client-33.0.2}/pytest.ini +0 -0
  40. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/base.in +0 -0
  41. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/cirq.in +0 -0
  42. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/cirq.in.internal +0 -0
  43. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/cirq.txt +0 -0
  44. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/cli.in +0 -0
  45. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/cli.in.internal +0 -0
  46. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/cli.txt +0 -0
  47. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/qiskit.in +0 -0
  48. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/qiskit.in.internal +0 -0
  49. {iqm_client-33.0.0 → iqm_client-33.0.2}/requirements/qiskit.txt +0 -0
  50. {iqm_client-33.0.0 → iqm_client-33.0.2}/setup.cfg +0 -0
  51. {iqm_client-33.0.0 → iqm_client-33.0.2}/setup.py +0 -0
  52. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/__init__.py +0 -0
  53. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/devices/__init__.py +0 -0
  54. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/devices/adonis.py +0 -0
  55. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/devices/aphrodite.py +0 -0
  56. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/devices/apollo.py +0 -0
  57. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/devices/iqm_device.py +0 -0
  58. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/devices/iqm_device_metadata.py +0 -0
  59. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/examples/demo_adonis.py +0 -0
  60. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/examples/demo_apollo.py +0 -0
  61. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/examples/demo_common.py +0 -0
  62. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/examples/demo_iqm_execution.py +0 -0
  63. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/examples/usage.ipynb +0 -0
  64. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/extended_qasm_parser.py +0 -0
  65. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/iqm_gates.py +0 -0
  66. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/iqm_sampler.py +0 -0
  67. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/optimizers.py +0 -0
  68. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/py.typed +0 -0
  69. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/serialize.py +0 -0
  70. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/cirq_iqm/transpiler.py +0 -0
  71. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/__init__.py +0 -0
  72. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/errors.py +0 -0
  73. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/iqm_client.py +0 -0
  74. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/models.py +0 -0
  75. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/py.typed +0 -0
  76. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/transpile.py +0 -0
  77. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/util.py +0 -0
  78. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_client/validation.py +0 -0
  79. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_server_client/__init__.py +0 -0
  80. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_server_client/models.py +0 -0
  81. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/iqm_server_client/py.typed +0 -0
  82. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/__init__.py +0 -0
  83. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/examples/__init__.py +0 -0
  84. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/fake_backends/__init__.py +0 -0
  85. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/fake_backends/fake_adonis.py +0 -0
  86. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/fake_backends/fake_aphrodite.py +0 -0
  87. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/fake_backends/fake_apollo.py +0 -0
  88. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/fake_backends/fake_deneb.py +0 -0
  89. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/fake_backends/fake_garnet.py +0 -0
  90. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py +0 -0
  91. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_backend.py +0 -0
  92. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_circuit.py +0 -0
  93. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_circuit_validation.py +0 -0
  94. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_move_layout.py +0 -0
  95. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_naive_move_pass.py +0 -0
  96. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_provider.py +0 -0
  97. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_target.py +0 -0
  98. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/iqm_transpilation.py +0 -0
  99. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/move_gate.py +0 -0
  100. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/py.typed +0 -0
  101. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/qiskit_to_iqm.py +0 -0
  102. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm/qiskit_iqm/transpiler_plugins.py +0 -0
  103. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm_client.egg-info/dependency_links.txt +0 -0
  104. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm_client.egg-info/entry_points.txt +0 -0
  105. {iqm_client-33.0.0 → iqm_client-33.0.2}/src/iqm_client.egg-info/top_level.txt +0 -0
  106. {iqm_client-33.0.0 → iqm_client-33.0.2}/tests/__init__.py +0 -0
  107. {iqm_client-33.0.0 → iqm_client-33.0.2}/tests/conftest.py +0 -0
@@ -1,3 +1,25 @@
1
+ Version 33.0.2 (2025-12-09)
2
+ ===========================
3
+
4
+ Bug fixes
5
+ ---------
6
+
7
+ - :meth:`IQMJob.result` now correctly retrieves results also for jobs that already are in a terminal
8
+ state.
9
+
10
+ Changes
11
+ -------
12
+
13
+ - Remove unused module ``errors`` from :mod:`iqm.iqm_server_client`.
14
+
15
+ Version 33.0.1 (2025-12-02)
16
+ ===========================
17
+
18
+ Bug fixes
19
+ ---------
20
+
21
+ - Fix version ranges in python package dependencies.
22
+
1
23
  Version 33.0.0 (2025-11-19)
2
24
  ===========================
3
25
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 33.0.0
3
+ Version: 33.0.2
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
224
- Requires-Dist: iqm-station-control-client
223
+ Requires-Dist: iqm-pulse<13,>=12.7.2
224
+ Requires-Dist: iqm-station-control-client<13,>=12.0.2
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"
@@ -250,16 +250,15 @@ adapters for `IQM's <https://www.meetiqm.com>`_ quantum computers, which allow y
250
250
  (currently only the Qiskit adapter contains IQM noise models)
251
251
  * Run quantum circuits on an IQM quantum computer
252
252
 
253
- Also includes a `CLI utility <https://docs.meetiqm.com/iqm-client/user_guide_cli.html>`_ for managing user
254
- authentication when using IQM quantum computers.
253
+ Also includes a CLI utility for managing user authentication when using IQM quantum computers.
255
254
 
256
255
  Installation
257
256
  ============
258
257
 
259
- For executing code on an IQM quantum computer, you can use for example
260
- `Qiskit on IQM <https://docs.meetiqm.com/iqm-client/user_guide_qiskit.html>`_ or
261
- `Cirq on IQM <https://docs.meetiqm.com/iqm-client/user_guide_cirq.html>`_, which can be installed as optional
262
- features of IQM Client from the Python Package Index (PyPI), e.g.:
258
+ For executing code on an IQM quantum computer, you can use for example the
259
+ Qiskit on IQM or Cirq on IQM user guides found in the documentation.
260
+ Qiskit on IQM and Cirq on IQM are optional features that can be installed alongside the base IQM Client library.
261
+ An example showing how to install from the public Python Package Index (PyPI):
263
262
 
264
263
  .. code-block:: bash
265
264
 
@@ -271,8 +270,7 @@ features of IQM Client from the Python Package Index (PyPI), e.g.:
271
270
  Python environment, you should first uninstall them with ``$ pip uninstall qiskit-iqm cirq-iqm``.
272
271
  In this case, you should also include the ``--force-reinstall`` option in the ``iqm-client`` installation command.
273
272
 
274
- The `CLI utility <https://docs.meetiqm.com/iqm-client/user_guide_cli.html>`_ for managing user authentication can also
275
- be installed as an optional feature:
273
+ The CLI utility for managing user authentication can also be installed as an optional feature:
276
274
 
277
275
  .. code-block:: bash
278
276
 
@@ -294,10 +292,15 @@ Documentation
294
292
 
295
293
  Documentation for the latest version is `available online <https://docs.meetiqm.com/iqm-client/>`_.
296
294
  You can build documentation for any older version locally by downloading the corresponding package from PyPI,
297
- and running the docs builder. For versions 20.12 and later this is done by running ``./docbuild`` in the
298
- ``iqm-client`` root directory, and for earlier versions by running ``tox run -e docs``.
295
+ and running the docs builder. For versions greater than equal to 20.12 but less than 33.0.0 this is done by
296
+ running ``./docbuild`` in the ``iqm-client`` root directory, and for earlier versions by running ``tox run -e docs``.
299
297
 
300
298
  ``./docbuild`` or ``tox run -e docs`` will build the documentation at ``./build/sphinx/html``.
299
+
300
+ Versions greater than or equal to 33.0.0 use the command:
301
+ ``sphinx-build -q -d build/.doctrees/iqm-client iqm-client/docs build/docs/iqm-client``
302
+ (``build/docs/`` directory has to be created first).
303
+
301
304
  These commands require installing the ``sphinx`` and ``sphinx-book-theme`` Python packages and
302
305
  `graphviz <https://graphviz.org/>`_.
303
306
 
@@ -11,16 +11,15 @@ adapters for `IQM's <https://www.meetiqm.com>`_ quantum computers, which allow y
11
11
  (currently only the Qiskit adapter contains IQM noise models)
12
12
  * Run quantum circuits on an IQM quantum computer
13
13
 
14
- Also includes a `CLI utility <https://docs.meetiqm.com/iqm-client/user_guide_cli.html>`_ for managing user
15
- authentication when using IQM quantum computers.
14
+ Also includes a CLI utility for managing user authentication when using IQM quantum computers.
16
15
 
17
16
  Installation
18
17
  ============
19
18
 
20
- For executing code on an IQM quantum computer, you can use for example
21
- `Qiskit on IQM <https://docs.meetiqm.com/iqm-client/user_guide_qiskit.html>`_ or
22
- `Cirq on IQM <https://docs.meetiqm.com/iqm-client/user_guide_cirq.html>`_, which can be installed as optional
23
- features of IQM Client from the Python Package Index (PyPI), e.g.:
19
+ For executing code on an IQM quantum computer, you can use for example the
20
+ Qiskit on IQM or Cirq on IQM user guides found in the documentation.
21
+ Qiskit on IQM and Cirq on IQM are optional features that can be installed alongside the base IQM Client library.
22
+ An example showing how to install from the public Python Package Index (PyPI):
24
23
 
25
24
  .. code-block:: bash
26
25
 
@@ -32,8 +31,7 @@ features of IQM Client from the Python Package Index (PyPI), e.g.:
32
31
  Python environment, you should first uninstall them with ``$ pip uninstall qiskit-iqm cirq-iqm``.
33
32
  In this case, you should also include the ``--force-reinstall`` option in the ``iqm-client`` installation command.
34
33
 
35
- The `CLI utility <https://docs.meetiqm.com/iqm-client/user_guide_cli.html>`_ for managing user authentication can also
36
- be installed as an optional feature:
34
+ The CLI utility for managing user authentication can also be installed as an optional feature:
37
35
 
38
36
  .. code-block:: bash
39
37
 
@@ -55,10 +53,15 @@ Documentation
55
53
 
56
54
  Documentation for the latest version is `available online <https://docs.meetiqm.com/iqm-client/>`_.
57
55
  You can build documentation for any older version locally by downloading the corresponding package from PyPI,
58
- and running the docs builder. For versions 20.12 and later this is done by running ``./docbuild`` in the
59
- ``iqm-client`` root directory, and for earlier versions by running ``tox run -e docs``.
56
+ and running the docs builder. For versions greater than equal to 20.12 but less than 33.0.0 this is done by
57
+ running ``./docbuild`` in the ``iqm-client`` root directory, and for earlier versions by running ``tox run -e docs``.
60
58
 
61
59
  ``./docbuild`` or ``tox run -e docs`` will build the documentation at ``./build/sphinx/html``.
60
+
61
+ Versions greater than or equal to 33.0.0 use the command:
62
+ ``sphinx-build -q -d build/.doctrees/iqm-client iqm-client/docs build/docs/iqm-client``
63
+ (``build/docs/`` directory has to be created first).
64
+
62
65
  These commands require installing the ``sphinx`` and ``sphinx-book-theme`` Python packages and
63
66
  `graphviz <https://graphviz.org/>`_.
64
67
 
@@ -0,0 +1,2 @@
1
+ iqm-pulse
2
+ station-control-client
@@ -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
7
- iqm-station-control-client
6
+ iqm-pulse>=12.7.2,<13
7
+ iqm-station-control-client>=12.0.2,<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,
@@ -13,8 +13,8 @@
13
13
  # limitations under the License.
14
14
  """An example on using Qiskit on IQM to run a simple quantum circuit on an IQM quantum computer.
15
15
 
16
- See the Qiskit on IQM user guide for instructions:
17
- https://docs.meetiqm.com/iqm-client/user_guide_qiskit.html
16
+ See the Qiskit on IQM user guide for instructions, found in the documentation at
17
+ https://docs.meetiqm.com/iqm-client/
18
18
  """
19
19
 
20
20
  import argparse
@@ -72,7 +72,7 @@ if __name__ == "__main__":
72
72
  "--token",
73
73
  help="API token for authentication",
74
74
  # Provide the API token explicitly or set it as an environment variable
75
- # following the https://docs.meetiqm.com/iqm-client/user_guide_qiskit.html#authentication
75
+ # following the Qiskit user guide at https://docs.meetiqm.com/iqm-client/
76
76
  )
77
77
 
78
78
  args = argparser.parse_args()
@@ -12,8 +12,10 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
  """This file is an example of using Qiskit on IQM to run a simple but non-trivial quantum circuit on an IQM quantum
15
- computer. See the Qiskit on IQM user guide for instructions:
16
- https://docs.meetiqm.com/iqm-client/user_guide_qiskit.html
15
+ computer.
16
+
17
+ See the Qiskit on IQM user guide for instructions, found in the documentation at
18
+ https://docs.meetiqm.com/iqm-client/
17
19
  """
18
20
 
19
21
  import argparse
@@ -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.0
3
+ Version: 33.0.2
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
224
- Requires-Dist: iqm-station-control-client
223
+ Requires-Dist: iqm-pulse<13,>=12.7.2
224
+ Requires-Dist: iqm-station-control-client<13,>=12.0.2
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"
@@ -250,16 +250,15 @@ adapters for `IQM's <https://www.meetiqm.com>`_ quantum computers, which allow y
250
250
  (currently only the Qiskit adapter contains IQM noise models)
251
251
  * Run quantum circuits on an IQM quantum computer
252
252
 
253
- Also includes a `CLI utility <https://docs.meetiqm.com/iqm-client/user_guide_cli.html>`_ for managing user
254
- authentication when using IQM quantum computers.
253
+ Also includes a CLI utility for managing user authentication when using IQM quantum computers.
255
254
 
256
255
  Installation
257
256
  ============
258
257
 
259
- For executing code on an IQM quantum computer, you can use for example
260
- `Qiskit on IQM <https://docs.meetiqm.com/iqm-client/user_guide_qiskit.html>`_ or
261
- `Cirq on IQM <https://docs.meetiqm.com/iqm-client/user_guide_cirq.html>`_, which can be installed as optional
262
- features of IQM Client from the Python Package Index (PyPI), e.g.:
258
+ For executing code on an IQM quantum computer, you can use for example the
259
+ Qiskit on IQM or Cirq on IQM user guides found in the documentation.
260
+ Qiskit on IQM and Cirq on IQM are optional features that can be installed alongside the base IQM Client library.
261
+ An example showing how to install from the public Python Package Index (PyPI):
263
262
 
264
263
  .. code-block:: bash
265
264
 
@@ -271,8 +270,7 @@ features of IQM Client from the Python Package Index (PyPI), e.g.:
271
270
  Python environment, you should first uninstall them with ``$ pip uninstall qiskit-iqm cirq-iqm``.
272
271
  In this case, you should also include the ``--force-reinstall`` option in the ``iqm-client`` installation command.
273
272
 
274
- The `CLI utility <https://docs.meetiqm.com/iqm-client/user_guide_cli.html>`_ for managing user authentication can also
275
- be installed as an optional feature:
273
+ The CLI utility for managing user authentication can also be installed as an optional feature:
276
274
 
277
275
  .. code-block:: bash
278
276
 
@@ -294,10 +292,15 @@ Documentation
294
292
 
295
293
  Documentation for the latest version is `available online <https://docs.meetiqm.com/iqm-client/>`_.
296
294
  You can build documentation for any older version locally by downloading the corresponding package from PyPI,
297
- and running the docs builder. For versions 20.12 and later this is done by running ``./docbuild`` in the
298
- ``iqm-client`` root directory, and for earlier versions by running ``tox run -e docs``.
295
+ and running the docs builder. For versions greater than equal to 20.12 but less than 33.0.0 this is done by
296
+ running ``./docbuild`` in the ``iqm-client`` root directory, and for earlier versions by running ``tox run -e docs``.
299
297
 
300
298
  ``./docbuild`` or ``tox run -e docs`` will build the documentation at ``./build/sphinx/html``.
299
+
300
+ Versions greater than or equal to 33.0.0 use the command:
301
+ ``sphinx-build -q -d build/.doctrees/iqm-client iqm-client/docs build/docs/iqm-client``
302
+ (``build/docs/`` directory has to be created first).
303
+
301
304
  These commands require installing the ``sphinx`` and ``sphinx-book-theme`` Python packages and
302
305
  `graphviz <https://graphviz.org/>`_.
303
306
 
@@ -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
6
- iqm-station-control-client
5
+ iqm-pulse<13,>=12.7.2
6
+ iqm-station-control-client<13,>=12.0.2
7
7
 
8
8
  [cirq]
9
9
  cirq-core[contrib]~=1.2
@@ -0,0 +1 @@
1
+ 33.0.2
@@ -1,2 +0,0 @@
1
- iqm-pulse
2
- iqm-station-control-client
@@ -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.0
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