iqm-client 29.11.0__tar.gz → 29.13.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.
- {iqm_client-29.11.0 → iqm_client-29.13.0}/CHANGELOG.rst +16 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/PKG-INFO +5 -3
- {iqm_client-29.11.0 → iqm_client-29.13.0}/requirements/cirq.in +4 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/requirements/cirq.txt +3 -1
- iqm_client-29.13.0/requirements/qiskit.in +2 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/requirements/qiskit.txt +2 -2
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/__init__.py +0 -9
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_backend.py +26 -7
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_naive_move_pass.py +20 -4
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_transpilation.py +16 -5
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm_client.egg-info/PKG-INFO +5 -3
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm_client.egg-info/requires.txt +4 -2
- iqm_client-29.13.0/version.txt +1 -0
- iqm_client-29.11.0/requirements/qiskit.in +0 -2
- iqm_client-29.11.0/version.txt +0 -1
- {iqm_client-29.11.0 → iqm_client-29.13.0}/AUTHORS.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/CHANGELOG_cirq-iqm.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/CHANGELOG_cortex-cli.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/CHANGELOG_qiskit-iqm.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/INTEGRATION_GUIDE.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/LICENSE.txt +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/MANIFEST.in +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/README.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docbuild +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/API.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/_static/images/favicon.ico +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/_static/images/logo.png +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/_templates/autosummary-class-template.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/_templates/autosummary-module-template.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/authors.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/changelog.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/conf.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/index.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/integration_guide.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/license.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/readme.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/user_guide_cirq.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/user_guide_cli.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/docs/user_guide_qiskit.rst +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/pyproject.toml +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/requirements/base.in +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/requirements/base.txt +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/requirements/cli.in +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/requirements/cli.txt +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/setup.cfg +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/setup.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/devices/__init__.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/devices/adonis.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/devices/aphrodite.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/devices/apollo.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/devices/iqm_device.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/devices/iqm_device_metadata.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/examples/demo_adonis.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/examples/demo_apollo.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/examples/demo_common.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/examples/demo_iqm_execution.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/examples/usage.ipynb +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/extended_qasm_parser.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/iqm_gates.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/iqm_sampler.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/optimizers.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/py.typed +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/serialize.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/cirq_iqm/transpiler.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/__init__.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/api.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/authentication.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/cli/__init__.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/cli/auth.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/cli/cli.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/cli/models.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/cli/token_manager.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/errors.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/iqm_client.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/models.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/py.typed +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/transpile.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/util.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/iqm_client/validation.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/__init__.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/examples/__init__.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/examples/bell_measure.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/examples/resonance_example.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/examples/transpile_example.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/__init__.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/fake_adonis.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/fake_aphrodite.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/fake_apollo.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/fake_deneb.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/fake_garnet.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_circuit.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_circuit_validation.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_job.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_move_layout.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/iqm_provider.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/move_gate.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/py.typed +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/qiskit_to_iqm.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/transpiler_plugins.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm_client.egg-info/SOURCES.txt +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm_client.egg-info/dependency_links.txt +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm_client.egg-info/entry_points.txt +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm_client.egg-info/top_level.txt +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/test +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/tests/__init__.py +0 -0
- {iqm_client-29.11.0 → iqm_client-29.13.0}/tests/conftest.py +0 -0
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
Version 29.13.0 (2025-08-19)
|
|
6
|
+
============================
|
|
7
|
+
|
|
8
|
+
Bug fixes
|
|
9
|
+
---------
|
|
10
|
+
|
|
11
|
+
- Fix ``iqm-client[cirq]`` installation for all supported Python versions.
|
|
12
|
+
|
|
13
|
+
Version 29.12.0 (2025-08-08)
|
|
14
|
+
============================
|
|
15
|
+
|
|
16
|
+
Features
|
|
17
|
+
--------
|
|
18
|
+
|
|
19
|
+
- Minimal changes needed to support Qiskit version 1.3 and version 1.4. :issue:`SW-944`.
|
|
20
|
+
|
|
5
21
|
Version 29.11.0 (2025-08-07)
|
|
6
22
|
============================
|
|
7
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-client
|
|
3
|
-
Version: 29.
|
|
3
|
+
Version: 29.13.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
|
|
@@ -227,6 +227,8 @@ Requires-Dist: iqm-station-control-client<10,>=9; extra == "cirq"
|
|
|
227
227
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "cirq"
|
|
228
228
|
Requires-Dist: cirq-core[contrib]~=1.2; extra == "cirq"
|
|
229
229
|
Requires-Dist: ply==3.11; extra == "cirq"
|
|
230
|
+
Requires-Dist: llvmlite>=0.44.0; extra == "cirq"
|
|
231
|
+
Requires-Dist: numba>=0.61.0; extra == "cirq"
|
|
230
232
|
Provides-Extra: cli
|
|
231
233
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "cli"
|
|
232
234
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "cli"
|
|
@@ -238,8 +240,8 @@ Requires-Dist: python-daemon>=2.3.0; extra == "cli"
|
|
|
238
240
|
Provides-Extra: qiskit
|
|
239
241
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "qiskit"
|
|
240
242
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "qiskit"
|
|
241
|
-
Requires-Dist: qiskit
|
|
242
|
-
Requires-Dist: qiskit-aer<0.
|
|
243
|
+
Requires-Dist: qiskit<=1.4.2,>=1.0; extra == "qiskit"
|
|
244
|
+
Requires-Dist: qiskit-aer<0.18,>=0.13.1; extra == "qiskit"
|
|
243
245
|
|
|
244
246
|
IQM Client
|
|
245
247
|
###########
|
|
@@ -13,16 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
"""Cirq adapter for IQM's quantum computers."""
|
|
15
15
|
|
|
16
|
-
import warnings
|
|
17
|
-
|
|
18
16
|
from .devices import * # noqa: F403*
|
|
19
17
|
from .extended_qasm_parser import circuit_from_qasm
|
|
20
18
|
from .iqm_gates import * # noqa: F403
|
|
21
19
|
from .transpiler import transpile_insert_moves_into_circuit
|
|
22
|
-
|
|
23
|
-
warnings.warn(
|
|
24
|
-
DeprecationWarning(
|
|
25
|
-
"The cirq-iqm package is deprecated and new versions of Cirq on IQM will be published as part of "
|
|
26
|
-
"iqm-client. Please uninstall cirq-iqm and install iqm-client[cirq] to get the newest version."
|
|
27
|
-
)
|
|
28
|
-
)
|
|
@@ -58,9 +58,11 @@ class IQMBackendBase(BackendV2, ABC):
|
|
|
58
58
|
# qubits, or else transpiling with optimization_level=0 will fail because of lacking resonator indices.
|
|
59
59
|
qb_to_idx = {qb: idx for idx, qb in enumerate(architecture.qubits + architecture.computational_resonators)}
|
|
60
60
|
|
|
61
|
-
self._target = IQMTarget(architecture, qb_to_idx, include_resonators=False)
|
|
61
|
+
self._target = IQMTarget(architecture, component_to_idx=qb_to_idx, include_resonators=False)
|
|
62
62
|
self._fake_target_with_moves = (
|
|
63
|
-
IQMTarget(architecture, qb_to_idx, include_resonators=True)
|
|
63
|
+
IQMTarget(architecture, component_to_idx=qb_to_idx, include_resonators=True)
|
|
64
|
+
if "move" in architecture.gates
|
|
65
|
+
else None
|
|
64
66
|
)
|
|
65
67
|
self._qb_to_idx = qb_to_idx
|
|
66
68
|
self._idx_to_qb = {v: k for k, v in qb_to_idx.items()}
|
|
@@ -135,7 +137,10 @@ class IQMBackendBase(BackendV2, ABC):
|
|
|
135
137
|
return "iqm_default_scheduling"
|
|
136
138
|
|
|
137
139
|
def restrict_to_qubits(
|
|
138
|
-
self,
|
|
140
|
+
self,
|
|
141
|
+
qubits: list[int] | list[str],
|
|
142
|
+
include_resonators: bool = False,
|
|
143
|
+
include_fake_czs: bool = True,
|
|
139
144
|
) -> IQMTarget:
|
|
140
145
|
"""Generated a restricted transpilation target from this backend that only contains the given qubits.
|
|
141
146
|
|
|
@@ -153,7 +158,10 @@ class IQMBackendBase(BackendV2, ABC):
|
|
|
153
158
|
|
|
154
159
|
|
|
155
160
|
def _restrict_dqa_to_qubits(
|
|
156
|
-
architecture: DynamicQuantumArchitecture,
|
|
161
|
+
architecture: DynamicQuantumArchitecture,
|
|
162
|
+
qubits: list[str],
|
|
163
|
+
include_resonators: bool,
|
|
164
|
+
include_fake_czs: bool = True,
|
|
157
165
|
) -> IQMTarget:
|
|
158
166
|
"""Generated a restricted transpilation target from this backend that only contains the given qubits.
|
|
159
167
|
|
|
@@ -170,7 +178,10 @@ def _restrict_dqa_to_qubits(
|
|
|
170
178
|
new_gates = {}
|
|
171
179
|
for gate_name, gate_info in architecture.gates.items():
|
|
172
180
|
new_implementations = {}
|
|
173
|
-
for
|
|
181
|
+
for (
|
|
182
|
+
implementation_name,
|
|
183
|
+
implementation_info,
|
|
184
|
+
) in gate_info.implementations.items():
|
|
174
185
|
new_loci = tuple(locus for locus in implementation_info.loci if all(q in qubits for q in locus))
|
|
175
186
|
if new_loci:
|
|
176
187
|
new_implementations[implementation_name] = GateImplementationInfo(loci=new_loci)
|
|
@@ -186,7 +197,12 @@ def _restrict_dqa_to_qubits(
|
|
|
186
197
|
computational_resonators=[q for q in qubits if q in architecture.computational_resonators],
|
|
187
198
|
gates=new_gates,
|
|
188
199
|
)
|
|
189
|
-
return IQMTarget(
|
|
200
|
+
return IQMTarget(
|
|
201
|
+
new_arch,
|
|
202
|
+
component_to_idx={name: idx for idx, name in enumerate(qubits)},
|
|
203
|
+
include_resonators=include_resonators,
|
|
204
|
+
include_fake_czs=include_fake_czs,
|
|
205
|
+
)
|
|
190
206
|
|
|
191
207
|
|
|
192
208
|
class IQMTarget(Target):
|
|
@@ -322,5 +338,8 @@ class IQMTarget(Target):
|
|
|
322
338
|
"""
|
|
323
339
|
qubits_str = [self.iqm_idx_to_component[q] if isinstance(q, int) else str(q) for q in qubits]
|
|
324
340
|
return _restrict_dqa_to_qubits(
|
|
325
|
-
self.iqm_dqa,
|
|
341
|
+
self.iqm_dqa,
|
|
342
|
+
qubits_str,
|
|
343
|
+
self.iqm_includes_resonators,
|
|
344
|
+
self.iqm_includes_fake_czs,
|
|
326
345
|
)
|
|
@@ -103,7 +103,9 @@ class IQMNaiveResonatorMoving(TransformationPass):
|
|
|
103
103
|
)
|
|
104
104
|
try:
|
|
105
105
|
routed_iqm_circuit = transpile_insert_moves(
|
|
106
|
-
iqm_circuit,
|
|
106
|
+
iqm_circuit,
|
|
107
|
+
self.architecture,
|
|
108
|
+
existing_moves=self.existing_moves_handling,
|
|
107
109
|
)
|
|
108
110
|
routed_circuit = deserialize_instructions(
|
|
109
111
|
list(routed_iqm_circuit.instructions), self.component_to_idx, layout
|
|
@@ -121,7 +123,11 @@ class IQMNaiveResonatorMoving(TransformationPass):
|
|
|
121
123
|
|
|
122
124
|
# Create the new DAG and make sure that the qubits are properly ordered.
|
|
123
125
|
ordered_qubits = [layout.get_physical_bits()[i] for i in range(len(layout.get_physical_bits()))]
|
|
124
|
-
new_dag = circuit_to_dag(
|
|
126
|
+
new_dag = circuit_to_dag(
|
|
127
|
+
routed_circuit,
|
|
128
|
+
qubit_order=ordered_qubits,
|
|
129
|
+
clbit_order=routed_circuit.clbits,
|
|
130
|
+
)
|
|
125
131
|
|
|
126
132
|
# Reinsert the symbolic parameters.
|
|
127
133
|
for node in new_dag.topological_op_nodes():
|
|
@@ -208,6 +214,11 @@ def transpile_to_IQM( # noqa: PLR0913
|
|
|
208
214
|
|
|
209
215
|
Works with both the Crystal and Star architectures.
|
|
210
216
|
|
|
217
|
+
Note: When transpiling a circuit with MOVE gates, you might need to set the `optimization_level` lower.
|
|
218
|
+
If the `optimization_level` is set too high, the transpiler might add single qubit gates onto the resonator,
|
|
219
|
+
which is not supported by the IQM Star architectures. If this in undesired, it is best to have the transpiler
|
|
220
|
+
add the MOVE gates automatically, rather than manually adding them to the circuit.
|
|
221
|
+
|
|
211
222
|
Args:
|
|
212
223
|
circuit: The circuit to be transpiled without MOVE gates.
|
|
213
224
|
backend: The target backend to compile to. Does not require a resonator.
|
|
@@ -233,7 +244,7 @@ def transpile_to_IQM( # noqa: PLR0913
|
|
|
233
244
|
restrict_to_qubits = [backend.qubit_name_to_index(q) if isinstance(q, str) else q for q in restrict_to_qubits]
|
|
234
245
|
|
|
235
246
|
if target is None:
|
|
236
|
-
if circuit.count_ops().get("move", 0) > 0:
|
|
247
|
+
if circuit.count_ops().get("move", 0) > 0 or circuit.num_qubits > backend.num_qubits:
|
|
237
248
|
target = backend.target_with_resonators
|
|
238
249
|
# Create a sensible initial layout if none is provided
|
|
239
250
|
if initial_layout is None:
|
|
@@ -263,5 +274,10 @@ def transpile_to_IQM( # noqa: PLR0913
|
|
|
263
274
|
+ "`ignore_barriers`, and `existing_moves_handling` arguments."
|
|
264
275
|
)
|
|
265
276
|
qiskit_transpiler_kwargs["scheduling_method"] = scheduling_method
|
|
266
|
-
new_circuit = transpile(
|
|
277
|
+
new_circuit = transpile(
|
|
278
|
+
circuit,
|
|
279
|
+
target=target,
|
|
280
|
+
initial_layout=initial_layout,
|
|
281
|
+
**qiskit_transpiler_kwargs,
|
|
282
|
+
)
|
|
267
283
|
return new_circuit
|
|
@@ -22,7 +22,11 @@ from qiskit.circuit.equivalence_library import SessionEquivalenceLibrary
|
|
|
22
22
|
from qiskit.circuit.library import RGate, UnitaryGate
|
|
23
23
|
from qiskit.dagcircuit import DAGCircuit
|
|
24
24
|
from qiskit.transpiler.basepasses import TransformationPass
|
|
25
|
-
from qiskit.transpiler.passes import
|
|
25
|
+
from qiskit.transpiler.passes import (
|
|
26
|
+
BasisTranslator,
|
|
27
|
+
Optimize1qGatesDecomposition,
|
|
28
|
+
RemoveBarriers,
|
|
29
|
+
)
|
|
26
30
|
from qiskit.transpiler.passmanager import PassManager
|
|
27
31
|
|
|
28
32
|
TOLERANCE = 1e-10 # The tolerance for equivalence checking against zero.
|
|
@@ -73,12 +77,16 @@ class IQMOptimizeSingleQubitGates(TransformationPass):
|
|
|
73
77
|
for node in dag.topological_op_nodes():
|
|
74
78
|
if node.name == "u":
|
|
75
79
|
# convert into PRX + RZ
|
|
76
|
-
qubit_index = dag.find_bit(node.qargs[0])
|
|
80
|
+
qubit_index = dag.find_bit(node.qargs[0]).index
|
|
77
81
|
if isinstance(node.op.params[0], float) and math.isclose(node.op.params[0], 0, abs_tol=TOLERANCE):
|
|
78
82
|
dag.remove_op_node(node)
|
|
79
83
|
else:
|
|
80
84
|
dag.substitute_node(
|
|
81
|
-
node,
|
|
85
|
+
node,
|
|
86
|
+
RGate(
|
|
87
|
+
node.op.params[0],
|
|
88
|
+
np.pi / 2 - node.op.params[2] - rz_angles[qubit_index],
|
|
89
|
+
),
|
|
82
90
|
)
|
|
83
91
|
phase = node.op.params[1] + node.op.params[2]
|
|
84
92
|
dag.global_phase += phase / 2
|
|
@@ -89,7 +97,7 @@ class IQMOptimizeSingleQubitGates(TransformationPass):
|
|
|
89
97
|
# are arbitrary so we could set rz_angles to any values here, but zeroing the
|
|
90
98
|
# angles results in fewest changes to the circuit.
|
|
91
99
|
for qubit in node.qargs:
|
|
92
|
-
rz_angles[dag.find_bit(qubit)
|
|
100
|
+
rz_angles[dag.find_bit(qubit).index] = 0
|
|
93
101
|
elif node.name == "barrier":
|
|
94
102
|
# TODO barriers are meant to restrict circuit optimization, so strictly speaking
|
|
95
103
|
# we should output any accumulated ``rz_angles`` here as explicit z rotations (like
|
|
@@ -100,7 +108,10 @@ class IQMOptimizeSingleQubitGates(TransformationPass):
|
|
|
100
108
|
pass
|
|
101
109
|
elif node.name == "move":
|
|
102
110
|
# acts like iSWAP with RZ, moving it to the other component
|
|
103
|
-
qb, res =
|
|
111
|
+
qb, res = (
|
|
112
|
+
dag.find_bit(node.qargs[0]).index,
|
|
113
|
+
dag.find_bit(node.qargs[1]).index,
|
|
114
|
+
)
|
|
104
115
|
rz_angles[res], rz_angles[qb] = rz_angles[qb], rz_angles[res]
|
|
105
116
|
elif node.name in {"cz", "delay"}:
|
|
106
117
|
pass # commutes with RZ gates
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iqm-client
|
|
3
|
-
Version: 29.
|
|
3
|
+
Version: 29.13.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
|
|
@@ -227,6 +227,8 @@ Requires-Dist: iqm-station-control-client<10,>=9; extra == "cirq"
|
|
|
227
227
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "cirq"
|
|
228
228
|
Requires-Dist: cirq-core[contrib]~=1.2; extra == "cirq"
|
|
229
229
|
Requires-Dist: ply==3.11; extra == "cirq"
|
|
230
|
+
Requires-Dist: llvmlite>=0.44.0; extra == "cirq"
|
|
231
|
+
Requires-Dist: numba>=0.61.0; extra == "cirq"
|
|
230
232
|
Provides-Extra: cli
|
|
231
233
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "cli"
|
|
232
234
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "cli"
|
|
@@ -238,8 +240,8 @@ Requires-Dist: python-daemon>=2.3.0; extra == "cli"
|
|
|
238
240
|
Provides-Extra: qiskit
|
|
239
241
|
Requires-Dist: iqm-station-control-client<10,>=9; extra == "qiskit"
|
|
240
242
|
Requires-Dist: iqm-exa-common<27,>=26; extra == "qiskit"
|
|
241
|
-
Requires-Dist: qiskit
|
|
242
|
-
Requires-Dist: qiskit-aer<0.
|
|
243
|
+
Requires-Dist: qiskit<=1.4.2,>=1.0; extra == "qiskit"
|
|
244
|
+
Requires-Dist: qiskit-aer<0.18,>=0.13.1; extra == "qiskit"
|
|
243
245
|
|
|
244
246
|
IQM Client
|
|
245
247
|
###########
|
|
@@ -10,6 +10,8 @@ iqm-station-control-client<10,>=9
|
|
|
10
10
|
iqm-exa-common<27,>=26
|
|
11
11
|
cirq-core[contrib]~=1.2
|
|
12
12
|
ply==3.11
|
|
13
|
+
llvmlite>=0.44.0
|
|
14
|
+
numba>=0.61.0
|
|
13
15
|
|
|
14
16
|
[cli]
|
|
15
17
|
iqm-station-control-client<10,>=9
|
|
@@ -23,5 +25,5 @@ python-daemon>=2.3.0
|
|
|
23
25
|
[qiskit]
|
|
24
26
|
iqm-station-control-client<10,>=9
|
|
25
27
|
iqm-exa-common<27,>=26
|
|
26
|
-
qiskit
|
|
27
|
-
qiskit-aer<0.
|
|
28
|
+
qiskit<=1.4.2,>=1.0
|
|
29
|
+
qiskit-aer<0.18,>=0.13.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
29.13.0
|
iqm_client-29.11.0/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
29.11.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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/fake_aphrodite.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iqm_client-29.11.0 → iqm_client-29.13.0}/src/iqm/qiskit_iqm/fake_backends/iqm_fake_backend.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|