Skip to content

bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence

← Module overview

classGurobiDecoderWithConfidencesource

bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence

Bases: GurobiDecoder, ConfidenceDecoder

Gurobi MLE decoder with logical-gap confidence.

class GurobiDecoderWithConfidence

methoddecodesource

bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence.decode

Signature
def decode(detector_bits: npt.NDArray[np.bool_], verbose: bool = False, return_weights: bool = False) -> npt.NDArray[np.bool_] | tuple[npt.NDArray[np.bool_], np.ndarray]

Decode detector bits after validating the detector-shot width.

Parameters

NameTypeDefaultDescription
detector_bitsnpt.NDArray[np.bool_]required
verboseboolFalse
return_weightsboolFalse

Returns

npt.NDArray[np.bool_] | tuple[npt.NDArray[np.bool_], np.ndarray]

source

methoddecode_with_confidencesource

bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence.decode_with_confidence

Signature
def decode_with_confidence(detector_bits: npt.NDArray[np.bool_]) -> tuple[npt.NDArray[np.bool_], np.float64]

Decode a single shot and return the logical-gap confidence.

Parameters

NameTypeDescription
detector_bitsnpt.NDArray[np.bool_]

Returns

tuple[npt.NDArray[np.bool_], np.float64]

source