Skip to content

bloqade.gemini.logical.group.kernel

← Module overview

functionkernelsource

bloqade.gemini.logical.group.kernel

Signature
def kernel(py_func=None, *, verify: Annotated[bool, Doc('run `verify` before running passes, default is `True`')]=True, typeinfer: Annotated[bool, Doc('run type inference and apply the inferred type to IR, default `True`')]=True, fold: Annotated[bool, Doc('run folding passes')]=True, aggressive: Annotated[bool, Doc('run aggressive folding passes if `fold=True`')]=False, inline: Annotated[bool, Doc('inline function calls, default `True`')]=True, aggressive_unroll: Annotated[bool, Doc('Run aggressive inlining and unrolling pass on the IR, default `False`')]=False, no_raise: Annotated[bool, Doc('do not raise exception during analysis')]=True, num_physical_qubits: Annotated[int, Doc('number of physical qubits per logical qubit')]=7)

Compile a function to a Gemini logical kernel.

Decorator callable: use the bare decorator or call it with compilation options. The displayed signature exposes the returned pass options, not the internal factory’s self parameter.

Parameters

NameTypeDefaultDescription
py_func—NonePython function to compile; omit when using the decorator with options.
verifyAnnotated[bool, Doc('run `verify` before running passes, default is `True`')]True
typeinferAnnotated[bool, Doc('run type inference and apply the inferred type to IR, default `True`')]True
foldAnnotated[bool, Doc('run folding passes')]True
aggressiveAnnotated[bool, Doc('run aggressive folding passes if `fold=True`')]False
inlineAnnotated[bool, Doc('inline function calls, default `True`')]True
aggressive_unrollAnnotated[bool, Doc('Run aggressive inlining and unrolling pass on the IR, default `False`')]False
no_raiseAnnotated[bool, Doc('do not raise exception during analysis')]True
num_physical_qubitsAnnotated[int, Doc('number of physical qubits per logical qubit')]7
source