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.0.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.0-py3-none-any.whl
(19.7 kB
view details)
File details
Details for the file qec_bb-1.1.0.tar.gz.
File metadata
- Download URL: qec_bb-1.1.0.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 |
dd53bd1a18866ec682c2271681d5a5d65c1b8a94a0db9051056ecf948e8e21cc
|
|
| MD5 |
aef91b344a2d267556660631bc13e46b
|
|
| BLAKE2b-256 |
96cd99b44a45d69b87417734cef961e0d15f7fca73b8f5a1a4a8e3e4f6665b28
|
File details
Details for the file qec_bb-1.1.0-py3-none-any.whl.
File metadata
- Download URL: qec_bb-1.1.0-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 |
1f11f253180d1ee45626ac19097badd253acdb56a9a19ae813dd7e29abac3c28
|
|
| MD5 |
7a04d358eeb4eb2ebc8f8d9eafb03968
|
|
| BLAKE2b-256 |
8a4b3703d248ece90b916ba3cb57e3d10641830867ec130dfc5cf6d0ffa49e5f
|