Utility Functions#

BinarySource([precision, device])

Generates a random binary tensor.

LLRs2SymbolLogits(num_bits_per_symbol[, ...])

Computes logits (i.e., unnormalized log-probabilities) or hard decisions on constellation points from a tensor of log-likelihood ratios (LLRs) on bits.

pam(num_bits_per_symbol[, normalize, precision])

Generates a PAM constellation.

pam_gray(b)

Maps a vector of bits to a PAM constellation point with Gray labeling.

PAM2QAM(num_bits_per_symbol[, hard_in_out, ...])

Transforms PAM symbol indices/logits to QAM symbol indices/logits.

PAMSource([num_bits_per_symbol, ...])

Generates a tensor of random PAM symbols.

qam(num_bits_per_symbol[, normalize, precision])

Generates a QAM constellation.

QAM2PAM(num_bits_per_symbol[, precision, device])

Transforms QAM symbol indices to PAM symbol indices.

QAMSource([num_bits_per_symbol, ...])

Generates a tensor of random QAM symbols.

SymbolInds2Bits(num_bits_per_symbol[, ...])

Transforms symbol indices to their binary representations.

SymbolLogits2LLRs(method, num_bits_per_symbol, *)

Computes log-likelihood ratios (LLRs) or hard-decisions on bits from a tensor of logits (i.e., unnormalized log-probabilities) on constellation points.

SymbolLogits2Moments([constellation_type, ...])

Computes the mean and variance of a constellation from logits (unnormalized log-probabilities) on the constellation points.

SymbolSource([constellation_type, ...])

Generates a tensor of random constellation symbols.