iqm-client 30.0.0__tar.gz → 30.2.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 (109) hide show
  1. {iqm_client-30.0.0 → iqm_client-30.2.0}/CHANGELOG.rst +17 -1
  2. {iqm_client-30.0.0 → iqm_client-30.2.0}/PKG-INFO +1 -1
  3. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/user_guide_qiskit.rst +9 -0
  4. {iqm_client-30.0.0 → iqm_client-30.2.0}/pyproject.toml +3 -3
  5. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/devices/iqm_device.py +1 -1
  6. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/devices/iqm_device_metadata.py +1 -1
  7. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/iqm_sampler.py +1 -1
  8. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/optimizers.py +1 -1
  9. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/cli/cli.py +3 -3
  10. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/models.py +6 -6
  11. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/util.py +1 -1
  12. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/examples/resonance_example.py +1 -1
  13. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_circuit.py +1 -1
  14. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_circuit_validation.py +1 -1
  15. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_job.py +1 -1
  16. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_move_layout.py +3 -3
  17. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_provider.py +8 -6
  18. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_target.py +1 -1
  19. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_transpilation.py +2 -2
  20. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/move_gate.py +2 -2
  21. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/transpiler_plugins.py +2 -2
  22. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm_client.egg-info/PKG-INFO +1 -1
  23. iqm_client-30.2.0/version.txt +1 -0
  24. iqm_client-30.0.0/version.txt +0 -1
  25. {iqm_client-30.0.0 → iqm_client-30.2.0}/AUTHORS.rst +0 -0
  26. {iqm_client-30.0.0 → iqm_client-30.2.0}/CHANGELOG_cirq-iqm.rst +0 -0
  27. {iqm_client-30.0.0 → iqm_client-30.2.0}/CHANGELOG_cortex-cli.rst +0 -0
  28. {iqm_client-30.0.0 → iqm_client-30.2.0}/CHANGELOG_qiskit-iqm.rst +0 -0
  29. {iqm_client-30.0.0 → iqm_client-30.2.0}/INTEGRATION_GUIDE.rst +0 -0
  30. {iqm_client-30.0.0 → iqm_client-30.2.0}/LICENSE.txt +0 -0
  31. {iqm_client-30.0.0 → iqm_client-30.2.0}/MANIFEST.in +0 -0
  32. {iqm_client-30.0.0 → iqm_client-30.2.0}/README.rst +0 -0
  33. {iqm_client-30.0.0 → iqm_client-30.2.0}/docbuild +0 -0
  34. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/API.rst +0 -0
  35. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/_static/images/favicon.ico +0 -0
  36. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/_static/images/logo.png +0 -0
  37. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/_templates/autosummary-class-template.rst +0 -0
  38. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/_templates/autosummary-module-template.rst +0 -0
  39. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/authors.rst +0 -0
  40. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/changelog.rst +0 -0
  41. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/conf.py +0 -0
  42. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/index.rst +0 -0
  43. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/integration_guide.rst +0 -0
  44. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/license.rst +0 -0
  45. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/readme.rst +0 -0
  46. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/user_guide_cirq.rst +0 -0
  47. {iqm_client-30.0.0 → iqm_client-30.2.0}/docs/user_guide_cli.rst +0 -0
  48. {iqm_client-30.0.0 → iqm_client-30.2.0}/pytest.ini +0 -0
  49. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/base.in +0 -0
  50. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/base.in.internal +0 -0
  51. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/base.txt +0 -0
  52. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/cirq.in +0 -0
  53. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/cirq.txt +0 -0
  54. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/cli.in +0 -0
  55. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/cli.txt +0 -0
  56. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/qiskit.in +0 -0
  57. {iqm_client-30.0.0 → iqm_client-30.2.0}/requirements/qiskit.txt +0 -0
  58. {iqm_client-30.0.0 → iqm_client-30.2.0}/setup.cfg +0 -0
  59. {iqm_client-30.0.0 → iqm_client-30.2.0}/setup.py +0 -0
  60. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/__init__.py +0 -0
  61. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/devices/__init__.py +0 -0
  62. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/devices/adonis.py +0 -0
  63. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/devices/aphrodite.py +0 -0
  64. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/devices/apollo.py +0 -0
  65. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/examples/demo_adonis.py +0 -0
  66. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/examples/demo_apollo.py +0 -0
  67. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/examples/demo_common.py +0 -0
  68. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/examples/demo_iqm_execution.py +0 -0
  69. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/examples/usage.ipynb +0 -0
  70. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/extended_qasm_parser.py +0 -0
  71. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/iqm_gates.py +0 -0
  72. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/py.typed +0 -0
  73. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/serialize.py +0 -0
  74. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/cirq_iqm/transpiler.py +0 -0
  75. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/__init__.py +0 -0
  76. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/api.py +0 -0
  77. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/authentication.py +0 -0
  78. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/cli/__init__.py +0 -0
  79. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/cli/auth.py +0 -0
  80. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/cli/models.py +0 -0
  81. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/cli/token_manager.py +0 -0
  82. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/errors.py +0 -0
  83. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/iqm_client.py +0 -0
  84. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/py.typed +0 -0
  85. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/transpile.py +0 -0
  86. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/iqm_client/validation.py +0 -0
  87. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/__init__.py +0 -0
  88. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/examples/__init__.py +0 -0
  89. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/examples/bell_measure.py +0 -0
  90. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/examples/transpile_example.py +0 -0
  91. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/fake_backends/__init__.py +0 -0
  92. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/fake_backends/fake_adonis.py +0 -0
  93. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/fake_backends/fake_aphrodite.py +0 -0
  94. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/fake_backends/fake_apollo.py +0 -0
  95. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/fake_backends/fake_deneb.py +0 -0
  96. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/fake_backends/fake_garnet.py +0 -0
  97. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py +0 -0
  98. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_backend.py +0 -0
  99. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/iqm_naive_move_pass.py +0 -0
  100. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/py.typed +0 -0
  101. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm/qiskit_iqm/qiskit_to_iqm.py +0 -0
  102. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm_client.egg-info/SOURCES.txt +0 -0
  103. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm_client.egg-info/dependency_links.txt +0 -0
  104. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm_client.egg-info/entry_points.txt +0 -0
  105. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm_client.egg-info/requires.txt +0 -0
  106. {iqm_client-30.0.0 → iqm_client-30.2.0}/src/iqm_client.egg-info/top_level.txt +0 -0
  107. {iqm_client-30.0.0 → iqm_client-30.2.0}/test +0 -0
  108. {iqm_client-30.0.0 → iqm_client-30.2.0}/tests/__init__.py +0 -0
  109. {iqm_client-30.0.0 → iqm_client-30.2.0}/tests/conftest.py +0 -0
@@ -2,6 +2,22 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 30.2.0 (2025-09-03)
6
+ ===========================
7
+
8
+ Features
9
+ --------
10
+
11
+ - Enable ruff rule for missing annotations and mark exemptions.
12
+
13
+ Version 30.1.0 (2025-08-28)
14
+ ===========================
15
+
16
+ Bug fixes
17
+ ---------
18
+
19
+ - fix initialization of backends on resonance
20
+
5
21
  Version 30.0.0 (2025-08-20)
6
22
  ===========================
7
23
 
@@ -52,7 +68,7 @@ Version 29.11.0 (2025-08-07)
52
68
  Features
53
69
  --------
54
70
 
55
- - Added :meth:`IQMClient.get_structured_metrics` for obtaining quality metric information.
71
+ - Added :meth:`IQMClient._get_calibration_quality_metrics` for obtaining quality metric and calibration information.
56
72
 
57
73
  Version 29.10.0 (2025-07-31)
58
74
  ============================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 30.0.0
3
+ Version: 30.2.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
@@ -174,6 +174,15 @@ circuit(s) are sampled:
174
174
  `Inspecting circuits before submitting them for execution`_ for inspecting the actual run request sent for
175
175
  execution.
176
176
 
177
+ .. note::
178
+
179
+ As of ``iqm-client >= 30.1.0``, structured quality metrics and calibration data are available to
180
+ ``IQMTarget`` for improved transpilation. To import the latest valid quality metric data corresponding
181
+ to the default calibration set into ``IQMTarget``, set ``use_metrics`` to ``True`` when initializing the
182
+ class. For Resonance users, this data is not yet available via the Resonance API, so use the default setting
183
+ of ``use_metrics`` of ``False``.
184
+
185
+
177
186
  You can optionally provide IQMBackend specific options as additional keyword arguments to
178
187
  :meth:`.IQMBackend.run`, documented at :meth:`.IQMBackend.create_run_request`.
179
188
  For example, you can enable heralding measurements using ``circuit_compilation_options`` as follows:
@@ -72,7 +72,7 @@ nb_diff_ignore = [ "/metadata/language_info", "/metadata/widgets", "/cells/*/exe
72
72
 
73
73
  [tool.ruff.lint]
74
74
  ignore = [ "D203", "D213",]
75
- select = [ "E4", "E7", "E9", "E5", "F", "Q", "PL", "I", "D", "UP007", "UP006", "UP035",]
75
+ select = [ "E4", "E7", "E9", "E5", "F", "Q", "PL", "I", "D", "UP007", "UP006", "UP035", "ANN001", "ANN201", "ANN202",]
76
76
  unfixable = [ "F401",]
77
77
 
78
78
  [tool.ruff.lint.isort]
@@ -85,9 +85,9 @@ relative-imports-order = "closest-to-furthest"
85
85
  [tool.ruff.lint.per-file-ignores]
86
86
  "**/__init__.py" = [ "F401", "PLR0402",]
87
87
  "**/docs/*" = [ "E402", "D100",]
88
- "**/setup.py" = [ "D100", "D103", "I001",]
88
+ "**/setup.py" = [ "D100", "D103", "I001", "ANN201",]
89
89
  "**/src/*" = [ "PLR2004", "D400", "D415", "D205", "D401", "D417", "D100", "D101", "D107", "D102", "D105", "D103", "D404", "D104",]
90
- "**/tests/*" = [ "F632", "PLR2004", "PLR0402", "PLC0414", "D",]
90
+ "**/tests/*" = [ "F632", "PLR2004", "PLR0402", "PLC0414", "D", "ANN001", "ANN201", "ANN202",]
91
91
 
92
92
  [tool.ruff.lint.pylint]
93
93
  max-args = 8
@@ -364,5 +364,5 @@ class IQMDevice(devices.Device):
364
364
  if len(qubits_updated) != 0:
365
365
  raise ValueError(f"Circuit ends with a qubit state in the resonator {res!r}.")
366
366
 
367
- def __eq__(self, other):
367
+ def __eq__(self, other): # noqa: ANN001
368
368
  return self.__class__ == other.__class__ and self._metadata == other._metadata
@@ -166,5 +166,5 @@ class IQMDeviceMetadata(devices.DeviceMetadata):
166
166
  """Returns the ``cirq.Gateset`` of supported gates on this device."""
167
167
  return self._gateset
168
168
 
169
- def _value_equality_values_(self):
169
+ def _value_equality_values_(self): # noqa: ANN202
170
170
  return *super()._value_equality_values_(), self._gateset
@@ -85,7 +85,7 @@ class IQMSampler(cirq.work.Sampler):
85
85
  """Returns the device used by the sampler."""
86
86
  return self._device
87
87
 
88
- def close_client(self):
88
+ def close_client(self): # noqa: ANN201
89
89
  """Close IQMClient's session with the user authentication server. Discard the client."""
90
90
  if not self._client:
91
91
  return
@@ -92,7 +92,7 @@ class MergeOneParameterGroupGates(circuits.PointOptimizer):
92
92
  GATE_MERGING_TOLERANCE = 1e-10
93
93
 
94
94
  @classmethod
95
- def _normalize_par(cls, par):
95
+ def _normalize_par(cls, par): # noqa: ANN001
96
96
  """Normalizes the given parameter value to (-period/2, period/2]."""
97
97
  shift = cls.PERIOD / 2
98
98
  return operator.mod(par - shift, -cls.PERIOD) + shift
@@ -58,7 +58,7 @@ class ClickLoggingHandler(logging.Handler):
58
58
  super().__init__(level=logging.NOTSET)
59
59
  self.formatter = logging.Formatter("%(message)s")
60
60
 
61
- def emit(self, record):
61
+ def emit(self, record): # noqa: ANN001, ANN201
62
62
  click.echo(self.format(record))
63
63
 
64
64
 
@@ -463,7 +463,7 @@ def auth() -> None:
463
463
  help="Location of the configuration file to be used.",
464
464
  )
465
465
  @click.option("-v", "--verbose", is_flag=True, help="Print extra information.")
466
- def status(config_file, verbose) -> None:
466
+ def status(config_file, verbose) -> None: # noqa: ANN001
467
467
  """Check status of authentication."""
468
468
  _set_log_level_by_verbosity(verbose)
469
469
 
@@ -503,7 +503,7 @@ def status(config_file, verbose) -> None:
503
503
  click.echo(f"Token manager: {click.style('NOT RUNNING', fg='red')}")
504
504
 
505
505
 
506
- def _validate_iqm_client_cli_auth_login(no_daemon, no_refresh, config_file) -> ConfigFile:
506
+ def _validate_iqm_client_cli_auth_login(no_daemon, no_refresh, config_file) -> ConfigFile: # noqa: ANN001
507
507
  """Checks if provided combination of auth login options is valid:
508
508
  - no_daemon and no_refresh are mutually exclusive
509
509
  - config file should pass validation
@@ -288,7 +288,7 @@ class Instruction(BaseModel):
288
288
 
289
289
  @field_validator("name")
290
290
  @classmethod
291
- def name_validator(cls, value):
291
+ def name_validator(cls, value): # noqa: ANN001
292
292
  """Check if the name of instruction is set to one of the supported quantum operations."""
293
293
  name = value
294
294
  if name not in _SUPPORTED_OPERATIONS:
@@ -298,7 +298,7 @@ class Instruction(BaseModel):
298
298
 
299
299
  @field_validator("implementation")
300
300
  @classmethod
301
- def implementation_validator(cls, value):
301
+ def implementation_validator(cls, value): # noqa: ANN001
302
302
  """Check if the implementation of the instruction is set to a non-empty string."""
303
303
  implementation = value
304
304
  if isinstance(implementation, str):
@@ -308,7 +308,7 @@ class Instruction(BaseModel):
308
308
 
309
309
  @field_validator("qubits")
310
310
  @classmethod
311
- def qubits_validator(cls, value, info: ValidationInfo):
311
+ def qubits_validator(cls, value, info: ValidationInfo): # noqa: ANN001
312
312
  """Check if the instruction has the correct number of qubits for its operation."""
313
313
  qubits = value
314
314
  name = info.data.get("name")
@@ -321,7 +321,7 @@ class Instruction(BaseModel):
321
321
 
322
322
  @field_validator("args")
323
323
  @classmethod
324
- def args_validator(cls, value, info: ValidationInfo):
324
+ def args_validator(cls, value, info: ValidationInfo): # noqa: ANN001
325
325
  """Check argument names and types for a given instruction"""
326
326
  args = value
327
327
  name = info.data.get("name")
@@ -426,7 +426,7 @@ class Circuit(BaseModel):
426
426
 
427
427
  @field_validator("name")
428
428
  @classmethod
429
- def name_validator(cls, value):
429
+ def name_validator(cls, value): # noqa: ANN001
430
430
  """Check if the circuit name is a non-empty string"""
431
431
  name = value
432
432
  if len(name) == 0:
@@ -435,7 +435,7 @@ class Circuit(BaseModel):
435
435
 
436
436
  @field_validator("instructions")
437
437
  @classmethod
438
- def instructions_validator(cls, value):
438
+ def instructions_validator(cls, value): # noqa: ANN001
439
439
  """Check the container of instructions and each instruction within"""
440
440
  instructions = value
441
441
 
@@ -22,7 +22,7 @@ import numpy as np
22
22
  class IQMJSONEncoder(JSONEncoder):
23
23
  """JSONEncoder that that adds support for some non-JSON datatypes"""
24
24
 
25
- def default(self, o: Any):
25
+ def default(self, o: Any): # noqa: ANN201
26
26
  if isinstance(o, np.ndarray):
27
27
  return o.tolist()
28
28
  return JSONEncoder.default(self, o)
@@ -37,7 +37,7 @@ def resonance_example(server_url: str, api_token: str | None) -> dict[str, int]:
37
37
  SHOTS = 1000
38
38
 
39
39
  # Initialize a backend without metrics as IQMClient._get_calibration_quality_metrics is not supported by resonance
40
- backend = IQMProvider(server_url, token=api_token).get_backend(use_metrics=False)
40
+ backend = IQMProvider(server_url, token=api_token).get_backend()
41
41
 
42
42
  # Just to make sure that "get_static_quantum_architecture" method works
43
43
  static_quantum_architecture = backend.client.get_static_quantum_architecture()
@@ -22,7 +22,7 @@ from qiskit import QuantumCircuit
22
22
  class IQMCircuit(QuantumCircuit):
23
23
  """Extends the QuantumCircuit class, adding a shortcut for applying the MOVE gate."""
24
24
 
25
- def move(self, qubit: int, resonator: int):
25
+ def move(self, qubit: int, resonator: int): # noqa: ANN201
26
26
  """Applies the MOVE gate to the circuit.
27
27
 
28
28
  Note: at this point the circuit layout is only guaranteed to work if the order
@@ -21,7 +21,7 @@ from iqm.qiskit_iqm.qiskit_to_iqm import serialize_instructions
21
21
  from qiskit import QuantumCircuit
22
22
 
23
23
 
24
- def validate_circuit(
24
+ def validate_circuit( # noqa: ANN201
25
25
  circuit: QuantumCircuit,
26
26
  backend: IQMBackendBase,
27
27
  validate_moves: MoveGateValidationMode | None = None,
@@ -140,7 +140,7 @@ class IQMJob(JobV1):
140
140
  for s in range(shots)
141
141
  ]
142
142
 
143
- def submit(self):
143
+ def submit(self): # noqa: ANN201
144
144
  raise NotImplementedError(
145
145
  "You should never have to submit jobs by calling this method. When running circuits through "
146
146
  "RemoteIQMBackend, the submission will happen under the hood. The job instance that you get is only for "
@@ -101,7 +101,7 @@ class IQMMoveLayout(TrivialLayout):
101
101
  return False
102
102
  return True
103
103
 
104
- def run(self, dag: DAGCircuit):
104
+ def run(self, dag: DAGCircuit): # noqa: ANN201
105
105
  """Creates a valid layout for the given quantum circuit.
106
106
 
107
107
  Args:
@@ -194,7 +194,7 @@ class IQMMoveLayout(TrivialLayout):
194
194
  resonators: set[int] = set()
195
195
  qubit_to_idx: dict[Qubit, int] = {qubit: log_idx for log_idx, qubit in enumerate(dag.qubits)}
196
196
 
197
- def _require_qubit_type(qubit: Qubit, required_type: str):
197
+ def _require_qubit_type(qubit: Qubit, required_type: str): # noqa: ANN202
198
198
  """Add a requirement for the given qubit."""
199
199
  log_idx = qubit_to_idx[qubit]
200
200
  if log_idx in resonators:
@@ -204,7 +204,7 @@ class IQMMoveLayout(TrivialLayout):
204
204
  )
205
205
  reqs.setdefault(log_idx, set()).add(required_type)
206
206
 
207
- def _require_resonator(qubit: Qubit):
207
+ def _require_resonator(qubit: Qubit): # noqa: ANN202
208
208
  """Add a requirement for the given resonator."""
209
209
  log_idx = qubit_to_idx[qubit]
210
210
  if log_idx in reqs:
@@ -55,8 +55,9 @@ class IQMBackend(IQMBackendBase):
55
55
  calibration_set_id: ID of the calibration set the backend will use.
56
56
  ``None`` means the IQM server will be queried for the current default
57
57
  calibration set.
58
- use_metrics: Iff True, the backend will query the server for calibration data and related
59
- quality metrics, and pass these to the transpilation target(s).
58
+ use_metrics: If True, the backend will query the server for calibration data and related
59
+ quality metrics, and pass these to the transpilation target(s). The default value is set
60
+ to False until quality metrics become available on the Resonance API.
60
61
  kwargs: Optional arguments to be passed to the parent Backend initializer.
61
62
 
62
63
  """
@@ -66,7 +67,7 @@ class IQMBackend(IQMBackendBase):
66
67
  client: IQMClient,
67
68
  *,
68
69
  calibration_set_id: str | UUID | None = None,
69
- use_metrics: bool = True,
70
+ use_metrics: bool = False,
70
71
  **kwargs,
71
72
  ):
72
73
  if calibration_set_id is not None and not isinstance(calibration_set_id, UUID):
@@ -373,7 +374,7 @@ class IQMProvider:
373
374
  name: str | None = None,
374
375
  calibration_set_id: UUID | None = None,
375
376
  *,
376
- use_metrics: bool = True,
377
+ use_metrics: bool = False,
377
378
  ) -> IQMBackend:
378
379
  """IQMBackend instance associated with this provider.
379
380
 
@@ -382,8 +383,9 @@ class IQMProvider:
382
383
  calibration_set_id: ID of the calibration set to be used with the backend.
383
384
  Affects both the transpilation target and the circuit execution.
384
385
  If None, the server default calibration set will be used.
385
- use_metrics: Iff True, the backend will provide calibration data and related quality metrics
386
- to the transpilation target to improve the transpilation.
386
+ use_metrics: If True, the backend will provide calibration data and related quality metrics
387
+ to the transpilation target to improve the transpilation. The default value is set to False
388
+ until quality metrics become available on the Resonance API.
387
389
 
388
390
  Returns:
389
391
  Backend instance for connecting to a quantum computer.
@@ -93,7 +93,7 @@ class IQMTarget(Target):
93
93
  self.iqm_metrics = metrics
94
94
  self._add_instructions_from_DQA()
95
95
 
96
- def _add_instructions_from_DQA(self):
96
+ def _add_instructions_from_DQA(self): # noqa: ANN202
97
97
  """Initializes the Target with instructions and properties that represent the
98
98
  dynamic quantum architecture :attr:`iqm_dqa`.
99
99
 
@@ -129,7 +129,7 @@ class IQMOptimizeSingleQubitGates(TransformationPass):
129
129
 
130
130
  return dag
131
131
 
132
- def _validate_ops(self, dag: DAGCircuit):
132
+ def _validate_ops(self, dag: DAGCircuit): # noqa: ANN202
133
133
  valid_ops = self._basis + ["measure", "reset", "delay", "barrier"]
134
134
  for node in dag.op_nodes():
135
135
  if node.name not in valid_ops:
@@ -184,7 +184,7 @@ class IQMReplaceGateWithUnitaryPass(TransformationPass):
184
184
  self.gate = gate
185
185
  self.unitary = unitary
186
186
 
187
- def run(self, dag):
187
+ def run(self, dag): # noqa: ANN001, ANN201
188
188
  for node in dag.op_nodes():
189
189
  if node.name == self.gate:
190
190
  dag.substitute_node(node, UnitaryGate(self.unitary))
@@ -53,12 +53,12 @@ class MoveGate(Gate):
53
53
  order ``[qubit, resonator]``, regardless of which component is currently holding the state.
54
54
  """
55
55
 
56
- def __init__(self, label=None):
56
+ def __init__(self, label=None): # noqa: ANN001
57
57
  """Initializes the move gate"""
58
58
  super().__init__("move", 2, [], label=label)
59
59
  self.unitary = qi.Operator(MOVE_GATE_UNITARY)
60
60
 
61
- def _define(self):
61
+ def _define(self): # noqa: ANN202
62
62
  """This function is purposefully not defined so that that the Qiskit transpiler cannot accidentally
63
63
  decompose the MOVE gate into a sequence of other gates, instead it will throw an error.
64
64
  """
@@ -187,8 +187,8 @@ class OnlyRZOptimizationPlugin(IQMSchedulingPlugin):
187
187
 
188
188
  def __init__(
189
189
  self,
190
- drop_final_rz=True,
191
- ignore_barriers=False,
190
+ drop_final_rz=True, # noqa: ANN001
191
+ ignore_barriers=False, # noqa: ANN001
192
192
  ):
193
193
  super().__init__(False, True, drop_final_rz, ignore_barriers, None)
194
194
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-client
3
- Version: 30.0.0
3
+ Version: 30.2.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
+ 30.2.0
@@ -1 +0,0 @@
1
- 30.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
File without changes
File without changes