Skip to content

Commit 7d7ecae

Browse files
committed
Fix imports
1 parent cf49fbd commit 7d7ecae

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

qupulse/program/measurement.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55

66
import numpy
77

8-
from qupulse.utils.types import TimeType
9-
from qupulse.program import (ProgramBuilder, Program, HardwareVoltage, HardwareTime,
10-
MeasurementWindow, Waveform, RepetitionCount, SimpleExpression)
8+
from qupulse.utils.types import TimeType, MeasurementWindow
9+
from qupulse.program.protocol import ProgramBuilder, Program
10+
from qupulse.program.values import RepetitionCount, HardwareTime, HardwareVoltage, DynamicLinearValue, TimeType
11+
from qupulse.program.waveforms import Waveform
1112
from qupulse.parameter_scope import Scope
1213

1314

@@ -103,7 +104,7 @@ def inner_scope(self, scope: Scope) -> Scope:
103104
process."""
104105
if self._ranges:
105106
name, rng = self._ranges[-1]
106-
return scope.overwrite({name: SimpleExpression(base=rng.start, offsets={name: rng.step})})
107+
return scope.overwrite({name: DynamicLinearValue(base=rng.start, offsets={name: rng.step})})
107108
else:
108109
return scope
109110

@@ -188,7 +189,7 @@ def _reversed_commands(cmds: Sequence[Command]) -> Sequence[Command]:
188189
reversed_cmds.append(jump)
189190

190191
elif isinstance(cmd, Measure):
191-
if isinstance(cmd.delay, SimpleExpression) or isinstance(cmd.delay, SimpleExpression):
192+
if isinstance(cmd.delay, DynamicLinearValue) or isinstance(cmd.delay, DynamicLinearValue):
192193
raise NotImplementedError("TODO")
193194
reversed_cmds.append(Measure(meas_id=cmd.meas_id,
194195
delay=-(cmd.delay + cmd.length),
@@ -211,7 +212,7 @@ def __init__(self, callback: Callable[[str, float, float], None]):
211212
self._callback = callback
212213

213214
def _eval_hardware_time(self, t: HardwareTime):
214-
if isinstance(t, SimpleExpression):
215+
if isinstance(t, DynamicLinearValue):
215216
value = t.base
216217
for (factor_name, factor_val) in t.offsets.items():
217218
count = self._counts[self._memory[factor_name]]

0 commit comments

Comments
 (0)