Confidence
Confidence decoder wrappers used by MSD/QET table decoders.
ConfidenceDecoder
Bases: ABC
flowchart TD
bloqade.gemini.decoding.confidence.ConfidenceDecoder[ConfidenceDecoder]
click bloqade.gemini.decoding.confidence.ConfidenceDecoder href "" "bloqade.gemini.decoding.confidence.ConfidenceDecoder"
Decoder interface for a correction plus a scalar confidence score.
decode_with_confidence
abstractmethod
decode_with_confidence(
detector_bits: NDArray[bool_],
) -> tuple[npt.NDArray[np.bool_], np.float64]
Decode one detector syndrome and return a confidence score.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/decoding/confidence.py
84 85 86 87 88 89 | |
GurobiDecoderWithConfidence
GurobiDecoderWithConfidence(*args: Any, **kwargs: Any)
Bases: GurobiDecoder, ConfidenceDecoder
flowchart TD
bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence[GurobiDecoderWithConfidence]
bloqade.gemini.decoding.confidence.GurobiDecoder[GurobiDecoder]
bloqade.gemini.decoding.confidence.ConfidenceDecoder[ConfidenceDecoder]
bloqade.gemini.decoding.confidence.GurobiDecoder --> bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence
bloqade.gemini.decoding.confidence.ConfidenceDecoder --> bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence
click bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence href "" "bloqade.gemini.decoding.confidence.GurobiDecoderWithConfidence"
click bloqade.gemini.decoding.confidence.GurobiDecoder href "" "bloqade.gemini.decoding.confidence.GurobiDecoder"
click bloqade.gemini.decoding.confidence.ConfidenceDecoder href "" "bloqade.gemini.decoding.confidence.ConfidenceDecoder"
Gurobi MLE decoder with logical-gap confidence.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/decoding/confidence.py
32 33 | |
decode
decode(
detector_bits: NDArray[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.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/decoding/confidence.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
decode_with_confidence
decode_with_confidence(
detector_bits: NDArray[bool_],
) -> tuple[npt.NDArray[np.bool_], np.float64]
Decode a single shot and return the logical-gap confidence.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/decoding/confidence.py
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |