Skip to content

Base

Routine

Bases: RoutineBase

Result of parsing a completed Builder string.

RoutineShow

Bases: Show

show

show(*args, batch_index=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 src/bloqade/ir/routine/base.py
def show(self: "RoutineBase", *args, batch_index: int = 0):
    """Show an interactive plot of the routine.

    batch_index: 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.

    """
    if self.source is None:
        raise ValueError("Cannot show a routine without a source Builder.")

    return self.source.show(*args, batch_id=batch_index)