kaira.modulations.BPSKDemodulator

Inheritance diagram of BPSKDemodulator

Inheritance diagram for BPSKDemodulator

class kaira.modulations.BPSKDemodulator(*args, **kwargs)[source]

Bases: BaseDemodulator

Binary Phase-Shift Keying (BPSK) demodulator.

Following standard convention where: - Positive values map to bit 0 - Negative values map to bit 1

Methods

__init__

Initialize the BPSK demodulator.

forward

Demodulate BPSK symbols.

reset_state

Reset any stateful components.

Attributes

bits_per_symbol

Number of bits per symbol.

__init__(*args, **kwargs) None[source]

Initialize the BPSK demodulator.

Parameters:
  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

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

Demodulate BPSK symbols.

Parameters:
  • y – Received tensor of BPSK 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.