Skip to content

bloqade.analog.ir.control.waveform.PythonFn

← Module overview

classPythonFnsource

bloqade.analog.ir.control.waveform.PythonFn

Bases: Instruction

```bnf <python-fn> ::= 'python-fn' <python function def> <scalar expr> ```

class PythonFn

Attributes

NameTypeDescription
fnCallable
durationScalar
parametersList[Union[Variable, AssignedVariable]]
default_param_valuesDict[str, Decimal]

methodcreatesource

bloqade.analog.ir.control.waveform.PythonFn.create

def create(fn: Callable, duration: ScalarType) -> PythonFn

Parameters

NameTypeDescription
fnCallable
durationScalarType

Returns

PythonFn

source

methodeval_decimalsource

bloqade.analog.ir.control.waveform.PythonFn.eval_decimal

def eval_decimal(clock_s: Decimal, **assignments={}) -> Decimal

Parameters

NameTypeDefaultDescription
clock_sDecimalrequired
**assignments—{}

Returns

Decimal

source

methodprint_nodesource

bloqade.analog.ir.control.waveform.PythonFn.print_node

def print_node()
source

methodchildrensource

bloqade.analog.ir.control.waveform.PythonFn.children

def children()
source

methodsamplesource

bloqade.analog.ir.control.waveform.PythonFn.sample

Signature
def sample(dt: ScalarType, interpolation: Union[str, Interpolation]) -> Sample

Parameters

NameTypeDescription
dtScalarType
interpolationUnion[str, Interpolation]

Returns

Sample

source