kaira.modulations.OQPSKModulator

Inheritance diagram for OQPSKModulator
- class kaira.modulations.OQPSKModulator(normalize: bool = True, *args, **kwargs)[source]
Bases:
BaseModulatorOffset Quadrature Phase-Shift Keying (OQPSK) modulator.
Similar to QPSK but with a half-symbol delay in the quadrature component, which results in only single-bit transitions and improved spectral properties.
Methods
Initialize the OQPSK modulator.
Modulate bit pairs to OQPSK symbols.
Plot the OQPSK constellation diagram.
Reset internal state (delayed quadrature value).
Attributes
Number of bits per symbol.
- __init__(normalize: bool = True, *args, **kwargs) None[source]
Initialize the OQPSK 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 OQPSK symbols.
- Parameters:
x – Input tensor of bits with shape (…, 2*N)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
Complex tensor of OQPSK symbols with shape (…, N)
Note
For simplicity, this implementation models the offset by applying the delay at the symbol level rather than at the pulse shaping level, which would be done in a real system.