verify_gm_pcm#
- sionna.phy.fec.utils.verify_gm_pcm(gm: numpy.ndarray, pcm: numpy.ndarray) bool[source]#
Verifies that the generator matrix and parity-check matrix are orthogonal in GF(2).
For a valid code with an all-zero syndrome, the following condition must hold:
\[\mathbf{H} \mathbf{c}^T = \mathbf{H} * (\mathbf{u} * \mathbf{G})^T = \mathbf{H} * \mathbf{G}^T * \mathbf{u}^T = \mathbf{0},\]where \(\mathbf{c}\) represents an arbitrary codeword and \(\mathbf{u}\) the corresponding information bits.
Since \(\mathbf{u}\) can be arbitrary, this leads to the condition:
\[\mathbf{H} * \mathbf{G}^T = \mathbf{0}.\]- Parameters:
gm (numpy.ndarray) – Binary generator matrix of shape [k, n].
pcm (numpy.ndarray) – Binary parity-check matrix of shape [n - k, n].
- Outputs:
is_valid – True if
gmandpcmdefine a valid pair of orthogonal parity-check and generator matrices in GF(2).