bloqade.analog.ir.control.waveform.PythonFn
← Module overview
class
method
sourcemethod
sourcemethod
sourcemethod
sourcemethod
source
classPythonFn¶source
bloqade.analog.ir.control.waveform.PythonFn
Bases: Instruction
```bnf <python-fn> ::= 'python-fn' <python function def> <scalar expr> ```
class PythonFnAttributes
| Name | Type | Description |
|---|---|---|
fn | Callable | |
duration | Scalar | |
parameters | List[Union[Variable, AssignedVariable]] | |
default_param_values | Dict[str, Decimal] |
methodcreate¶source
bloqade.analog.ir.control.waveform.PythonFn.create
def create(fn: Callable, duration: ScalarType) -> PythonFnParameters
| Name | Type | Description |
|---|---|---|
fn | Callable | |
duration | ScalarType |
Returns
PythonFn
methodeval_decimal¶source
bloqade.analog.ir.control.waveform.PythonFn.eval_decimal
def eval_decimal(clock_s: Decimal, **assignments={}) -> DecimalParameters
| Name | Type | Default | Description |
|---|---|---|---|
clock_s | Decimal | required | |
**assignments | — | {} |
Returns
Decimal
methodprint_node¶source
bloqade.analog.ir.control.waveform.PythonFn.print_node
def print_node()methodchildren¶source
bloqade.analog.ir.control.waveform.PythonFn.children
def children()methodsample¶source
bloqade.analog.ir.control.waveform.PythonFn.sample
Signature
def sample(dt: ScalarType, interpolation: Union[str, Interpolation]) -> SampleParameters
| Name | Type | Description |
|---|---|---|
dt | ScalarType | |
interpolation | Union[str, Interpolation] |
Returns
Sample