bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence
← Module overview
class
method
sourcemethod
source
classGurobiDecoderWithConfidence¶source
bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence
Bases: GurobiDecoder, ConfidenceDecoder
Gurobi MLE decoder with logical-gap confidence.
class GurobiDecoderWithConfidencemethoddecode¶source
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
| Name | Type | Default | Description |
|---|---|---|---|
detector_bits | npt.NDArray[np.bool_] | required | |
verbose | bool | False | |
return_weights | bool | False |
Returns
npt.NDArray[np.bool_] | tuple[npt.NDArray[np.bool_], np.ndarray]
methoddecode_with_confidence¶source
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
| Name | Type | Description |
|---|---|---|
detector_bits | npt.NDArray[np.bool_] |
Returns
tuple[npt.NDArray[np.bool_], np.float64]