Skip to main content

Source-available Rust/Python QEC R&D platform with PyMatching-compatible validation, belief-matching, BP-OSD/qLDPC workflows, CPU/GPU batch decoding, and artifact-backed benchmark evidence

Project description

QECTOR Decoder v3

Source-available Rust/Python quantum error correction decoding platform.

QECTOR Decoder v3 provides a Python package backed by a native Rust extension for quantum error correction research and validation workflows.

Website: https://www.qector.store
PyPI: https://pypi.org/project/qector-decoder-v3/
DOI: https://doi.org/10.5281/zenodo.20825980
Repository: https://github.com/GuillaumeLessard/qector-decoder
Commercial licensing: https://www.qector.store


Installation

Recommended command:

pip install qector-decoder-v3

Verify the install:

python -c "from qector_decoder_v3 import UnionFindDecoder, BlossomDecoder; print('QECTOR OK')"

Optional extras:

pip install "qector-decoder-v3[stim]"
pip install "qector-decoder-v3[bench]"
pip install "qector-decoder-v3[all]"

Windows note

Use the pip bound to your active standard Python environment. Do not force py -m pip unless you have checked which interpreter the Windows launcher selected.

On some systems, py can select a free-threaded interpreter such as python3.13t.exe. QECTOR v0.5.x publishes standard CPython wheels, not cp313t free-threaded wheels. If pip cannot find a matching wheel, it may fall back to a source build and fail because the public repository does not ship the proprietary Rust core.

Working Windows command:

pip install qector-decoder-v3
python -c "from qector_decoder_v3 import UnionFindDecoder, BlossomDecoder; print('QECTOR OK')"

Check launcher targets with:

py -0p

Supported public wheels

Platform Wheel status
Linux x86_64 Published
Windows x64 Published
macOS arm64 / Apple Silicon Published
macOS Intel x86_64 Not published in v0.5.x public CI
CPython free-threaded builds such as cp313t Not published in v0.5.x

Supported Python classifiers are standard CPython 3.9 to 3.13.


Quick start

import numpy as np
from qector_decoder_v3 import UnionFindDecoder, BlossomDecoder

check_to_qubits = [[0, 1], [1, 2], [2, 3], [3, 4]]
n_qubits = 5
syndrome = np.array([0, 1, 0, 0], dtype=np.uint8)

uf = UnionFindDecoder(check_to_qubits, n_qubits)
print(uf.decode(syndrome))

mwpm = BlossomDecoder(check_to_qubits, n_qubits)
print(mwpm.decode(syndrome))

Batch decoding:

import numpy as np
from qector_decoder_v3 import BatchDecoder

checks = [[0, 1], [1, 2], [2, 3], [3, 4]]
syndromes = np.random.randint(0, 2, size=(4096, 4), dtype=np.uint8)

cpu = BatchDecoder(checks, n_qubits=5)
corrections = cpu.parallel_batch_decode(syndromes)
print(corrections.shape)

API surface

Stim / DEM integration

import stim
from qector_decoder_v3.stim_compat import (
    from_stim_detector_error_model,
    stim_circuit_to_check_matrix,  # identical alias
    to_stim_decoder,
    stim_decoder_from_dem,
)

dem = stim.Circuit.generated(
    "surface_code:rotated_memory_x", distance=5
).detector_error_model(decompose_errors=True)

c2q, nq = from_stim_detector_error_model(dem)
# or equivalently: stim_circuit_to_check_matrix(dem)

decoder = stim_decoder_from_dem(dem)

Sinter integration

import sinter
from qector_decoder_v3.sinter_compat import (
    QectorSinterDecoder,
    QectorDecoderWrapper,   # backward-compat alias for QectorSinterDecoder
    qector_sinter_decoders,
)

samples = sinter.collect(
    num_workers=4,
    tasks=tasks,
    decoders=["qector_belief", "qector_blossom", "qector_unionfind"],
    custom_decoders=qector_sinter_decoders(),
)

CUDA / GPU

from qector_decoder_v3 import CUDABatchDecoder

# Always check availability before constructing
if CUDABatchDecoder.is_available():
    dec = CUDABatchDecoder(check_to_qubits, n_qubits)
    corrections = dec.batch_decode(syndromes)
else:
    print("No CUDA GPU detected — use BatchDecoder for CPU batch decoding")

Independent validation (v0.5.2)

Validated by independent automated test suite (86/87 checks, primary + 5× re-test):

Claim Result
30 decoder × code combinations — 100% syndrome-valid corrections ✅ Confirmed
pymatching_compat bit-identical to PyMatching 2.4.0 ✅ Confirmed
Blossom LER within 0.00% of PyMatching on repetition code d=3–9 ✅ Confirmed
Blossom LER within 1.78% of PyMatching on rotated surface code d=3–7 ✅ Confirmed
CUDA batch 100% CPU-agreeing at all tested batch sizes (GTX 1660 Ti) ✅ Confirmed
CUDA batch 6.9–7.7× faster than CPU batch at 100k shots ✅ Confirmed
d=101 stress decode completes without error ✅ Confirmed
Invalid input rejected with clear ValueError / TypeError ✅ Confirmed

Known limitations

  • Union-Find is ~3× less accurate than MWPM — expected speed/accuracy trade-off.
  • Single-round code-capacity noise does not produce surface-code distance scaling. Use circuit-level Stim DEM with qector_sinter_decoders() for threshold curves.
  • SparseBlossom batch may return different (but valid) corrections than single-shot on degenerate syndromes. Benign matching degeneracy.
  • CUDABatchDecoder raises RuntimeError cleanly when no CUDA GPU is present. Use CUDABatchDecoder.is_available() to check first.

License

Source-available. Commercial use requires written licensing through https://www.qector.store.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qector_decoder_v3-0.5.2-cp313-cp313-win_amd64.whl (511.5 kB view details)

Uploaded CPython 3.13Windows x86-64

qector_decoder_v3-0.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (610.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

qector_decoder_v3-0.5.2-cp313-cp313-macosx_11_0_arm64.whl (539.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

qector_decoder_v3-0.5.2-cp312-cp312-win_amd64.whl (511.2 kB view details)

Uploaded CPython 3.12Windows x86-64

qector_decoder_v3-0.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (610.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

qector_decoder_v3-0.5.2-cp312-cp312-macosx_11_0_arm64.whl (539.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

qector_decoder_v3-0.5.2-cp311-cp311-win_amd64.whl (511.0 kB view details)

Uploaded CPython 3.11Windows x86-64

qector_decoder_v3-0.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (610.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

qector_decoder_v3-0.5.2-cp311-cp311-macosx_11_0_arm64.whl (543.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

qector_decoder_v3-0.5.2-cp310-cp310-win_amd64.whl (511.2 kB view details)

Uploaded CPython 3.10Windows x86-64

qector_decoder_v3-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (610.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

qector_decoder_v3-0.5.2-cp310-cp310-macosx_11_0_arm64.whl (543.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

qector_decoder_v3-0.5.2-cp39-cp39-win_amd64.whl (512.4 kB view details)

Uploaded CPython 3.9Windows x86-64

qector_decoder_v3-0.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (612.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

qector_decoder_v3-0.5.2-cp39-cp39-macosx_11_0_arm64.whl (545.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file qector_decoder_v3-0.5.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7303b409914417c9b941756ee537681d2c2e2c2aa35f3011bdfe5248d2f241a3
MD5 2427dbacade8cce7cf9de0af66d256fe
BLAKE2b-256 0138b99adc9311232d9802184dddded7506b6d3c5365918d544a98f006c5fdc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp313-cp313-win_amd64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ceb8abdf9b12fe66d161d5abd393778ef9c3e32a5c2b5d82f041d0a8e3ff1245
MD5 1e351a74709f9577d50b9380fd6a0c11
BLAKE2b-256 6a90776fded1fb0633f3edd685d66e91d85244e6c6db0f03c611cb1323a8790a

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53dc8b9c03d9393c772108f60721098aab4cd8aaf111aa5d5642eba87cd5152d
MD5 db959e56be7254a46d3cf0f7d4af44f5
BLAKE2b-256 89b0cdb938d17a8db06b0c0926d31bcfddfc3d4fb3bf8793949e95ae96da2eb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 be441dc073328dc215ce257afedae636d39abfa3f921d1c350f89144d9cac043
MD5 a9efd30d77deb41511ae1a2901b4c922
BLAKE2b-256 738a8788cbf0ff38642e8237638b8fe2918c8dec1f8fc819f14727b03d0672ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp312-cp312-win_amd64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 faa66cc096348c6dd916c4d97d277307e6954842fcafd86c88d67a598e98d9d0
MD5 9ff0699b706dbba2ab98c86c71104178
BLAKE2b-256 7801ffe5fa43efdb764c2f7fbb8424fd9135ee11a80f64557b8b484f25cadd4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee144d4168c828c77252f5e4227a6c3a5dc9b7491dd4aacadbe3b9075889a5d4
MD5 7b115907fb1d83b798a5223802ac2b67
BLAKE2b-256 87b27fb0af425418b709ea1158dc0a9050f130016a6fb7986236baaeb5c0dfda

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b8e7ae75629fc063c309e7285803e7ba6382ec38bf11a1d32a721abb064f184a
MD5 2f99f9bb597264e86e43e0e2aa035179
BLAKE2b-256 65f67c502c1d2e7ecda902ca0e7c660b61a41b4f1db008027dd150cca0dcf230

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp311-cp311-win_amd64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 311b326b420132bef2b7d52464a346be3b5543f8598ae79566f024bd573ee4e3
MD5 b9a3cd8681eef89fac65e5fa4efb8f42
BLAKE2b-256 dc9c826647a169b21ef9f8f64604e363facc8911d48dcbb7dc80a13a15d96fbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f9e20bebc6fb94d9bdfadc3d0256410f6e2033de619cd56ea7350989090a4f45
MD5 3014189cb359a43a7f994d68cb7c24d6
BLAKE2b-256 2f095107476179b348543ad4e7091f8b8f329efad8b8d4f78966cd5d2b8647d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e685ff93fb58b9155932f90c402edada05fbdc9e51d32b82f87cea541107f160
MD5 f7f639aa04c6ec69dfe7c3529d0bd9f3
BLAKE2b-256 57a5d44e2b1a3da65c7926169292fb06c149cb9222147b74f5726798a7545f88

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp310-cp310-win_amd64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c55998d8e54c00d0b8752b3e0f824113d8e8e03abfef7072a5707b1e20e6a0cd
MD5 dcd2d6f5dcb224752eedae0ca43c88b3
BLAKE2b-256 b31baaa719103c6a05499e5337df69960b980ce0994e146e742d1ddea05dd758

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3db9f993b95fd00c064ab4ad80da34dba56d432ac6179d920a3443e83fa739d7
MD5 b64a70da4a97923c935fca311f561942
BLAKE2b-256 8dcbf4044470b510197c1584e18472cf99f53cb1369e1a9df204ebcbcaec6b4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 df489ed8c1e6ea4e53be66c4047318cde5457bc5649283e7c7f4df9db1b01318
MD5 e64e0a583a9b9ce2fa183e12749d42df
BLAKE2b-256 4dbcd725d540cf2f6894159158654ea364bfd7204e040c5535212bacdc04426d

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp39-cp39-win_amd64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb48695f0a390a277ec7441cb4ea4a10d6889fa7a06accf7ea13c8926e299e75
MD5 132f92c098aeb58a32b92195b0eedfc6
BLAKE2b-256 e4226b34c05962d1c246f82e293bd1e54c56320e9f422758531328d56c7a07b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qector_decoder_v3-0.5.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qector_decoder_v3-0.5.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ec3fcf4cb48b0b78043fc70a7aa626057f08f6c373395ece98b7814dc01fa6a
MD5 4fb1682f7586548b13e672335f5cae38
BLAKE2b-256 0590a02f7c3b3b90e41945126af6375f612f2b5d015d17011d161f4d4d5a4de2

See more details on using hashes here.

Provenance

The following attestation bundles were made for qector_decoder_v3-0.5.2-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: CI.yml on GuillaumeLessard/qector-decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page