From 647f5db3a553ac83c1055f4d4b3720526eca17cb Mon Sep 17 00:00:00 2001 From: Olli Tyrkko Date: Mon, 10 Jun 2024 14:59:59 +0300 Subject: [PATCH] Fix imports --- docs/user_guide.rst | 2 +- src/iqm/cirq_iqm/iqm_sampler.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 63e1d4aa..c2c481b1 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -287,7 +287,7 @@ The below table summarises the currently available options: Setting this value to ``0.0`` will disable circuit duration check. The default value ``None`` means the server default value will be used. * - `heralding_mode` - - :py:class:`~iqm_client.iqm_client.HeraldingMode` + - :py:class:`~iqm_client.models.HeraldingMode` - "zeros" - Heralding mode to use during execution. The default value is "none", "zeros" enables heralding. diff --git a/src/iqm/cirq_iqm/iqm_sampler.py b/src/iqm/cirq_iqm/iqm_sampler.py index 1923f9a1..4e2d75eb 100644 --- a/src/iqm/cirq_iqm/iqm_sampler.py +++ b/src/iqm/cirq_iqm/iqm_sampler.py @@ -27,13 +27,12 @@ import cirq import numpy as np -from iqm import iqm_client from iqm.cirq_iqm.devices.iqm_device import IQMDevice, IQMDeviceMetadata from iqm.cirq_iqm.iqm_operation_mapping import map_operation -from iqm.iqm_client import HeraldingMode, IQMClient, JobAbortionError, RunRequest +from iqm.iqm_client import Circuit, HeraldingMode, IQMClient, JobAbortionError, RunRequest -def serialize_circuit(circuit: cirq.Circuit) -> iqm_client.Circuit: +def serialize_circuit(circuit: cirq.Circuit) -> Circuit: """Serializes a quantum circuit into the IQM data transfer format. Args: @@ -43,7 +42,7 @@ def serialize_circuit(circuit: cirq.Circuit) -> iqm_client.Circuit: data transfer object representing the circuit """ instructions = tuple(map(map_operation, circuit.all_operations())) - return iqm_client.Circuit(name='Serialized from Cirq', instructions=instructions) + return Circuit(name='Serialized from Cirq', instructions=instructions) class IQMSampler(cirq.work.Sampler):