A package for quantum error correction with bivariate bicycle codes
Project description
QEC Bivariate Bicycle Codes
A Python package for quantum error correction using bivariate bicycle codes.
Installation
pip install qec-bb
Usage
Basic Usage Example
from qec_bb import BBCode
# Create a new BBCode
l = 8
m = 10
A = ['i', 'x1', 'y7', 'x6.y5']
B = ['x0', 'x5', 'y6.x7', 'x.y5']
code = BBCode(l, m, A, B)
# Find the parameters of the code
# distance_method = 4 uses bposd to calculate the distance (recommended)
n, k, d = code.generate_bb_code(distance_method=4)
print(f"Code parameters: [{n}, {k}, {d}]")
# Get parity-check matrices
H_x, H_z = code.create_parity_check_matrices()
# Create Tanner Graph
G = code.make_graph()
Optimized Version for Multiple Codes
from qec_bb import BBCodeOptimised
from qec_bb.helpers import ProposeParameters
# Set up parameters
l = 10
m = 8
num_codes = 50
# Create an instance of BBCodeOptimised
code = BBCodeOptimised(l, m)
# Help generate random A and B expressions
parameters = ProposeParameters(l, m)
# Generate codes
for _ in range(num_codes):
A = parameters.draw_bivariate_monomials(num_monomials=3)
B = parameters.draw_bivariate_monomials(num_monomials=3)
code.set_expressions(A_expression=A, B_expression=B)
n, k, d = code.find_distance(distance_method=4)
print(f"Code parameters: [{n}, {k}, {d}]")
Documentation
For detailed documentation, please visit our documentation site.
Features
- Create and analyze bivariate bicycle quantum error correction codes
- Multiple distance calculation methods
- Optimized implementations for generating multiple codes
- Tanner graph representation of codes
- Polynomial helpers for working with bivariate polynomials
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qec_bb-1.1.1.tar.gz
(17.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
qec_bb-1.1.1-py3-none-any.whl
(19.7 kB
view details)
File details
Details for the file qec_bb-1.1.1.tar.gz.
File metadata
- Download URL: qec_bb-1.1.1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3606e1e5b33760b18f167b850c9d27680b9d83a2f880399d93710eaa18e800b7
|
|
| MD5 |
f77c4ec35e78c889a976bc57dbd2f385
|
|
| BLAKE2b-256 |
26efd03968ecb4db1af718d6be9aeee2d8b8c4ea52e5089fae161da53e574680
|
File details
Details for the file qec_bb-1.1.1-py3-none-any.whl.
File metadata
- Download URL: qec_bb-1.1.1-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dddfb0b3f2a6a336c03f5337f1c8e3a201a231a93ec02e3eb33f36ba8c43d89
|
|
| MD5 |
64e8f61327651fc2398863f1d6a71994
|
|
| BLAKE2b-256 |
6b0dfce153150c7e5a6594c3c51a3ec1b7ec1175cd68d90e8e6807696c4d6b1c
|