Skip to content

Quera

QuEraHardwareRoutine

Bases: RoutineBase

run_async

run_async(
    shots, args=(), name=None, shuffle=False, **kwargs
)

Compile to a RemoteBatch, which contain QuEra backend specific tasks, and run_async through QuEra service.

Parameters:

Name Type Description Default
shots int

number of shots

required
args Tuple

additional arguments

()
name str

custom name of the batch

None
shuffle bool

shuffle the order of jobs

False
Return

RemoteBatch

Source code in src/bloqade/ir/routine/quera.py
@beartype
def run_async(
    self,
    shots: int,
    args: Tuple[LiteralType, ...] = (),
    name: Optional[str] = None,
    shuffle: bool = False,
    **kwargs,
) -> RemoteBatch:
    """
    Compile to a RemoteBatch, which contain
        QuEra backend specific tasks,
        and run_async through QuEra service.

    Args:
        shots (int): number of shots
        args (Tuple): additional arguments
        name (str): custom name of the batch
        shuffle (bool): shuffle the order of jobs

    Return:
        RemoteBatch

    """
    batch = self._compile(shots, args, name)
    batch._submit(shuffle, **kwargs)
    return batch