kaira.modulations.QAMModulator

Inheritance diagram of QAMModulator

Inheritance diagram for QAMModulator

class kaira.modulations.QAMModulator(order: Literal[4, 16, 64, 256], gray_coding: bool = True, normalize: bool = True, *args, **kwargs)[source]

Bases: BaseModulator

Quadrature Amplitude Modulation (QAM) modulator.

Maps groups of bits to constellation points with different amplitudes and phases.

Methods

__init__

Initialize the QAM modulator.

forward

Modulate bit groups to QAM symbols.

plot_constellation

Plot the QAM constellation diagram.

reset_state

Reset any stateful components.

Attributes

bits_per_symbol

Number of bits per symbol.

constellation

bit_patterns

Examples using kaira.modulations.QAMModulator

Nonlinear Channel Distortion Effects

Nonlinear Channel Distortion Effects

Phase Noise Effects on Signal Constellations

Phase Noise Effects on Signal Constellations

Modulation Schemes Comparison

Modulation Schemes Comparison

Higher-Order QAM Modulation

Higher-Order QAM Modulation

Modulation Schemes for Digital Communication Systems

Modulation Schemes for Digital Communication Systems

Quadrature Amplitude Modulation (QAM)

Quadrature Amplitude Modulation (QAM)

Signal and Error Rate Metrics

Signal and Error Rate Metrics

Channel Capacity Analysis with Kaira

Channel Capacity Analysis with Kaira
constellation: Tensor
bit_patterns: Tensor
__init__(order: Literal[4, 16, 64, 256], gray_coding: bool = True, normalize: bool = True, *args, **kwargs) None[source]

Initialize the QAM modulator.

Parameters:
  • order – Modulation order (must be a perfect square and power of 4)

  • gray_coding – Whether to use Gray coding for mapping

  • normalize – If True, normalize constellation to unit energy

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

forward(x: Tensor, *args, **kwargs) Tensor[source]

Modulate bit groups to QAM symbols.

Parameters:
  • x – Input tensor of bits with shape (…, K*N), where K is bits_per_symbol

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Returns:

Complex tensor of QAM symbols with shape (…, N)

plot_constellation(**kwargs) Figure[source]

Plot the QAM constellation diagram.

Parameters:

**kwargs – Additional arguments passed to plot_constellation

Returns:

Matplotlib figure object

property bits_per_symbol: int

Number of bits per symbol.

reset_state() None

Reset any stateful components.

For modulators with memory (like differential schemes).