Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ollityrkko committed Jun 10, 2024
1 parent 38eadfd commit 647f5db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 3 additions & 4 deletions src/iqm/cirq_iqm/iqm_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit 647f5db

Please sign in to comment.