iqm-client 29.6.0__tar.gz → 29.8.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 (106) hide show
  1. {iqm_client-29.6.0 → iqm_client-29.8.0}/CHANGELOG.rst +17 -0
  2. {iqm_client-29.6.0 → iqm_client-29.8.0}/PKG-INFO +1 -1
  3. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/user_guide_qiskit.rst +6 -5
  4. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_provider.py +36 -15
  5. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm_client.egg-info/PKG-INFO +1 -1
  6. iqm_client-29.8.0/version.txt +1 -0
  7. iqm_client-29.6.0/version.txt +0 -1
  8. {iqm_client-29.6.0 → iqm_client-29.8.0}/AUTHORS.rst +0 -0
  9. {iqm_client-29.6.0 → iqm_client-29.8.0}/CHANGELOG_cirq-iqm.rst +0 -0
  10. {iqm_client-29.6.0 → iqm_client-29.8.0}/CHANGELOG_cortex-cli.rst +0 -0
  11. {iqm_client-29.6.0 → iqm_client-29.8.0}/CHANGELOG_qiskit-iqm.rst +0 -0
  12. {iqm_client-29.6.0 → iqm_client-29.8.0}/INTEGRATION_GUIDE.rst +0 -0
  13. {iqm_client-29.6.0 → iqm_client-29.8.0}/LICENSE.txt +0 -0
  14. {iqm_client-29.6.0 → iqm_client-29.8.0}/MANIFEST.in +0 -0
  15. {iqm_client-29.6.0 → iqm_client-29.8.0}/README.rst +0 -0
  16. {iqm_client-29.6.0 → iqm_client-29.8.0}/docbuild +0 -0
  17. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/API.rst +0 -0
  18. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/_static/images/favicon.ico +0 -0
  19. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/_static/images/logo.png +0 -0
  20. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/_templates/autosummary-class-template.rst +0 -0
  21. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/_templates/autosummary-module-template.rst +0 -0
  22. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/authors.rst +0 -0
  23. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/changelog.rst +0 -0
  24. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/conf.py +0 -0
  25. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/index.rst +0 -0
  26. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/integration_guide.rst +0 -0
  27. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/license.rst +0 -0
  28. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/readme.rst +0 -0
  29. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/user_guide_cirq.rst +0 -0
  30. {iqm_client-29.6.0 → iqm_client-29.8.0}/docs/user_guide_cli.rst +0 -0
  31. {iqm_client-29.6.0 → iqm_client-29.8.0}/pyproject.toml +0 -0
  32. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/base.in +0 -0
  33. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/base.txt +0 -0
  34. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/cirq.in +0 -0
  35. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/cirq.txt +0 -0
  36. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/cli.in +0 -0
  37. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/cli.txt +0 -0
  38. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/qiskit.in +0 -0
  39. {iqm_client-29.6.0 → iqm_client-29.8.0}/requirements/qiskit.txt +0 -0
  40. {iqm_client-29.6.0 → iqm_client-29.8.0}/setup.cfg +0 -0
  41. {iqm_client-29.6.0 → iqm_client-29.8.0}/setup.py +0 -0
  42. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/__init__.py +0 -0
  43. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/devices/__init__.py +0 -0
  44. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/devices/adonis.py +0 -0
  45. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/devices/aphrodite.py +0 -0
  46. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/devices/apollo.py +0 -0
  47. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/devices/iqm_device.py +0 -0
  48. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/devices/iqm_device_metadata.py +0 -0
  49. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/examples/demo_adonis.py +0 -0
  50. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/examples/demo_apollo.py +0 -0
  51. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/examples/demo_common.py +0 -0
  52. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/examples/demo_iqm_execution.py +0 -0
  53. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/examples/usage.ipynb +0 -0
  54. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/extended_qasm_parser.py +0 -0
  55. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/iqm_gates.py +0 -0
  56. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/iqm_sampler.py +0 -0
  57. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/optimizers.py +0 -0
  58. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/py.typed +0 -0
  59. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/serialize.py +0 -0
  60. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/cirq_iqm/transpiler.py +0 -0
  61. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/__init__.py +0 -0
  62. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/api.py +0 -0
  63. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/authentication.py +0 -0
  64. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/cli/__init__.py +0 -0
  65. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/cli/auth.py +0 -0
  66. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/cli/cli.py +0 -0
  67. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/cli/models.py +0 -0
  68. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/cli/token_manager.py +0 -0
  69. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/errors.py +0 -0
  70. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/iqm_client.py +0 -0
  71. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/models.py +0 -0
  72. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/py.typed +0 -0
  73. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/transpile.py +0 -0
  74. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/util.py +0 -0
  75. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/iqm_client/validation.py +0 -0
  76. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/__init__.py +0 -0
  77. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/examples/__init__.py +0 -0
  78. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/examples/bell_measure.py +0 -0
  79. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/examples/resonance_example.py +0 -0
  80. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/examples/transpile_example.py +0 -0
  81. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/fake_backends/__init__.py +0 -0
  82. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/fake_backends/fake_adonis.py +0 -0
  83. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/fake_backends/fake_aphrodite.py +0 -0
  84. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/fake_backends/fake_apollo.py +0 -0
  85. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/fake_backends/fake_deneb.py +0 -0
  86. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/fake_backends/fake_garnet.py +0 -0
  87. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py +0 -0
  88. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_backend.py +0 -0
  89. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_circuit.py +0 -0
  90. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_circuit_validation.py +0 -0
  91. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_job.py +0 -0
  92. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_move_layout.py +0 -0
  93. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_naive_move_pass.py +0 -0
  94. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/iqm_transpilation.py +0 -0
  95. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/move_gate.py +0 -0
  96. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/py.typed +0 -0
  97. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/qiskit_to_iqm.py +0 -0
  98. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm/qiskit_iqm/transpiler_plugins.py +0 -0
  99. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm_client.egg-info/SOURCES.txt +0 -0
  100. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm_client.egg-info/dependency_links.txt +0 -0
  101. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm_client.egg-info/entry_points.txt +0 -0
  102. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm_client.egg-info/requires.txt +0 -0
  103. {iqm_client-29.6.0 → iqm_client-29.8.0}/src/iqm_client.egg-info/top_level.txt +0 -0
  104. {iqm_client-29.6.0 → iqm_client-29.8.0}/test +0 -0
  105. {iqm_client-29.6.0 → iqm_client-29.8.0}/tests/__init__.py +0 -0
  106. {iqm_client-29.6.0 → iqm_client-29.8.0}/tests/conftest.py +0 -0
@@ -2,6 +2,23 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 29.8.0 (2025-07-23)
6
+ ===========================
7
+
8
+ Features
9
+ --------
10
+
11
+ - An update to IQMFacadeBackend such that all available IQMFakeBackends are usable for simulation, rather than
12
+ just IQMFakeAdonis
13
+
14
+ Version 29.7.0 (2025-07-15)
15
+ ===========================
16
+
17
+ Bug fixes
18
+ ---------
19
+
20
+ - Fix Resonance example links in Qiskit user guide
21
+
5
22
  Version 29.6.0 (2025-07-15)
6
23
  ===========================
7
24
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 29.6.0
3
+ Version: 29.8.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
@@ -29,7 +29,7 @@ IQM Resonance
29
29
  your token, you have the option to regenerate it at any time. However, be aware that regenerating
30
30
  your API token will invalidate any previously generated token.
31
31
  3. Download one of the demo notebooks from `IQM Academy <https://www.iqmacademy.com/tutorials/>`_ or the
32
- `resonance_example.py example file <https://raw.githubusercontent.com/iqm-finland/sdk/main/iqm-client/src/iqm/qiskit_iqm/examples/resonance_example.py>`_
32
+ `resonance_example.py example file <https://raw.githubusercontent.com/iqm-finland/sdk/refs/heads/main/iqm_client/src/iqm/qiskit_iqm/examples/resonance_example.py>`_
33
33
  (Save Page As...)
34
34
  4. Install Qiskit on IQM as instructed below.
35
35
  5. Add your API token to the example (either as the parameter ``token`` to the :class:`.IQMProvider`
@@ -92,7 +92,7 @@ If you are using IQM Resonance, you have two options to authenticate:
92
92
  1. Set the :envvar:`IQM_TOKEN` environment variable to the API token obtained from the Resonance dashboard.
93
93
  2. Pass the ``token`` parameter to :class:`.IQMProvider`. This will be forwarded to
94
94
  :class:`~iqm.iqm_client.iqm_client.IQMClient`. For an example, see the `resonance_example.py file
95
- <https://raw.githubusercontent.com/iqm-finland/sdk/main/iqm-client/src/iqm/qiskit_iqm/examples/resonance_example.py>`_
95
+ <https://raw.githubusercontent.com/iqm-finland/sdk/refs/heads/main/iqm_client/src/iqm/qiskit_iqm/examples/resonance_example.py>`_
96
96
 
97
97
  On-premises devices
98
98
  ~~~~~~~~~~~~~~~~~~~
@@ -734,9 +734,10 @@ Results from such executions are random bits. This may be useful when developing
734
734
  Qiskit on IQM contains :class:`.IQMFacadeBackend`, which allows to combine the mock remote execution with a local
735
735
  noisy quantum circuit simulation. This way you can both validate your integration as well as get an idea of the expected circuit execution results.
736
736
 
737
- To run a circuit this way, use the ``"facade_adonis"`` backend retrieved from the provider. Note that the provider must be
738
- initialized with the URL of a quantum computer with the equivalent architecture (i.e. names of qubits, their
739
- connectivity, and the native gateset should match the 5-qubit Adonis architecture).
737
+ To run a circuit this way, use the ``"facade_x"``, (where `x` is one of the adonis, aprhodite, apollo, deneb or garnet architectures) backend retrieved from the provider.
738
+ Note that the provider must be initialized with the URL of a quantum computer with the equivalent architecture (i.e. names of qubits, their
739
+ connectivity, and the native gateset should match the desired architecture).
740
+ Additionally, the URL should point to a mock environment rather than a real device as the execution results from the remote will be discarded and replaced by a simulated result generated by Qiskit Aer.
740
741
 
741
742
  .. code-block:: python
742
743
 
@@ -21,9 +21,17 @@ from typing import Any
21
21
  from uuid import UUID
22
22
  import warnings
23
23
 
24
- from iqm.iqm_client import Circuit, CircuitCompilationOptions, CircuitValidationError, IQMClient, RunRequest
24
+ from iqm.iqm_client import (
25
+ Circuit,
26
+ CircuitCompilationOptions,
27
+ CircuitValidationError,
28
+ IQMClient,
29
+ RunRequest,
30
+ )
25
31
  from iqm.iqm_client.util import to_json_dict
32
+ from iqm.qiskit_iqm import IQMFakeAphrodite, IQMFakeApollo, IQMFakeDeneb
26
33
  from iqm.qiskit_iqm.fake_backends import IQMFakeAdonis
34
+ from iqm.qiskit_iqm.fake_backends.fake_garnet import IQMFakeGarnet
27
35
  from iqm.qiskit_iqm.iqm_backend import IQMBackendBase
28
36
  from iqm.qiskit_iqm.iqm_job import IQMJob
29
37
  from iqm.qiskit_iqm.qiskit_to_iqm import serialize_instructions
@@ -257,26 +265,31 @@ class IQMBackend(IQMBackendBase):
257
265
  return Circuit(name=circuit.name, instructions=instructions, metadata=metadata)
258
266
 
259
267
 
268
+ facade_names = {
269
+ "facade_adonis": IQMFakeAdonis(),
270
+ "facade_aphrodite": IQMFakeAphrodite(),
271
+ "facade_apollo": IQMFakeApollo(),
272
+ "facade_deneb": IQMFakeDeneb(),
273
+ "facade_garnet": IQMFakeGarnet(),
274
+ }
275
+
276
+
260
277
  class IQMFacadeBackend(IQMBackend):
261
- """Facade backend for mimicking the execution of quantum circuits on IQM quantum computers. Allows to submit a
262
- circuit to the IQM server, and if the execution was successful, performs a simulation with a respective IQM noise
263
- model locally, then returns the simulated results.
278
+ """Simulates the execution of quantum circuits on a mock IQM quantum computer.
279
+
280
+ Can be used to submit a circuit to a mock IQM server that has no real quantum hardware,
281
+ and if the mock execution is successful, simulates the circuit locally using an error model that
282
+ is representative of the mocked QPU. Finally returns the simulated results.
264
283
 
265
284
  Args:
266
- client: client instance for communicating with an IQM server
267
- **kwargs: optional arguments to be passed to the parent Backend initializer
285
+ client: Client instance for communicating with an IQM server.
286
+ **kwargs: Optional arguments to be passed to the parent class.
268
287
 
269
288
  """
270
289
 
271
290
  def __init__(self, client: IQMClient, **kwargs):
272
- self.fake_adonis = IQMFakeAdonis()
273
- target_architecture = client.get_static_quantum_architecture()
274
-
275
- if not self.fake_adonis.validate_compatible_architecture(target_architecture):
276
- raise ValueError("Quantum architecture of the remote quantum computer does not match Adonis.")
277
-
278
291
  super().__init__(client, **kwargs)
279
- self.name = "facade_adonis"
292
+ self.backend = self._determine_facade_backend_from_sqa()
280
293
 
281
294
  def _validate_no_empty_cregs(self, circuit: QuantumCircuit) -> bool:
282
295
  """Returns True if given circuit has no empty (unused) classical registers, False otherwise."""
@@ -289,6 +302,12 @@ class IQMFacadeBackend(IQMBackend):
289
302
  return False
290
303
  return True
291
304
 
305
+ def _determine_facade_backend_from_sqa(self) -> IQMFacadeBackend:
306
+ for backend in facade_names.values():
307
+ if backend.validate_compatible_architecture(self.client.get_static_quantum_architecture()):
308
+ return backend
309
+ raise ValueError("Quantum architecture of the remote quantum computer does not match facade input.")
310
+
292
311
  def run(self, run_input: QuantumCircuit | list[QuantumCircuit], **options) -> JobV1:
293
312
  circuits = [run_input] if isinstance(run_input, QuantumCircuit) else run_input
294
313
  circuits_validated_cregs: list[bool] = [self._validate_no_empty_cregs(circuit) for circuit in circuits]
@@ -302,7 +321,7 @@ class IQMFacadeBackend(IQMBackend):
302
321
  iqm_backend_job.result() # get and discard results
303
322
  if iqm_backend_job.status() == JobStatus.ERROR:
304
323
  raise RuntimeError("Remote execution did not succeed.")
305
- return self.fake_adonis.run(run_input, **options)
324
+ return self.backend.run(run_input, **options)
306
325
 
307
326
 
308
327
  class IQMProvider:
@@ -336,7 +355,9 @@ class IQMProvider:
336
355
  client = IQMClient(self.url, **self.user_auth_args)
337
356
 
338
357
  if name and name.startswith("facade_"):
339
- if name == "facade_adonis":
358
+ if name in facade_names:
359
+ if not facade_names[name].validate_compatible_architecture(client.get_static_quantum_architecture()):
360
+ raise ValueError("Quantum architecture of the remote quantum computer does not match facade input.")
340
361
  return IQMFacadeBackend(client)
341
362
 
342
363
  warnings.warn(f"Unknown facade backend: {name}. A regular backend associated with {self.url} will be used.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 29.6.0
3
+ Version: 29.8.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
@@ -0,0 +1 @@
1
+ 29.8.0
@@ -1 +0,0 @@
1
- 29.6.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
File without changes
File without changes