Waveform
Add
AlignedWaveform
Bases: Waveform
<padded waveform> ::= <waveform> | <waveform> <alignment> <value>
<alignment> ::= 'left aligned' | 'right aligned'
<value> ::= 'left value' | 'right value' | <scalar expr>
Append
Constant
Constant(value: ScalarType, duration: ScalarType)
Bases: Instruction
<constant> ::= 'constant' <scalar expr>
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 .venv/lib/python3.12/site-packages/bloqade/analog/ir/control/waveform.py
323 324 325 326 |
|
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]
<instruction> ::= <linear>
| <constant>
| <poly>
| <python-fn>
Linear
Linear(
start: ScalarType,
stop: ScalarType,
duration: ScalarType,
)
Bases: Instruction
<linear> ::= 'linear' <scalar expr> <scalar expr>
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 .venv/lib/python3.12/site-packages/bloqade/analog/ir/control/waveform.py
274 275 276 277 278 |
|
Negative
Poly
Poly(coeffs: Container[ScalarType], duration: ScalarType)
Bases: Instruction
<poly> ::= <scalar>+
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 .venv/lib/python3.12/site-packages/bloqade/analog/ir/control/waveform.py
362 363 364 365 |
|
PythonFn
Record
Sample
Scale
Scale(scalar, waveform: Waveform)
Bases: Waveform
<scale> ::= <scalar expr> '*' <waveform>
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/control/waveform.py
754 755 756 |
|
Slice
Smooth
Smooth(radius, kernel, waveform)
Bases: Waveform
<smooth> ::= 'smooth' <kernel> <waveform>
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/control/waveform.py
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
|
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
figure(**assignments)
get figure of the plotting the waveform.
Returns:
Name | Type | Description |
---|---|---|
figure |
a bokeh figure |
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/control/waveform.py
96 97 98 99 100 101 102 |
|