MaybeLeaked

class guppylang.std.qsystem.MaybeLeaked[source]

A class representing a measurement that may have leaked.

This is used to represent the result of measure_leaked, which can either return a boolean measurement result or indicate that the qubit has leaked.

__no_type_check__ = True
discard() None[source]
is_leaked() bool[source]

Check if the measurement indicates a leak.

to_result() Option[bool][source]

Returns the measurement result or nothing if leaked.