kaira.modulations.QPSKDemodulator

Inheritance diagram of QPSKDemodulator

Inheritance diagram for QPSKDemodulator

class kaira.modulations.QPSKDemodulator(normalize: bool = True, *args, **kwargs)[source]

Bases: BaseDemodulator

Quadrature Phase-Shift Keying (QPSK) demodulator.

Demodulates QPSK symbols back to bit pairs following Gray coding convention.

Methods

__init__

Initialize the QPSK demodulator.

forward

Demodulate QPSK symbols.

reset_state

Reset any stateful components.

Attributes

bits_per_symbol

Number of bits per symbol.

__init__(normalize: bool = True, *args, **kwargs) None[source]

Initialize the QPSK demodulator.

Parameters:
  • normalize – If True, assume normalized constellation with unit energy

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

forward(y: Tensor, noise_var: float | Tensor | None = None, *args, **kwargs) Tensor[source]

Demodulate QPSK symbols.

Parameters:
  • y – Received tensor of QPSK symbols

  • noise_var – Noise variance for soft demodulation (optional)

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Returns:

If noise_var is provided, returns LLRs; otherwise, returns hard bit decisions

property bits_per_symbol: int

Number of bits per symbol.

reset_state() None

Reset any stateful components.

For demodulators with memory.