Qector-decoder is a robust quantum error correction decoding library that seamlessly integrates Python and Rust. With support for over 25 decoder families and compatibility with popular tools like PyMatching and Stim, it provides powerful solutions for quantum computing challenges. This library is ideal for researchers and developers looking to improve quantum error resilience.
QECTOR Decoder v3 is a production-quality library designed for quantum error correction decoding, implemented in both Python and Rust. It supports a wide variety of decoder families, facilitating efficient error correction in quantum computing applications.
For Python environments, installation is straightforward via pip:
pip install qector-decoder-v3
To illustrate its functionality, here is a quick example of how to utilize the Union-Find and Blossom decoder types:
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)
# Using Union-Find Decoder
fast = UnionFindDecoder(check_to_qubits, n_qubits)
print(fast.decode(syndrome))
# Using Blossom Decoder
mwpm = BlossomDecoder(check_to_qubits, n_qubits)
print(mwpm.decode(syndrome))
For scenarios requiring batch decoding, both CPU and GPU options are available:
from qector_decoder_v3 import BatchDecoder, CUDABatchDecoder
checks = [[0, 1], [1, 2], [2, 3], [3, 4]]
syndromes = np.random.randint(0, 2, size=(4096, 4), dtype=np.uint8)
# CPU Batch Decoding
cpu = BatchDecoder(checks, n_qubits=5)
corrections = cpu.parallel_batch_decode(syndromes)
# GPU Batch Decoding
if CUDABatchDecoder.is_available():
gpu = CUDABatchDecoder(checks, n_qubits=5)
corrections = gpu.batch_decode(syndromes)
edge_weights to ensure that the GPU kernels produce reliable outputs for specific applications.The QECTOR Decoder is robust, flexible, and designed to meet the demands of modern quantum error correction applications. With features like advanced batch processing, various decoding options, and automatic fallback mechanisms, it significantly enhances the efficiency of quantum computing error management.
No comments yet.
Sign in to be the first to comment.