Bases: SequenceExpr
Sequence of a program, which includes pulses informations.
Source code in src/bloqade/ir/control/sequence.py
| def __init__(self, pulses: Optional[Dict] = None):
if pulses is None:
self.pulses = {}
return
processed_pulses = {}
for level_coupling, pulse in pulses.items():
if not isinstance(level_coupling, LevelCoupling):
raise TypeError(f"Unexpected type {type(level_coupling)}")
if isinstance(pulse, PulseExpr):
processed_pulses[level_coupling] = pulse
elif isinstance(pulse, dict):
processed_pulses[level_coupling] = Pulse(pulse)
else:
raise TypeError(f"Unexpected type {type(pulse)}")
self.pulses = processed_pulses
|
show
Interactive visualization of the Sequence
Parameters:
Name | Type | Description | Default |
**assignments | | assigning the instance value (literal) to the existing variables in the Sequence | {} |
Source code in src/bloqade/ir/control/sequence.py
| def show(self, **assignments):
"""
Interactive visualization of the Sequence
Args:
**assignments: assigning the instance value (literal) to the
existing variables in the Sequence
"""
display_ir(self, assignments)
|