Base
Routine
Bases: RoutineBase
Result of parsing a completed Builder string.
RoutineParse
Bases: Parse
parse
parse() -> Routine
Parse the program to return a Routine object.
Returns:
Name | Type | Description |
---|---|---|
Routine |
Routine
|
The parsed routine object. |
Raises:
Type | Description |
---|---|
ValueError
|
If the routine cannot be parsed. |
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/routine/base.py
29 30 31 32 |
|
parse_circuit
parse_circuit() -> AnalogCircuit
Parse the analog circuit from the program.
Returns:
Name | Type | Description |
---|---|---|
AnalogCircuit |
AnalogCircuit
|
The parsed analog circuit. |
Raises:
Type | Description |
---|---|
ValueError
|
If the circuit cannot be parsed. |
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/routine/base.py
26 27 |
|
parse_register
parse_register() -> (
Union[AtomArrangement, ParallelRegister]
)
Parse the arrangement of atoms in the program.
Returns:
Type | Description |
---|---|
Union[AtomArrangement, ParallelRegister]
|
Union[AtomArrangement, ParallelRegister]: The parsed atom arrangement or parallel register. |
Raises:
Type | Description |
---|---|
ValueError
|
If the register cannot be parsed. |
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/routine/base.py
20 21 |
|
parse_sequence
parse_sequence() -> Sequence
Parse the pulse sequence part of the program.
Returns:
Name | Type | Description |
---|---|---|
Sequence |
Sequence
|
The parsed pulse sequence. |
Raises:
Type | Description |
---|---|
ValueError
|
If the sequence cannot be parsed. |
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/routine/base.py
23 24 |
|
RoutineShow
Bases: Show
show
show(*args, batch_index: int = 0)
Show an interactive plot of the routine.
int
which parameter set out of the batch to use. Default is 0. If there are no batch parameters, use 0.
*args: Any
Specify the parameters that are defined in the .args([...])
build step.
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/ir/routine/base.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|