Python-polar-coding
A package for Polar codes simulation.
Installation
pip install python-polar-coding
Example
Here is a simple example of simulation using python_polar_coding.
Binary messages encoded with Polar code, modulated using BPSK, transmitted over channel with AWGN and decoded using Fast SSC algorithm.
from python_polar_coding.channels import SimpleBPSKModulationAWGN
from python_polar_coding.polar_codes import FastSSCPolarCodec
from python_polar_coding.simulation.functions import (
compute_fails,
generate_binary_message,
)
N = 128
K = 64
design_snr = 2.0
messages = 10000
# SNR in [.0, .5, ..., 4.5, 5]
snr_range = [i / 2 for i in range(11)]
codec = FastSSCPolarCodec(N=N, K=K, design_snr=design_snr)
bpsk = SimpleBPSKModulationAWGN(fec_rate=K/N)
result_ber = dict()
result_fer = dict()
for snr in snr_range:
ber = 0
fer = 0
for _ in range(messages):
msg = generate_binary_message(size=K)
encoded = codec.encode(msg)
transmitted = bpsk.transmit(message=encoded, snr_db=snr)
decoded = codec.decode(transmitted)
bit_errors, frame_error = compute_fails(msg, decoded)
ber += bit_errors
fer += frame_error
result_ber[snr] = ber
result_fer[snr] = fer
Current progress
Polar code construction
- Arikan's Bhattacharyya bounds Section V.A
Decoding
Modulation
- BPSK
TODO
Polar code construction
- Arikan’s Monte-Carlo estimation Section V.B
- Trifonov’s Gaussian approximation Section V.D
Decoding
- SC STACK Decoding
- Fast SSC List Decoding
- Generalized Fast SSC LIST Decoding
- CRC-aided decoders
Modulation
- Q-PSK
- 4-QAM
License
Metadata
Release files for python-polar-coding 0.0.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 | Actions |
|---|---|---|---|---|
| python-polar-coding-0.0.1.tar.gz | 33.2 kB | Without provenance | Details for python-polar-coding-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_polar_coding-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for python_polar_coding-0.0.1-py3-none-any.whl |
Total release size: 92.8 kB
Release files / python-polar-coding-0.0.1.tar.gz
| Download URL | python-polar-coding-0.0.1.tar.gz |
|---|---|
| Size | 33.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d94c00d1b5af468176bbe5c71231e283cae5bbc60f1df3306406766a674cccd
|
|
BLAKE2b-256 checksum How to use checksums |
68d3ec04d6e06eb95d431111b9add20c6b707e01f40240033f8788139ba9a6ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
|
Release files / python_polar_coding-0.0.1-py3-none-any.whl
| Download URL | python_polar_coding-0.0.1-py3-none-any.whl |
|---|---|
| Size | 59.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2202156c995d4abf0ff8f2143543e4793ed5039ba2243fea11437afe367e8ad6
|
|
BLAKE2b-256 checksum How to use checksums |
fc62b666c7c702d71db3f373f015c31990e308aa3a5998e4346c22fe83c256fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
|
Security for python-polar-coding 0.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.