kaira.modulations.QPSKModulator

Inheritance diagram for QPSKModulator
- class kaira.modulations.QPSKModulator(normalize: bool = True, *args, **kwargs)[source]
Bases:
BaseModulatorQuadrature Phase-Shift Keying (QPSK) modulator.
Maps pairs of bits to complex constellation points in QPSK modulation. Following standard Gray-coded QPSK convention where: - 00 maps to (1+j)/√2 (first quadrant) - 01 maps to (1-j)/√2 (fourth quadrant) - 10 maps to (-1+j)/√2 (second quadrant) - 11 maps to (-1-j)/√2 (third quadrant)
Methods
Initialize the QPSK modulator.
Modulate bit pairs to QPSK symbols.
Plot the QPSK constellation diagram.
Reset any stateful components.
Attributes
Number of bits per symbol.
- __init__(normalize: bool = True, *args, **kwargs) None[source]
Initialize the QPSK modulator.
- Parameters:
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 pairs to QPSK symbols.
- Parameters:
x – Input tensor of bits with shape (…, 2*N)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
Complex tensor of QPSK symbols with shape (…, N)