kaira.modulations.BPSKModulator

Inheritance diagram for BPSKModulator
- class kaira.modulations.BPSKModulator(complex_output: bool = True, *args, **kwargs)[source]
Bases:
BaseModulatorBinary Phase-Shift Keying (BPSK) modulator.
Maps binary inputs (0, 1) to constellation points (1, -1). Following standard convention where: - Bit 0 maps to +1 - Bit 1 maps to -1
Methods
Initialize the BPSK modulator.
Modulate binary inputs to BPSK symbols.
Plot the BPSK constellation diagram.
Reset any stateful components.
Attributes
Number of bits per symbol.
- __init__(complex_output: bool = True, *args, **kwargs) None[source]
Initialize the BPSK modulator.
- Parameters:
complex_output – Whether to output complex values (default: True for consistency with other PSK modulators)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- forward(x: Tensor, *args, **kwargs) Tensor[source]
Modulate binary inputs to BPSK symbols.
- Parameters:
x – Input tensor of bits with shape (…, N)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
Complex tensor of BPSK symbols with shape (…, N)