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
Metadata
Release files for qec-bb 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qec_bb-1.1.1.tar.gz | 17.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qec_bb-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.1 kB
Release files / qec_bb-1.1.1.tar.gz
| Download URL | qec_bb-1.1.1.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3606e1e5b33760b18f167b850c9d27680b9d83a2f880399d93710eaa18e800b7
|
|
BLAKE2b-256 checksum How to use checksums |
26efd03968ecb4db1af718d6be9aeee2d8b8c4ea52e5089fae161da53e574680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / qec_bb-1.1.1-py3-none-any.whl
| Download URL | qec_bb-1.1.1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5dddfb0b3f2a6a336c03f5337f1c8e3a201a231a93ec02e3eb33f36ba8c43d89
|
|
BLAKE2b-256 checksum How to use checksums |
6b0dfce153150c7e5a6594c3c51a3ec1b7ec1175cd68d90e8e6807696c4d6b1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for qec-bb 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.