QAM2PAM#
- class sionna.phy.mapping.QAM2PAM(num_bits_per_symbol: int, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs: Any)[source]#
Bases:
sionna.phy.object.ObjectTransforms QAM symbol indices to PAM symbol indices.
For indices in a QAM constellation, computes the corresponding indices for the two PAM constellations corresponding to the real and imaginary components of the QAM constellation.
- Parameters:
num_bits_per_symbol (int) – Number of bits per QAM constellation symbol, e.g., 4 for QAM16.
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.device (str | None) – Device for tensor operations. If None,
deviceis used.kwargs (Any)
- Inputs:
ind_qam – torch.Tensor, torch.int32. Indices in the QAM constellation.
- Outputs:
ind_pam1 – torch.Tensor, torch.int32. Indices for the first component of the corresponding PAM modulation.
ind_pam2 – torch.Tensor, torch.int32. Indices for the second component of the corresponding PAM modulation.
Examples
import torch from sionna.phy.mapping import QAM2PAM converter = QAM2PAM(4) # 16-QAM ind_qam = torch.tensor([0, 5, 10, 15]) ind_pam1, ind_pam2 = converter(ind_qam) print(ind_pam1, ind_pam2)