exit¶
- guppylang.std.builtins.exit(msg: str, signal: int = 1, *args)[source]¶
Exit, reporting the given message (and signal if given), and immediately exit the program. Subsequent shots may still run.
If the first value after the message is an integer, it is treated as the signal. Therefore, an integer cannot be the first extra input unless a signal is provided. Since extra inputs are meant to be linear values, integers shouldn’t be passed as extra inputs anyway.
Return type is arbitrary, as this function never returns.
On Quantinuum systems only signals in the range 1<=signal<=1000 are supported.
- Args:
message: The message to display. Must be a string literal. signal: An optional integer for distinguishing different failure modes. args: Arbitrary extra inputs, will not affect the message. Only useful for consuming linear values.