Skip to main content

CommKit

High-performance digital communications research kit for Python.

Python 3.12+ Backends License CUDA


CommKit is a Python library for digital communications research that treats hardware as a first-class concern. A single Signal object carries IQ samples, physical metadata, and modulation context - with DSP operations dispatching automatically to NumPy, CuPy, or JAX based on data location.


Why CommKit?

  • One object, complete context: Sampling rate, symbol rate, modulation format, and pulse shape travel with the signal through the processing pipeline.
  • Backend-transparent DSP: dispatch() resolves NumPy, CuPy, or SciPy modules at runtime. The same code executes seamlessly on CPU or GPU.
  • Functional pipelines: DSP functions accept and return a Signal directly (sig = fir_filter(sig, taps); sig = resample(sig, sps_out=2)), so pipelines compose without a monolithic Signal wrapper API - sig.to("gpu") moves data across backends, the rest is plain function composition.
  • JAX escape hatch: Zero-copy DLPack export on GPU allows direct application of JAX transforms (gradients, vmap, scan) without leaving the research loop.

Modules & Features

Module Key Capabilities & Features
commkit.core Signal container (IQ samples + metadata), SingleCarrierFrame, Preamble, and symbol/frame factories (PAM, PSK, QAM, PS-QAM).
commkit.backend Hardware abstraction layer (dispatch, to_device, to_jax, from_jax), placement management, and backend execution (NumPy, CuPy, JAX).
commkit.mapping Gray-coded constellations, symbol mapping, hard demapping, soft LLR computation (max-log and exact log-sum-exp via JAX JIT), and probabilistic shaping (Maxwell-Boltzmann).
commkit.filtering Pulse shaping (RRC, RC, Gaussian, Smooth-Rectangle), FIR tap generators, IIR SOS filter design (Butterworth, Chebyshev I/II, elliptic, Bessel) and application, matched filtering, and Overlap-Save.
commkit.multirate Fractional and integer sample rate conversion (resample, decimate, upsample, decimate_to_symbol_rate).
commkit.timing Preamble generation (Barker, Zadoff-Chu), cross-correlation timing delay estimation, and frame alignment.
commkit.frequency Carrier frequency offset estimation (FOE via M-th power, Mengali-Morelli, pilot-symbol, bias-tone) and static/blockwise time-varying FOE correction.
commkit.recovery Carrier phase recovery (CPR via Viterbi-Viterbi, BPS, DD-PLL, MAP Tikhonov-RTS, pilot-symbol/pilot-tone), cycle-slip detection/correction, and phase/channel-permutation ambiguity resolution.
commkit.equalization Sequential (lms, rls, cma, rde) and frequency-domain block (block_lms, block_cma, block_rde) adaptive equalizers, zf_equalizer, butterfly MIMO topology support, and polarization-tone demultiplexing, with Numba JIT and JAX execution backends.
commkit.impairments Channel impairments simulation: AWGN (with SPS correction), PMD (differential group delay, Jones matrix), phase noise, IQ imbalance (application + Löwdin/Gram-Schmidt compensation), and chromatic dispersion.
commkit.coding Planned, not yet implemented - scaffold-only placeholders reserving the layout for channel coding / FEC primitives (BCH, Convolutional, CRC, Galois field arithmetic, Hamming, Interleaving, LDPC, Polar, Rate matching, Reed-Solomon, Turbo codes).
commkit.metrics System performance evaluation: EVM, SNR, BER, SER, and capacity metrics (GMI, MI) with PS-QAM support.
commkit.analysis Laser phase and linewidth characterization: DSH, homodyne IQ, zero-phase drift detrending, AWGN-free lag-slope linewidth fit, Di Domenico $\beta$-separation line FWHM, and Allan deviation.
commkit.spectral Welch PSD estimation, spectrograms, and frequency shifting with bin-quantized mixing.
commkit.smoothing Diagnostic/plotting-only smoothers (moving average, Savitzky-Golay, 2-D density smoothing) - not signal-chain filters; see commkit.filtering for those.
commkit.io Signal persistence and disk serialization (load_npz, save_npz).
commkit.plotting Visualization tools for constellations, eye diagrams, PSDs/spectrograms, time-domain signals, filter responses, equalizer convergence, and sync/CPR diagnostics (timing correlation, FOE spectra, carrier-phase trajectories).
commkit.helpers General DSP helpers: random bit/symbol generators, array normalization, RMS calculation, dB<->linear conversion, and SI prefix formatting.

Installation & Usage

Requires Python 3.12+ and uv.

Core Installation (CPU)

# Using uv (Recommended)
uv pip install commkit

# Or with standard pip
pip install commkit

GPU Support

To install with CUDA acceleration (includes JAX CUDA 13 and CuPy stacks):

# Using uv
uv pip install "commkit[gpu]"

# Or with standard pip
pip install "commkit[gpu]"

Notebook Support

To run the example notebooks and enable the rich HTML Signal.print_info() table (falls back to plain text without it):

# Using uv
uv pip install "commkit[notebook]"

# Or with standard pip
pip install "commkit[notebook]"

Extras can be combined, e.g. commkit[gpu,notebook], or install everything at once with commkit[full].

Development Installation

git clone https://github.com/lokgar/commkit.git
cd commkit

# Sync core environment
uv sync

# Sync environment with all extras (including GPU and notebook packages)
uv sync --all-extras

Examples & Notebooks

For complete usage scripts and DSP examples, explore the examples/ directory.


Running Tests

# CPU test suite
uv run pytest --device=cpu

# GPU test suite (requires CuPy + CUDA)
uv run pytest --device=gpu

# Run all test suites
uv run pytest --device=all

License

This project is licensed under the MIT License.

Metadata

Release files for commkit 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for commkit 1.1.0
File Size Uploaded Provenance
commkit-1.1.0.tar.gz 679.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for commkit 1.1.0
File Interpreter ABI Platform
commkit-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / commkit-1.1.0.tar.gz

Download URL commkit-1.1.0.tar.gz
Size 679.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0c7abbe3cb118bc8e1b2df01fa3c230af7418900f812f2bd048ff95ead0798c2
BLAKE2b-256 checksum
How to use checksums
2c62a07c519a308ef0714f55e5efa2c4b201727f08edc337fe233a4bd4500893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / commkit-1.1.0-py3-none-any.whl

Download URL commkit-1.1.0-py3-none-any.whl
Size 399.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2066cc8fef9d698007276aca9cc3a664bb3c700a9a5aa56c87955420fba6201d
BLAKE2b-256 checksum
How to use checksums
6e68ecedd57aac5518d464c367b9133ac3fdf5293bfadd183542277271c4ff16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Security for commkit 1.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for commkit-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page