generate_5g_ranking#

sionna.phy.fec.polar.utils.generate_5g_ranking(k: int, n: int, sort: bool = True) List[numpy.ndarray][source]#

Returns information and frozen bit positions of the 5G Polar code as defined in Tab. 5.3.1.2-1 in [3GPPTS38212] for given values of k and n.

Parameters:
  • k (int) – The number of information bits per codeword.

  • n (int) – The desired codeword length. Must be a power of two.

  • sort (bool) – Indicates if the returned indices are sorted.

Outputs:
  • frozen_pos – Array of ints of shape [n-k] containing the frozen position indices.

  • info_pos – Array of ints of shape [k] containing the information position indices.

Raises:

Examples

from sionna.phy.fec.polar.utils import generate_5g_ranking

frozen_pos, info_pos = generate_5g_ranking(k=100, n=256)
print(f"Frozen positions: {len(frozen_pos)}, Info positions: {len(info_pos)}")
# Frozen positions: 156, Info positions: 100