55
66import 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
1112from 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