Skip to content

Commit

Permalink
Merge pull request oqc-community#122 from oqc-community/bugfix/ker/li…
Browse files Browse the repository at this point in the history
…vehardwaremodel_settings

Allow configuration of LiveHardwareModel on initistion.
  • Loading branch information
keriksson-rosenqvist authored Jun 27, 2024
2 parents 033d266 + 7b48173 commit 284446e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/QAT/qat/purr/backends/live.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Oxford Quantum Circuits Ltd
from typing import Dict, List
from typing import Dict, List, Optional

import numpy as np
from qat.purr.backends.live_devices import (
Expand All @@ -15,7 +15,7 @@
ChannelType
from qat.purr.compiler.emitter import QatFile
from qat.purr.compiler.execution import QuantumExecutionEngine, SweepIterator
from qat.purr.compiler.hardware_models import QuantumHardwareModel
from qat.purr.compiler.hardware_models import ErrorMitigation, QuantumHardwareModel
from qat.purr.compiler.instructions import (
Acquire,
AcquireMode,
Expand Down Expand Up @@ -135,9 +135,18 @@ class LiveHardwareModel(QuantumHardwareModel):
def __init__(
self,
control_hardware: ControlHardware = None,
shot_limit=10000,
acquire_mode=None,
repeat_count=1000,
repetition_period=100e-6,
error_mitigation: Optional[ErrorMitigation] = None,
):
super().__init__(
acquire_mode=AcquireMode.INTEGRATOR,
shot_limit=shot_limit,
acquire_mode=acquire_mode or AcquireMode.INTEGRATOR,
repeat_count=repeat_count,
repetition_period=repetition_period,
error_mitigation=error_mitigation,
)
self.control_hardware: ControlHardware = control_hardware
self.instruments: Dict[str, Instrument] = {}
Expand Down

0 comments on commit 284446e

Please sign in to comment.