kaira.modulations.Pi4QPSKModulator

Inheritance diagram for Pi4QPSKModulator
- class kaira.modulations.Pi4QPSKModulator(gray_coded: bool = True, *args, **kwargs)[source]
Bases:
BaseModulatorΠ/4-QPSK (π/4 shifted QPSK) modulator.
A variant of QPSK where the constellation is rotated by π/4 radians on alternating symbols, providing improved envelope properties.
Methods
Initialize the π/4-QPSK modulator.
Modulate bit pairs to π/4-QPSK symbols or symbols to π/4-QPSK signals.
Plot the π/4-QPSK constellation diagram.
Reset internal state (constellation alternation).
Attributes
Number of bits per symbol.
- __init__(gray_coded: bool = True, *args, **kwargs) None[source]
Initialize the π/4-QPSK modulator.
- Parameters:
gray_coded – Whether to use Gray coding for mapping (default: True)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- forward(x: Tensor, *args, **kwargs) Tensor[source]
Modulate bit pairs to π/4-QPSK symbols or symbols to π/4-QPSK signals.
- Parameters:
x – Input tensor of bits with shape (…, 2*N) or symbols with shape (N,)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
Complex tensor of π/4-QPSK symbols with shape (…, N)