comnum.posterior_rates#

comnum.posterior_rates(z, indices, constellation, noise_var, *, px=None)#

Achievable rates of a receiver with its own posterior q(x|z) ∝ e^{-|z - x|²/σ̂²}.

The rate of a decoder that uses the receiver’s beliefs (mismatched decoding), not a genie’s: air = H(X) - E[-log2 q(x|z)] on the unit-energy constellation, without any gain correction, and its bit-wise version with the LLRs of q. Scaling the exponent by s and maximising gives air_opt (per block); calibration = σ̂²/mean|z - x|² is 1 for a calibrated receiver, below 1 for an over-confident one.

Parameters:
  • z (array_like) – the receiver’s output, one sample per symbol.

  • indices (array_like) – the transmitted indices.

  • constellation (Constellation) – the alphabet (normalised inside).

  • noise_var (float) – the noise variance σ̂² the receiver believes in.

  • px (array_like, optional) – prior probabilities of the points; uniform by default.

Returns:

air, air_bmd, air_opt, air_bmd_opt (bits/symbol), scale, scale_bmd (the best scalings) and calibration.

Return type:

dict

Raises:

ValueError – for an invalid parameter or input (the message names it).