iqm-client 28.0.0__tar.gz → 29.1.0__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 (112) hide show
  1. {iqm_client-28.0.0 → iqm_client-29.1.0}/CHANGELOG.rst +34 -0
  2. {iqm_client-28.0.0 → iqm_client-29.1.0}/INTEGRATION_GUIDE.rst +1 -1
  3. {iqm_client-28.0.0/src/iqm_client.egg-info → iqm_client-29.1.0}/PKG-INFO +9 -1
  4. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/user_guide_qiskit.rst +0 -8
  5. iqm_client-29.1.0/requirements/base.txt +6 -0
  6. iqm_client-29.1.0/requirements/cirq.txt +4 -0
  7. iqm_client-29.1.0/requirements/cli.txt +6 -0
  8. iqm_client-29.1.0/requirements/qiskit.txt +4 -0
  9. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/examples/demo_iqm_execution.py +3 -3
  10. iqm_client-29.1.0/src/iqm/iqm_client/api.py +90 -0
  11. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/authentication.py +1 -1
  12. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/iqm_client.py +284 -569
  13. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/models.py +0 -1
  14. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/transpile.py +3 -3
  15. iqm_client-29.1.0/src/iqm/iqm_client/validation.py +276 -0
  16. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/examples/resonance_example.py +4 -0
  17. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_circuit_validation.py +3 -2
  18. {iqm_client-28.0.0 → iqm_client-29.1.0/src/iqm_client.egg-info}/PKG-INFO +9 -1
  19. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm_client.egg-info/SOURCES.txt +1 -0
  20. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm_client.egg-info/requires.txt +8 -0
  21. {iqm_client-28.0.0 → iqm_client-29.1.0}/tests/conftest.py +38 -1
  22. iqm_client-29.1.0/version.txt +1 -0
  23. iqm_client-28.0.0/requirements/base.txt +0 -4
  24. iqm_client-28.0.0/requirements/cirq.txt +0 -2
  25. iqm_client-28.0.0/requirements/cli.txt +0 -4
  26. iqm_client-28.0.0/requirements/qiskit.txt +0 -2
  27. iqm_client-28.0.0/src/iqm/iqm_client/api.py +0 -187
  28. iqm_client-28.0.0/version.txt +0 -1
  29. {iqm_client-28.0.0 → iqm_client-29.1.0}/AUTHORS.rst +0 -0
  30. {iqm_client-28.0.0 → iqm_client-29.1.0}/CHANGELOG_cirq-iqm.rst +0 -0
  31. {iqm_client-28.0.0 → iqm_client-29.1.0}/CHANGELOG_cortex-cli.rst +0 -0
  32. {iqm_client-28.0.0 → iqm_client-29.1.0}/CHANGELOG_qiskit-iqm.rst +0 -0
  33. {iqm_client-28.0.0 → iqm_client-29.1.0}/LICENSE.txt +0 -0
  34. {iqm_client-28.0.0 → iqm_client-29.1.0}/MANIFEST.in +0 -0
  35. {iqm_client-28.0.0 → iqm_client-29.1.0}/README.rst +0 -0
  36. {iqm_client-28.0.0 → iqm_client-29.1.0}/docbuild +0 -0
  37. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/API.rst +0 -0
  38. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/_static/images/favicon.ico +0 -0
  39. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/_static/images/logo.png +0 -0
  40. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/_templates/autosummary-class-template.rst +0 -0
  41. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/_templates/autosummary-module-template.rst +0 -0
  42. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/authors.rst +0 -0
  43. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/changelog.rst +0 -0
  44. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/conf.py +0 -0
  45. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/index.rst +0 -0
  46. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/integration_guide.rst +0 -0
  47. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/license.rst +0 -0
  48. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/readme.rst +0 -0
  49. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/user_guide_cirq.rst +0 -0
  50. {iqm_client-28.0.0 → iqm_client-29.1.0}/docs/user_guide_cli.rst +0 -0
  51. {iqm_client-28.0.0 → iqm_client-29.1.0}/pyproject.toml +0 -0
  52. {iqm_client-28.0.0 → iqm_client-29.1.0}/requirements/base.in +0 -0
  53. {iqm_client-28.0.0 → iqm_client-29.1.0}/requirements/cirq.in +0 -0
  54. {iqm_client-28.0.0 → iqm_client-29.1.0}/requirements/cli.in +0 -0
  55. {iqm_client-28.0.0 → iqm_client-29.1.0}/requirements/qiskit.in +0 -0
  56. {iqm_client-28.0.0 → iqm_client-29.1.0}/setup.cfg +0 -0
  57. {iqm_client-28.0.0 → iqm_client-29.1.0}/setup.py +0 -0
  58. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/__init__.py +0 -0
  59. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/devices/__init__.py +0 -0
  60. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/devices/adonis.py +0 -0
  61. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/devices/aphrodite.py +0 -0
  62. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/devices/apollo.py +0 -0
  63. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/devices/iqm_device.py +0 -0
  64. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/devices/iqm_device_metadata.py +0 -0
  65. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/examples/demo_adonis.py +0 -0
  66. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/examples/demo_apollo.py +0 -0
  67. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/examples/demo_common.py +0 -0
  68. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/examples/usage.ipynb +0 -0
  69. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/extended_qasm_parser.py +0 -0
  70. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/iqm_gates.py +0 -0
  71. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/iqm_sampler.py +0 -0
  72. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/optimizers.py +0 -0
  73. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/py.typed +0 -0
  74. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/serialize.py +0 -0
  75. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/cirq_iqm/transpiler.py +0 -0
  76. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/__init__.py +0 -0
  77. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/cli/__init__.py +0 -0
  78. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/cli/auth.py +0 -0
  79. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/cli/cli.py +0 -0
  80. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/cli/models.py +0 -0
  81. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/cli/py.typed +0 -0
  82. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/cli/token_manager.py +0 -0
  83. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/errors.py +0 -0
  84. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/py.typed +0 -0
  85. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/iqm_client/util.py +0 -0
  86. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/__init__.py +0 -0
  87. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/examples/__init__.py +0 -0
  88. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/examples/bell_measure.py +0 -0
  89. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/examples/transpile_example.py +0 -0
  90. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/fake_backends/__init__.py +0 -0
  91. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/fake_backends/fake_adonis.py +0 -0
  92. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/fake_backends/fake_aphrodite.py +0 -0
  93. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/fake_backends/fake_apollo.py +0 -0
  94. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/fake_backends/fake_deneb.py +0 -0
  95. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/fake_backends/fake_garnet.py +0 -0
  96. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py +0 -0
  97. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_backend.py +0 -0
  98. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_circuit.py +0 -0
  99. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_job.py +0 -0
  100. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_move_layout.py +0 -0
  101. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_naive_move_pass.py +0 -0
  102. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_provider.py +0 -0
  103. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/iqm_transpilation.py +0 -0
  104. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/move_gate.py +0 -0
  105. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/py.typed +0 -0
  106. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/qiskit_to_iqm.py +0 -0
  107. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm/qiskit_iqm/transpiler_plugins.py +0 -0
  108. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm_client.egg-info/dependency_links.txt +0 -0
  109. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm_client.egg-info/entry_points.txt +0 -0
  110. {iqm_client-28.0.0 → iqm_client-29.1.0}/src/iqm_client.egg-info/top_level.txt +0 -0
  111. {iqm_client-28.0.0 → iqm_client-29.1.0}/test +0 -0
  112. {iqm_client-28.0.0 → iqm_client-29.1.0}/tests/__init__.py +0 -0
@@ -2,6 +2,40 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 29.1.0 (2025-06-30)
6
+ ===========================
7
+
8
+ Bug fixes
9
+ ---------
10
+
11
+ - Add job id to APITimeoutError
12
+
13
+ Version 29.0.0 (2025-06-13)
14
+ ===========================
15
+
16
+ Features
17
+ --------
18
+
19
+ - Major :class:`IQMClient` refactoring. Many methods now use :class:`StationControlClient` internally to retrieve the data,
20
+ instead of using direct HTTP requests to REST API. This work is going to continue in the future, and the end goal
21
+ is to remove all HTTP logic from :class:`IQMClient` and handle HTTP requests/responses only in :class:`StationControlClient`.
22
+ :issue:`SW-1084`
23
+
24
+ Breaking Changes
25
+ ----------------
26
+
27
+ - Remove :class:`APIVariant` from :class:`IQMClient`, it will support only one version at any given time from now on.
28
+ Upgrade/downgrade software if you want to use different versions of :class:`IQMClient`. :issue:`SW-1084`
29
+ - You may have to pass a different `url` to :class:`IQMClient` than before:
30
+ - If you previously used :class:`APIVariant.V1`, you typically need to change `/cocos` to `/station` in the URL.
31
+ - If you previously used :class:`APIVariant.V2`, you typically need to add `/station` to the URL.
32
+ - If you previously used :class:`APIVariant.RESONANCE_COCOS_V1`, no changes are needed to the URL.
33
+ - Support for ``timeout_secs`` parameter has been dropped from some methods (:meth:`get_static_quantum_architecture`,
34
+ :meth:`get_quality_metric_set`, :meth:`get_calibration_set`, :meth:`get_dynamic_quantum_architecture`, :meth:`get_feedback_groups`).
35
+ :class:`IQMClient` uses :class:`StationControlClient` to retrieve the data now instead of HTTP requests directly, and we have no
36
+ plans to support different request timeout for each endpoint separately in :class:`StationControlClient`. Instead, all
37
+ endpoints uses the same timeout which is currently set to default 120 seconds.
38
+
5
39
  Version 28.0.0 (2025-06-12)
6
40
  ===========================
7
41
 
@@ -22,7 +22,7 @@ requires only the URL of the IQM quantum computer.
22
22
 
23
23
  from iqm.iqm_client import IQMClient
24
24
 
25
- server_url = "https://IQM_SERVER_URL"
25
+ server_url = "https://STATION_CONTROL_URL"
26
26
 
27
27
  iqm_client = IQMClient(server_url)
28
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 28.0.0
3
+ Version: 29.1.0
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
@@ -216,19 +216,27 @@ Requires-Python: <3.13,>=3.10
216
216
  Description-Content-Type: text/x-rst
217
217
  License-File: LICENSE.txt
218
218
  License-File: AUTHORS.rst
219
+ Requires-Dist: iqm-station-control-client<10,>=9
220
+ Requires-Dist: iqm-exa-common<27,>=26
219
221
  Requires-Dist: numpy<3.0,>=1.26.4
220
222
  Requires-Dist: packaging==24.1
221
223
  Requires-Dist: pydantic<3.0,>=2.9.2
222
224
  Requires-Dist: requests==2.32.3
223
225
  Provides-Extra: cirq
226
+ Requires-Dist: iqm-station-control-client<10,>=9; extra == "cirq"
227
+ Requires-Dist: iqm-exa-common<27,>=26; extra == "cirq"
224
228
  Requires-Dist: cirq-core[contrib]~=1.2; extra == "cirq"
225
229
  Requires-Dist: ply==3.11; extra == "cirq"
226
230
  Provides-Extra: cli
231
+ Requires-Dist: iqm-station-control-client<10,>=9; extra == "cli"
232
+ Requires-Dist: iqm-exa-common<27,>=26; extra == "cli"
227
233
  Requires-Dist: click<9,>=8.1.6; extra == "cli"
228
234
  Requires-Dist: jsonschema>=4.6.0; extra == "cli"
229
235
  Requires-Dist: psutil>=5.9.2; extra == "cli"
230
236
  Requires-Dist: python-daemon>=2.3.0; extra == "cli"
231
237
  Provides-Extra: qiskit
238
+ Requires-Dist: iqm-station-control-client<10,>=9; extra == "qiskit"
239
+ Requires-Dist: iqm-exa-common<27,>=26; extra == "qiskit"
232
240
  Requires-Dist: qiskit<1.3,>=1.0; extra == "qiskit"
233
241
  Requires-Dist: qiskit-aer<0.16,>=0.13.1; extra == "qiskit"
234
242
 
@@ -177,14 +177,6 @@ circuit(s) are sampled:
177
177
  `Inspecting circuits before submitting them for execution`_ for inspecting the actual run request sent for
178
178
  execution.
179
179
 
180
- .. note::
181
-
182
- IQM Client is transitioning from server-side API ``V1`` to a new ``V2``.
183
- You may see a deprecation warning in the terminal. You can ignore it; when ``V2`` becomes the default,
184
- Qiskit-on-IQM will transparently start using it. Alternatively, you can set an environment variable
185
- ``IQM_CLIENT_API_VARIANT`` to value ``V2`` and change the backend URL (normally, this means removing
186
- the ``/cocos`` part from the url). The choice of the API version does not affect the use of Qiskit-on-IQM.
187
-
188
180
  You can optionally provide IQMBackend specific options as additional keyword arguments to
189
181
  :meth:`.IQMBackend.run`, documented at :meth:`.IQMBackend.create_run_request`.
190
182
  For example, you can enable heralding measurements using ``circuit_compilation_options`` as follows:
@@ -0,0 +1,6 @@
1
+ iqm-station-control-client>=9,<10
2
+ iqm-exa-common>=26,<27
3
+ numpy >= 1.26.4, < 3.0
4
+ packaging == 24.1
5
+ pydantic >= 2.9.2, <3.0
6
+ requests == 2.32.3
@@ -0,0 +1,4 @@
1
+ iqm-station-control-client>=9,<10
2
+ iqm-exa-common>=26,<27
3
+ cirq-core[contrib] ~= 1.2
4
+ ply == 3.11
@@ -0,0 +1,6 @@
1
+ iqm-station-control-client>=9,<10
2
+ iqm-exa-common>=26,<27
3
+ click >= 8.1.6, < 9
4
+ jsonschema >= 4.6.0
5
+ psutil >= 5.9.2
6
+ python-daemon >= 2.3.0
@@ -0,0 +1,4 @@
1
+ iqm-station-control-client>=9,<10
2
+ iqm-exa-common>=26,<27
3
+ qiskit >= 1.0, < 1.3
4
+ qiskit-aer >= 0.13.1, < 0.16
@@ -13,13 +13,13 @@
13
13
  # limitations under the License.
14
14
  """Demonstrates executing a quantum circuit on an IQM quantum computer.
15
15
 
16
- Set the IQM_SERVER_URL environment variable before running this script.
16
+ Set the STATION_CONTROL_URL environment variable before running this script.
17
17
  Also, if the server you are running against requires authentication you will also have to set
18
18
  IQM_AUTH_SERVER, and either IQM_TOKENS_FILE or both of IQM_AUTH_USERNAME and IQM_AUTH_PASSWORD.
19
19
 
20
20
  E.g.
21
21
 
22
- export IQM_SERVER_URL="https://example.com/cocos"
22
+ export STATION_CONTROL_URL="https://example.com/station"
23
23
  export IQM_AUTH_SERVER="https://example.com/auth"
24
24
  export IQM_TOKENS_FILE="/path/to/my/tokens.json"
25
25
  """
@@ -45,7 +45,7 @@ def demo_run_circuit() -> None:
45
45
  print("Original circuit:\n")
46
46
  print(circuit)
47
47
 
48
- sampler = IQMSampler(os.environ["IQM_SERVER_URL"])
48
+ sampler = IQMSampler(os.environ["STATION_CONTROL_URL"])
49
49
 
50
50
  circuit_routed, _, _ = sampler.device.route_circuit(circuit)
51
51
  circuit_decomposed = sampler.device.decompose_circuit(circuit_routed)
@@ -0,0 +1,90 @@
1
+ # Copyright 2024 IQM client developers
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """This module contains definitions of IQM Server API endpoints."""
15
+
16
+ from enum import Enum, auto
17
+ from posixpath import join
18
+
19
+
20
+ class APIEndpoint(Enum):
21
+ """Supported API endpoints."""
22
+
23
+ GET_JOB_RESULT = auto()
24
+ GET_JOB_REQUEST_PARAMETERS = auto()
25
+ GET_JOB_CALIBRATION_SET_ID = auto()
26
+ GET_JOB_CIRCUITS_BATCH = auto()
27
+ GET_JOB_ERROR_LOG = auto()
28
+ SUBMIT_JOB = auto()
29
+ GET_JOB_COUNTS = auto()
30
+ GET_JOB_STATUS = auto()
31
+ GET_JOB_TIMELINE = auto()
32
+ ABORT_JOB = auto()
33
+
34
+
35
+ class APIConfig:
36
+ """Provides supported API endpoints for a given API variant."""
37
+
38
+ def __init__(self, station_control_url: str):
39
+ """Args:
40
+ station_control_url: URL of the IQM server,
41
+ e.g. https://test.qc.iqm.fi/station or https://cocos.resonance.meetiqm.com/garnet
42
+
43
+ """
44
+ self.station_control_url = station_control_url
45
+ self.urls = self._get_api_urls()
46
+
47
+ @staticmethod
48
+ def _get_api_urls() -> dict[APIEndpoint, str]:
49
+ """Returns:
50
+ Relative URLs for each supported API endpoints.
51
+
52
+ """
53
+ return {
54
+ # TODO SW-1434: Use StationControlClient methods for communication instead of REST endpoints
55
+ APIEndpoint.GET_JOB_RESULT: "jobs/%s/measurements",
56
+ APIEndpoint.GET_JOB_REQUEST_PARAMETERS: "jobs/%s/request_parameters",
57
+ APIEndpoint.GET_JOB_CALIBRATION_SET_ID: "jobs/%s/calibration_set_id",
58
+ APIEndpoint.GET_JOB_CIRCUITS_BATCH: "jobs/%s/circuits_batch",
59
+ APIEndpoint.GET_JOB_ERROR_LOG: "jobs/%s/error_log",
60
+ APIEndpoint.SUBMIT_JOB: "circuits",
61
+ APIEndpoint.GET_JOB_COUNTS: "circuits/%s/counts",
62
+ APIEndpoint.GET_JOB_STATUS: "jobs/%s/status",
63
+ APIEndpoint.GET_JOB_TIMELINE: "jobs/%s/timeline",
64
+ APIEndpoint.ABORT_JOB: "jobs/%s/abort",
65
+ }
66
+
67
+ def is_supported(self, endpoint: APIEndpoint) -> bool:
68
+ """Args:
69
+ endpoint: API endpoint.
70
+
71
+ Returns:
72
+ True if the endpoint is supported, False otherwise.
73
+
74
+ """
75
+ return endpoint in self.urls
76
+
77
+ def url(self, endpoint: APIEndpoint, *args) -> str:
78
+ """Args:
79
+ endpoint: API endpoint.
80
+ args: Arguments to be passed to the URL.
81
+
82
+ Returns:
83
+ URL for the given endpoint.
84
+
85
+ Raises:
86
+ ValueError: If the endpoint is not supported.
87
+
88
+ """
89
+ url = self.urls.get(endpoint)
90
+ return join(self.station_control_url, url % args)
@@ -300,7 +300,7 @@ class TokenClient(TokenProviderInterface):
300
300
  if access_token is None:
301
301
  # Failed to get valid access token using username and password, raise an error
302
302
  raise ClientAuthenticationError("Getting access token from auth server failed")
303
- return str(access_token) # acces token can not be None here
303
+ return str(access_token) # access token can not be None here
304
304
 
305
305
  def close(self) -> None:
306
306
  """Close authentication session"""