Technical Reference
API overview for QECTOR's decoders. The guided entries below cover the most used classes and functions; their signatures and defaults follow the API index at the end of this page, which is generated from the published 1.0.1 package.
BlossomDecoder
Minimum-weight perfect matching (MWPM) decoder via Edmonds' Blossom algorithm. Graphlike inputs only: every qubit may take part in at most two checks. Hypergraph and qLDPC check matrices go to BpOsdDecoder instead.
BlossomDecoder(check_to_qubits, n_qubits=None, edge_weights=None)| Name | Type | Default | Description |
|---|---|---|---|
| check_to_qubits | list[list[int]] | Required | For each check, the indices of the qubits it covers |
| n_qubits | int | None | Number of data qubits |
| edge_weights | - | None | Optional matching weights, one per qubit; set_edge_weights(weights) changes them later |
Types come from the package signature where it is annotated, otherwise from documented usage; "-" means neither states one.
import numpy as np
from qector_decoder_v3 import BlossomDecoder, generate_parity_check_matrix
# Distance-5 repetition code: 5 data qubits, 4 parity checks.
check_to_qubits = [[0, 1], [1, 2], [2, 3], [3, 4]]
H = generate_parity_check_matrix(check_to_qubits, 5)
syndrome = np.array([0, 1, 1, 0], dtype=np.uint8)
decoder = BlossomDecoder(check_to_qubits, n_qubits=5)
correction = np.asarray(decoder.decode(syndrome), dtype=np.uint8)
assert np.array_equal((H @ correction) % 2, syndrome) # H c = s (mod 2)API index
Generated from the published qector-decoder-v3 1.0.1 wheel on 2026-11-06: every public name in qector_decoder_v3, with the signature Python reports and the first paragraph of its docstring. 113 names.
- class
AmbiguityClusterDecoder(check_to_qubits, n_qubits=None, error_rate=0.05, ambig_threshold=0.5, max_cluster_size=12)C1-02: BP + ambiguity-clustered exact decoding for qLDPC codes.
4 public methods
batch_decode(self, syndromes)decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)
- class
AutoDecoder(check_to_qubits, n_qubits=None, config: 'BackendConfig | None' = None)Workload-aware, self-debugging decoder that routes to CUDA / OpenCL / Rayon / CPU / Fallback.
8 public methods
auto_select(checks, n_qubits, batch_size=1)available_backends(self) -> 'list[str]'batch_decode(self, syndromes) -> 'np.ndarray'calibrate(self, sizes=(64, 256, 1024, 4096, 16384), repeats: 'int' = 3, seed: 'int' = 0)decode(self, syndrome) -> 'np.ndarray'diagnostics(self) -> 'dict'reset_backend_health(self) -> 'None'select(self, batch_size: 'int') -> 'str'
- class
AutoRouter(*, priority: 'str' = 'balanced', hardware: 'HardwareLike' = None, error_rate: 'float' = 0.05, code_family: 'Any' = None, use_native_auto: 'bool' = True) -> 'None'Construct, cache, and dispatch the policy-selected decoder for a problem.
2 public methods
decode(self, checks_or_H: 'Any', syndromes: 'Any', **ctx: 'Any') -> 'np.ndarray'explain(self, checks_or_H: 'Any' = None, syndromes: 'Any' = None, **ctx: 'Any') -> 'dict[str, Any]'
- class
BPOSDDecoder(check_to_qubits, n_qubits=None, error_rate=0.1, bp_method=None, osd_order=None)Belief Propagation + Ordered Statistics Decoding.
7 public methods
batch_decode(self, syndromes)bp_decode(self, syndrome, max_iterations=20)decode(self, syndrome)decode_batch_flat(self, flat_syndromes, num_shots, stride=None)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)decode_timed(self, syndrome, max_latency_ms=10.0)
- class
Backend()Backend identifiers & Fallback Tiers.
- class
BackendConfig(rayon_threshold: 'int' = 8, gpu_threshold: 'int' = 4096, allow_gpu: 'bool' = True, prefer: 'str' = 'cuda', force: 'str | None' = None, enable_auto_debug: 'bool' = True) -> NoneTunable thresholds and policy for :class:`AutoDecoder`.
- class
BatchDecoder(check_to_qubits, n_qubits=None)Parallel batch decoder using Rayon (Rust data parallelism).
5 public methods
batch_decode(self, syndromes)decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)parallel_batch_decode(self, syndromes)
- class
BatchedBpDecoder(H: 'Any', *, error_rate: 'float' = 0.05, priors: 'Any' = None, max_iter: 'int' = 30, alpha: 'float' = 1.0, bp_method: 'str' = 'min_sum', prefer_gpu: 'bool' = True) -> 'None'Batched belief-propagation decoder over a fixed GF(2) check matrix ``H``.
1 public methods
decode_batch(self, syndromes: 'Any', *, return_llr: 'bool' = False, early_stop: 'bool' = True) -> 'tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, np.ndarray]'
- class
BeliefMatching(matrices: '_Matrices', max_iter: 'int' = 30, bp_shortcut: 'bool' = False)Belief-propagation + minimum-weight perfect matching decoder.
7 public methods
decode(self, syndrome) -> 'np.ndarray'decode_batch(self, shots) -> 'np.ndarray'decode_correction(self, syndrome) -> 'np.ndarray'decode_observables(self, syndrome) -> 'np.ndarray'from_detector_error_model(dem: 'Any', max_iter: 'int' = 20) -> 'BeliefMatching'from_numpy_h(H, error_rate: 'float' = 0.05, max_iter: 'int' = 20) -> 'BeliefMatching'from_stim_circuit(circuit, max_iter: 'int' = 20) -> 'BeliefMatching'
- class
BenchmarkSuite(check_to_qubits, n_qubits=None, n_samples=10000, seed=42)Production benchmark suite. Wraps Rust-native benchmarking.
2 public methods
run(self)save(self, path, results)
- class
BlossomDecoder(check_to_qubits, n_qubits=None, edge_weights=None)Minimum-Weight Perfect Matching (MWPM) decoder via Edmonds' Blossom algorithm.
6 public methods
batch_decode(self, syndromes)batch_decode_weighted(self, syndromes, weights)decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)set_edge_weights(self, weights)
- class
BpOsdDecoder(H: 'Any', error_rate: 'float' = 0.05, priors: 'Any' = None, max_iter: 'int' = 30, ms_scale: 'float' = 1.0, osd_order: 'int' = 0, bp_method: 'str' = 'sum_product', use_gpu: 'Any' = None, max_latency_ms: 'float | None' = None, damping: 'float' = 0.0, osd_lambda: 'Any' = None)BP + ordered-statistics decoder for general GF(2) check matrices.
4 public methods
batch_decode(self, syndromes) -> 'np.ndarray'decode(self, syndrome) -> 'np.ndarray'decode_correction(self, syndrome) -> 'np.ndarray'decode_observables(self, syndrome, observables_matrix: 'Any' = None) -> 'np.ndarray'
- class
CPUBatchDecoder(check_to_qubits, n_qubits=None)SIMD-friendly CPU batch decoder with pooled buffers and SoA transposition.
3 public methods
batch_decode(self, syndromes)batch_decode_par(self, syndromes)decode(self, syndrome)
- class
CUDABatchDecoder(check_to_qubits, n_qubits=None, edge_weights=None)3 public methods
batch_decode(self, /, syndromes)is_available()reset(self, /)
- class
CUDABpOsdDecoder(check_to_qubits, n_qubits, error_rate)1 public methods
batch_decode(self, /, syndromes)
- class
ColourCodeDecoder(dem: 'Any', max_iter: 'int' = 30, osd_order: 'int' = 0, method: 'str' = 'bposd')Colour-code decoder: BP-OSD over the undecomposed hypergraph DEM.
6 public methods
decode(self, syndrome) -> 'np.ndarray'decode_batch(self, syndromes) -> 'np.ndarray'decode_correction(self, syndrome) -> 'np.ndarray'decode_observables(self, syndrome) -> 'np.ndarray'from_detector_error_model(dem: 'Any', max_iter: 'int' = 30, osd_order: 'int' = 0) -> 'ColourCodeDecoder'from_stim_circuit(circuit: 'Any', max_iter: 'int' = 30, osd_order: 'int' = 0) -> 'ColourCodeDecoder'
- class
DecodeResult(correction: 'np.ndarray', syndrome: 'np.ndarray', n_qubits: 'int', n_checks: 'int', weight: 'float | None' = None, logical_flips: 'np.ndarray | None' = None, decode_seconds: 'float | None' = None, backend: 'str' = 'cpu', fallback: 'bool' = False, fallback_reason: 'str' = '', syndrome_valid: 'bool | None' = None, metadata: 'dict' = <factory>) -> NoneResult of decoding a single syndrome, with diagnostics and metadata.
5 public methods
as_uint8(self) -> 'np.ndarray'explain(self) -> 'str'to_dict(self) -> 'dict'to_json(self, indent: 'int' = 2) -> 'str'verify(self, H: 'np.ndarray') -> 'bool'
- class
DecoderName()String identifiers for the routable decoders.
- class
DecoderPool(check_to_qubits=None, n_qubits=None, decoder_type: 'str' = 'fast_union_find', n_workers: 'int | None' = None, num_threads: 'int | None' = None)Multi-process decoder pool for parallel syndrome decoding.
2 public methods
close(self)decode(self, syndromes) -> 'np.ndarray'
- class
DetectorGraph(check_to_qubits, syndrome, check_positions=None, check_types=None, base_weights=None, n_qubits=None)Detector graph used by the GNN and hybrid decoder paths.
1 public methods
update_syndrome(self, syndrome)
- class
FastUnionFindDecoder(check_to_qubits, n_qubits=None, edge_weights=None)Union-Find with a zero-allocation hot path, reusable buffers and a C ABI.
7 public methods
batch_decode(self, syndromes)decode(self, syndrome)decode_batch_flat(self, flat_syndromes, num_shots, stride=None)decode_batch_into_flat(self, flat_syndromes, num_shots, corrections, stride=None)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)set_edge_weights(self, edge_weights)
- class
GNNBeliefMatcher(check_to_qubits, n_qubits=None, *, gnn=None, hidden_size: 'int' = 32, n_layers: 'int' = 2, train_samples: 'int' = 0, error_rate: 'float' = 0.05, train_epochs: 'int' = 3, seed=None)End-to-end GNN-guided minimum-weight perfect matching decoder.
2 public methods
batch_decode(self, syndromes) -> 'np.ndarray'decode(self, syndrome) -> 'np.ndarray'
- class
GNNPredecoder(node_feat_dim=None, edge_feat_dim=None, hidden_size=16, n_layers=2)Graph Neural Network Pre-Decoder for dynamic edge weight prediction.
6 public methods
forward(self, graph)load_weights(self, path)new_standard(hidden_size=16, n_layers=2)predict_with_node_probs(self, graph)save_weights(self, path)train(self, graphs, targets, n_epochs)
- class
GNNTrainer(check_to_qubits, n_qubits, error_rate=0.1)End-to-end GNN training pipeline with Blossom teacher model.
3 public methods
generate_dataset(self, n_samples)train(self, gnn, n_samples, n_epochs)train_bp(self, gnn, n_samples, n_epochs, max_bp_iter=20)
- class
HardwareProfile(cuda_rust: 'bool' = False, gpu: 'bool' = False) -> NoneResolved view of the GPU capability the policy should assume.
2 public methods
as_dict(self) -> 'dict[str, bool]'detect() -> 'HardwareProfile'
- class
HybridCascadeDecoder(check_to_qubits, n_qubits=None, edge_weights=None, max_accept_weight=None, escalation=None, error_rate=None)Hybrid cascading decoder: Union-Find pre-filter + Blossom/BP-OSD escalation.
6 public methods
batch_decode(self, syndromes)batch_decode_timed(self, syndromes, max_latency_ms=10.0)decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)decode_timed(self, syndrome, max_latency_ms=10.0)
- class
HybridDecoder(check_to_qubits, n_qubits=None, check_positions=None, check_types=None, base_weights=None, gnn_hidden_size=64, gnn_n_layers=3)GNN Pre-Decoder + SparseBlossom hybrid decoder.
12 public methods
batch_decode_hybrid(self, syndromes)batch_decode_standard(self, syndromes)decode(self, syndrome)decode_correction(self, syndrome)decode_heuristic(self, syndrome)decode_hybrid(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)decode_standard(self, syndrome)load_weights(self, path)save_weights(self, path)train(self, n_samples, n_epochs, error_rate=0.1)train_bp(self, n_samples, n_epochs, error_rate=0.1, max_bp_iter=20)
- class
LERBenchmark()Logical Error Rate benchmark suite.
1 public methods
run_all(self)
- class
LookupTableDecoder(check_to_qubits, n_qubits=None)Exact lookup-table decoder with UnionFind fallback.
3 public methods
batch_decode(self, syndromes)build_table(self, max_entries)decode(self, syndrome)
- constant
MAX_WORKERS - class
Matching(H: 'Any' = None, weights: 'Any' = None, faults_matrix: 'Any' = None)Minimum-weight perfect-matching decoder with a PyMatching-style API.
10 public methods
add_boundary_edge(self, node: 'int', fault_ids: 'Any' = None, weight: 'float' = 1.0, **_: 'Any') -> 'None'add_edge(self, node1: 'int', node2: 'int', fault_ids: 'Any' = None, weight: 'float' = 1.0, **_: 'Any') -> 'None'check_matrix(self) -> 'np.ndarray'decode(self, syndrome: 'Sequence[int]') -> 'np.ndarray'decode_batch(self, shots: 'Any') -> 'np.ndarray'decode_to_edges_array(self, syndrome: 'Sequence[int]') -> 'np.ndarray'edges(self) -> 'list[tuple[int | None, int | None, dict]]'from_check_matrix(H: 'Any', weights: 'Any' = None, faults_matrix: 'Any' = None, **_: 'Any') -> 'Matching'from_detector_error_model(dem: 'Any') -> 'Matching'from_stim_dem(dem: 'Any') -> 'Matching'
- class
NativeAutoDecoder(check_to_qubits, n_qubits=None, distance=5, noise_rate=0.01, batch_size=1, is_qldpc=False)3 public methods
batch_decode(self, /, syndromes)batch_decode_strided(self, /, syndromes, stride=None, require_alignment=False)decode(self, /, syndrome)
- class
NeuralPredecoder(n_input, n_output, n_hidden1=None, n_hidden2=None)Lightweight MLP pre-decoder with Xavier initialization and SGD training.
5 public methods
decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)predict(self, syndrome)train(self, syndromes, corrections, n_epochs, learning_rate=0.01)
- class
OpenCLBatchDecoder(*a, **k)OpenCL batch decoder - requires source build with --features opencl.
1 public methods
is_available()
- class
PredecodedDecoder(check_to_qubits, n_qubits=None, backend: 'str' = 'blossom')Local-matching predecoder + exact/fast residual decoder.
2 public methods
batch_decode(self, syndromes) -> 'np.ndarray'decode(self, syndrome) -> 'np.ndarray'
- class
Recommendation(decoder: 'str', reason: 'str', family: 'str', priority: 'str', batch_size: 'int', hardware: 'dict[str, bool]', gpu_batched_bp: 'bool' = False, forced: 'bool' = False, graphlike: 'bool | None' = None, distance: 'int | None' = None, n_qubits: 'int | None' = None) -> NoneA decoder choice plus the reasoning and inputs that produced it.
1 public methods
as_dict(self) -> 'dict[str, Any]'
- class
SlidingWindowDecoder(check_to_qubits, n_qubits=None, window_size=10, decay_factor=0.8, check_types=None, p_data=None, p_meas=None)Sliding-window decoder with exponential decay weighting or fault-tolerant space-time decoding.
6 public methods
decode(self, syndrome=None)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)detector_history(self)flush(self)update(self, round_syndrome)
- class
SpaceTimeDecoder(check_to_qubits, check_types, n_rounds, p_data, p_meas, n_qubits=None)PyO3 wrapper for [`SpaceTimeDecoder`]: fault-tolerant temporal decoding via XOR-of-consecutive-rounds detectors matched on a 3D (space x time) graph, as opposed to [`crate::sliding_window::PySlidingWindowDecoder`] /…
3 public methods
decode_history(self, /)reset(self, /)update(self, /, round_syndrome)
- class
SparseBlossomDecoder(check_to_qubits, n_qubits=None, edge_weights=None)Region-growing Sparse Blossom decoder with RadixHeap.
5 public methods
batch_decode(self, syndromes)decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)decode_with_weights(self, syndrome, weights)
- class
StreamingDecoder(check_to_qubits, n_qubits=None, history_size=10, check_types=None, p_data=None, p_meas=None)Streaming decoder that accumulates syndromes over multiple rounds.
7 public methods
decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)decode_rounds(self, rounds)detector_history(self)flush(self)update(self, round_syndrome)
- class
StreamingResult(corrections: 'np.ndarray', syndromes: 'np.ndarray', telemetry: 'StreamingTelemetry', logical_flips: 'np.ndarray | None' = None) -> NoneOutcome of a full streaming decode.
1 public methods
is_valid(self, H: 'Any', *, prefer_gpu: 'bool' = True) -> 'bool'
- class
StreamingSession(code_or_checks: 'Any', n_qubits: 'int | None' = None, *, window_size: 'int' = 8, decoder: 'Any | None' = None, logicals: 'Any' = None, prefer_gpu: 'bool | None' = None) -> 'None'Incremental multi-round decode with a sliding commit buffer.
6 public methods
committed_corrections(self) -> 'np.ndarray'committed_syndromes(self) -> 'np.ndarray'flush(self) -> 'list[np.ndarray]'push_round(self, syndrome: 'Any') -> 'list[np.ndarray]'reset(self) -> 'None'run(self, syndrome_rounds: 'Any') -> 'StreamingResult'
- class
StreamingTelemetry(rounds: 'int' = 0, windows: 'int' = 0, committed: 'int' = 0, decode_seconds: 'float' = 0.0, per_window_seconds: 'list[float]' = <factory>, gpu: 'dict[str, int]' = <factory>, backend: 'dict[str, Any]' = <factory>, rounds_valid: 'int | None' = None) -> NoneReal, measured counters for a streaming decode run.
2 public methods
as_dict(self) -> 'dict[str, Any]'record_window(self, seconds: 'float', rounds: 'int' = 1) -> 'None'
- class
TwoStageDecoder(check_to_qubits, check_types, n_qubits=None, x_decoder='blossom', z_decoder='blossom')C1-03: Correlated two-stage matching for CSS codes.
4 public methods
batch_decode(self, syndromes)decode(self, syndrome)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)
- class
UnionFindDecoder(check_to_qubits, n_qubits=None, edge_weights=None)Production-ready Union-Find quantum error correction decoder.
7 public methods
batch_decode(self, syndromes)decode(self, syndrome)decode_batch_flat(self, flat_syndromes, num_shots, stride=None)decode_batch_into_flat(self, flat_syndromes, num_shots, corrections, stride=None)decode_correction(self, syndrome)decode_observables(self, syndrome, observables_matrix=None)set_edge_weights(self, edge_weights)
- class
Workbench() -> 'None'Controller for the QECTOR Workbench (load → benchmark → export).
17 public methods
cancel_job(self, job_id: 'str') -> 'str'detect_backends(self) -> 'dict'environment_snapshot(self) -> 'dict'export_csv(self, artifact: 'dict', path: 'str') -> 'str'export_json(self, artifact: 'dict', path: 'str') -> 'str'export_pdf(self, artifact: 'dict', path: 'str') -> 'str'get_job(self, job_id: 'str') -> 'dict'get_license_info(self) -> 'dict'job_artifact(self, job_id: 'str') -> 'dict | None'list_jobs(self) -> 'list[dict]'load_dem(self, source: 'Any') -> 'dict'load_stim(self, source: 'Any') -> 'dict'run_benchmark(self, spec: 'dict', job: 'Job | None' = None) -> 'dict'set_license_key(self, key: 'str') -> 'None'shutdown(self) -> 'None'submit_job(self, spec: 'dict') -> 'str'wait(self, job_id: 'str', timeout: 'float | None' = None) -> 'dict'
- module
backendqector_decoder_v3.backend - Workload-Aware AutoDecoder with Self-Auto-Debug & Multi-Tier Fallback.
- function
batched_bp_decode(H: 'Any', syndromes: 'Any', *, error_rate: 'float' = 0.05, priors: 'Any' = None, max_iter: 'int' = 30, alpha: 'float' = 1.0, bp_method: 'str' = 'min_sum', prefer_gpu: 'bool' = True, early_stop: 'bool' = True, return_llr: 'bool' = False) -> 'tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, np.ndarray]'Decode a stack of syndromes with batched belief propagation.
- module
belief_matchingqector_decoder_v3.belief_matching - belief-propagation + MWPM (belief-matching).
- module
benchmarkingqector_decoder_v3.benchmarking - reproducible, statistically-honest benchmarks.
- module
bp_cupyqector_decoder_v3.bp_cupy - batched, GPU-resident belief propagation.
- module
bposdqector_decoder_v3.bposd - belief propagation + ordered-statistics decoding.
- function
changelog() -> strReturn a human-readable changelog string for the loaded package.
- function
check_to_edges(check_to_qubits)Convert check_to_qubits to edge list.
- function
clear_decoder_cache()Clear the in-memory decoder and decoder pool LRU caches.
- module
codesqector_decoder_v3.codes - Code-family helpers.
- module
colour_codeC1-04: Colour-code decoder.
- function
compute_detector_differences(history)Computes XOR detector differences across consecutive syndrome rounds: detector_t = raw_t ^ raw_{t-1}.
- function
cuda_is_available() - function
decode_mmap(syndrome_path: 'str', output_path: 'str', check_to_qubits, n_qubits: 'int', decoder_type: 'str' = 'cpu_batch', batch_size: 'int' = 65536, n_shots: 'int | None' = None, dtype: '_np.dtype' = dtype('uint8'), verbose: 'bool' = False)Out-of-core batch decoding via memory-mapped arrays.
- function
decode_with_diagnostics(code: 'Any', syndrome: 'Sequence[int]', kind: 'str' = 'blossom', decoder: 'Any' = None, logicals: 'np.ndarray | None' = None) -> 'DecodeResult'Decode one syndrome and return a fully-populated :class:`DecodeResult`.
- function
decode_with_gnn(check_to_qubits, n_qubits, syndrome, **kwargs) -> 'np.ndarray'One-shot GNN-guided MWPM decode (see :class:`GNNBeliefMatcher`).
- module
decoder_cacheqector_decoder_v3.decoder_cache - LRU-decoder cache and factory functions.
- module
decoder_poolqector_decoder_v3.decoder_pool - Multi-process decoder pool.
- module
demqector_decoder_v3.dem - Stim Detector Error Model (DEM) loader.
- function
detect_hardware() -> 'HardwareProfile'Return the live :class:`HardwareProfile` (alias for ``HardwareProfile.detect``).
- function
enforce_distance_cap(distance) -> NoneEnforce that *distance* does not exceed the active tier's cap.
- function
enforce_unlocked() -> NoneHard-gate decode path when no valid license is active (QECTOR_ENFORCE=1).
- function
estimate_distance(check_to_qubits, n_qubits=None)Python wrapper for estimate_distance.
- function
flush_usage(customer_id: 'str | None' = None, api_key: 'str | None' = None) -> dictFlush accumulated decode shots to the Stripe Billing Meter Events API.
- function
from_circuit(circuit, decoder_type='blossom', **kwargs)Build a decoder from a Stim circuit in one call.
- function
generate_biconnected_qldpc_checks(n_qubits, degree)Generate a bipolar / biconnected qLDPC Tanner graph parity check matrix.
- function
generate_parity_check_matrix(check_to_qubits, n_qubits=None)Return the binary parity-check matrix ``H`` for *check_to_qubits*.
- function
generate_repetition_code_checks(distance)Generate a 1D repetition/chain code for testing.
- function
generate_ring_code_checks(distance)Generate a simple 1D ring code for testing.
- function
generate_space_time_surface_code_checks(distance, rounds)Generate 3D space-time surface code checks across multiple rounds.
- function
generate_surface_code_checks(distance)Generate compact periodic (toric) surface-code checks.
- function
generate_toy_code_checks(distance)Generate a toy code (not a proper quantum code) with d*d qubits for backward compatibility.
- function
generate_triangular_color_code_4_8_8_checks(distance)Generate 4.8.8 triangular color code parity check matrix.
- function
get_accumulated_shots() -> intGet total accumulated decode shots.
- function
get_backend() -> 'GpuBackend'Return the cached :class:`GpuBackend` capability snapshot (built once).
- function
get_decoder(checks_tuple: 'tuple[tuple[int, ...]]', n_qubits: 'int', decoder_type: 'str' = 'union_find')Get a decoder, constructing it once and caching for reuse.
- function
get_decoder_pool(checks_tuple: 'tuple[tuple[int, ...]]', n_qubits: 'int', decoder_type: 'str' = 'union_find', n_workers: 'int | None' = None)Get a multi-process :class:`DecoderPool`, constructed once and cached.
- function
get_latency_quantiles()`get_latency_quantiles() -> tuple[float, float, float] | None`
- function
get_license_info() -> dictGet active license info dictionary.
- function
gpu_available() -> 'bool'Return ``True`` iff CuPy is importable **and** a CUDA device is usable.
- module
gpu_backendqector_decoder_v3.gpu_backend - the CuPy GPU backend abstraction.
- function
has_cuda_rust() -> 'bool'Return ``True`` iff the Rust ``CUDABatchDecoder`` reports a usable device.
- function
has_cupy() -> 'bool'Return ``True`` if the ``cupy`` module can be imported.
- module
license - function
opencl_is_available() - module
predecoderqector_decoder_v3.predecoder - a fast, faithful matching predecoder.
- module
pymatchingqector_decoder_v3.pymatching_compat - a PyMatching-compatible ``Matching`` API.
- module
pymatching_compatqector_decoder_v3.pymatching_compat - a PyMatching-compatible ``Matching`` API.
- module
qiskit_pluginQECTOR Qiskit Plugin - optional integration with the Qiskit ecosystem.
- function
recommend(code_family: 'Any' = None, distance: 'int | None' = None, n_qubits: 'int | None' = None, batch_size: 'int' = 1, priority: 'str' = 'balanced', hardware: 'HardwareLike' = None, *, graphlike: 'bool | None' = None) -> 'Recommendation'Return a rich :class:`Recommendation` for a decoding problem.
- function
recommend_decoder(code_family: 'Any' = None, distance: 'int | None' = None, n_qubits: 'int | None' = None, batch_size: 'int' = 1, priority: 'str' = 'balanced', hardware: 'HardwareLike' = None) -> 'str'Return the *name* of the recommended decoder class (see :func:`recommend`).
- function
record_shots(count: int) -> NoneRecord decoding shots into telemetry buffer.
- module
rest_apiMinimal REST API for QECTOR.
- module
resultqector_decoder_v3.result - Rich decode results, diagnostics and debug output.
- module
routingqector_decoder_v3.routing - intelligent decoder router / auto-selection.
- function
run_mcp_server()Python signature: ```python run_mcp_server() ```
- function
set_license_key(key: str) -> NoneSet the global QECTOR license key for tier enforcement.
- function
set_license_key_file(path) -> NoneLoad a license key from *path* and activate it.
- module
sinter_compatqector_decoder_v3.sinter_compat - plug QECTOR into Sinter.
- function
sliding_window_decode(syndrome_rounds: 'Any', code: 'Any' = None, *, check_to_qubits: 'Sequence[Sequence[int]] | None' = None, n_qubits: 'int | None' = None, window_size: 'int' = 8, decoder: 'Any | None' = None, logicals: 'Any' = None, prefer_gpu: 'bool | None' = None) -> 'StreamingResult'Decode a whole multi-round syndrome stream window-by-window.
- function
sparse_blossom_radix_neighbors(decoder, defects, k=8)Return the k-nearest candidate edges (sorted by distance) for `defects`.
- function
start_metrics_server(addr='127.0.0.1:9090')Start the Prometheus metrics HTTP server.
- module
stim_compatStim compatibility layer - Conversion and wrappers for the Stim ecosystem.
- module
streamingqector_decoder_v3.streaming - a higher-level Python streaming / multi-round decode *orchestration* layer.
- module
stripe_integrationQECTOR Decoder v3 - Full Stripe API & Webhook License Fulfillment Integration
- function
verify_license_token(token: 'str', customer_email: 'str' = '') -> 'bool'Verifies the license token signature completely offline using Ed25519.
- module
workbenchqector_decoder_v3.workbench - the QECTOR Workbench application controller.