Waveform
AlignedWaveform ¶
Bases: Waveform
<padded waveform> ::= <waveform> | <waveform> <alignment> <value>
<alignment> ::= 'left aligned' | 'right aligned'
<value> ::= 'left value' | 'right value' | <scalar expr>
Constant ¶
Bases: Instruction
f(t=0:duration) = value
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value | Scalar | the constant value | required |
duration | Scalar | the time span of the constant waveform. | required |
Source code in src/bloqade/analog/ir/control/waveform.py
Instruction ¶
Bases: Waveform
Instruction node in the IR.
- [
<linear>
][bloqade.ir.control.waveform.Linear] - [
<constant>
][bloqade.ir.control.waveform.Constant] - [
<poly>
][bloqade.ir.control.waveform.Poly] - [
<python-fn>
][bloqade.ir.control.waveform.PythonFn]
Linear ¶
Bases: Instruction
f(t=0:duration) = start + (stop-start)/duration * t
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start | Scalar | start value | required |
stop | Scalar | stop value | required |
duration | Scalar | the time span of the linear waveform. | required |
Source code in src/bloqade/analog/ir/control/waveform.py
Poly ¶
Bases: Instruction
f(t=0:duration) = c[0] + c[1]t + c[2]t^2 + ... + c[n-1]t^n-1 + c[n]t^n
Parameters:
Name | Type | Description | Default |
---|---|---|---|
coeffs | Tuple[Scalar] | the coefficients c[] of the polynomial. | required |
duration | Scalar | the time span of the waveform. | required |
Source code in src/bloqade/analog/ir/control/waveform.py
PythonFn ¶
Scale ¶
Slice ¶
Smooth ¶
Bases: Waveform
Source code in src/bloqade/analog/ir/control/waveform.py
Waveform ¶
Bases: HashTrait
, CanonicalizeTrait
Waveform node in the IR.
- [
<instruction>
][bloqade.ir.control.waveform.Instruction] - [
<smooth>
][bloqade.ir.control.waveform.Smooth] - [
<slice>
][bloqade.ir.control.waveform.Slice] - [
<apppend>
][bloqade.ir.control.waveform.Append] - [
<negative>
][bloqade.ir.control.waveform.Negative] - [
<scale>
][bloqade.ir.control.waveform.Scale] - [
<add>
][bloqade.ir.control.waveform.Add] - [
<record>
][bloqade.ir.control.waveform.Record] - [
<sample>
][bloqade.ir.control.waveform.Sample]
<waveform> ::= <instruction>
| <smooth>
| <slice>
| <append>
| <negative>
| <scale>
| <add>
| <record>
| <sample>
figure ¶
get figure of the plotting the waveform.
Returns:
Name | Type | Description |
---|---|---|
figure | a bokeh figure |