Skip to content

Pulse

Append

Bases: PulseExpr

<append> ::= <expr>+

Pulse

Pulse(field_pairs)

Bases: PulseExpr

<pulse> ::= (<field name> <field>)+
Source code in src/bloqade/ir/control/pulse.py
def __init__(self, field_pairs):
    fields = dict()
    for k, v in field_pairs.items():
        if isinstance(v, Field):
            fields[k] = v
        elif isinstance(v, dict):
            fields[k] = Field(v)
        else:
            raise TypeError(f"Expected Field or dict, got {type(v)}")
    self.fields = fields

show

show(**assignments)

Interactive visualization of the Pulse

Parameters:

Name Type Description Default
**assignments

assigning the instance value (literal) to the existing variables in the Pulse

{}
Source code in src/bloqade/ir/control/pulse.py
def show(self, **assignments):
    """
    Interactive visualization of the Pulse

    Args:
        **assignments: assigning the instance value (literal) to the
            existing variables in the Pulse

    """
    display_ir(self, assignments)

PulseExpr

<expr> ::= <pulse>
  | <append>
  | <slice>
  | <named>