calculator
¤
Functions:
| Name | Description |
|---|---|
calculate |
preprocess each command such as predistortion and sampling |
sample |
sample waveforms needed to be shown in the |
calculate(step: str, target: str, cmd: dict, canvas: dict = {}) -> tuple
¤
preprocess each command such as predistortion and sampling
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step
|
str
|
step name, e.g., main/step1/... |
required |
target
|
str
|
hardware channel like AWG.CH1.Offset |
required |
cmd
|
dict
|
command like {'ctype': ctype, 'value': value, 'unit': unit, 'cargs': cargs}, where ctype must be one of WRITE/READ/WAIT. |
required |
canvas
|
dict
|
|
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple
|
(preprocessed result, sampled waveform to be shown in the |
Example
1 | |
Source code in quark/runtime/calculator.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
sample(pulse, delay: float = 0.0, offset: float = 0.0, srate: float = 1000000000.0, **kwds) -> dict
¤
sample waveforms needed to be shown in the QuarkCanvas
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pulse
|
Pulse
|
waveform to be sampled |
required |
delay
|
float
|
time delay for the channel. Defaults to 0.0. |
0.0
|
offset
|
float
|
offset added to the channel. Defaults to 0.0. |
0.0
|
srate
|
float
|
sample rate of the channel. Defaults to 1e9. |
1000000000.0
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
description |
Source code in quark/runtime/calculator.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |