QEC Bivariate Bicycle Codes
A Python package for quantum error correction using bivariate bicycle codes.
Installation
pip install bbqec
Usage
Basic Usage Example
from bbqec 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 bbqec import BBCodeOptimised
from bbqec.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, usage examples, and more information about the API:
- Visit the GitHub repository.
- Check out the Usage Guide (src/usage.md).
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
Metadata
Release files for bbqec 1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bbqec-1.4.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bbqec-1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.2 kB
Release files / bbqec-1.4.tar.gz
| Download URL | bbqec-1.4.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6cc085470bf6f90c7a6d87f45e7e5526cdc0a903bd404939e07b67c78b92159
|
|
BLAKE2b-256 checksum How to use checksums |
9d8ea98b152547c39b29d88c5f89cd91cb4c9928dbf1f786b71b5014cd9fa912
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / bbqec-1.4-py3-none-any.whl
| Download URL | bbqec-1.4-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4122dd9c925e62c1719bcd50ce1de580812498387e83e3e2e0f2bc459abbc5d1
|
|
BLAKE2b-256 checksum How to use checksums |
00a8261c3e0b6738c1e3a20a650c70a21c9df925c83253d3deb346fe935020b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|