All problems
MIMO Capacity
Problem
Compute the capacity in bits per channel use of a 2x2 MIMO channel: C = log2 det(I + (snr / n_t) H H^T) with n_t = 2 transmit antennas. Build M = H H^T, set g = snr / 2, form the 2x2 matrix with entries (1 + g * M00), (g * M01), (g * M01), (1 + g * M11), and return the base-2 log of its determinant.
Hint
An identity channel diagonalizes the determinant into two independent paths.
Test cases
case 1
in: [[[1,0],[0,1]],2]
expected: 2
case 2
in: [[[1,0],[0,1]],0]
expected: 0
case 3
in: [[[1,0.5],[0.5,1]],10]
expected: 4.7846348455575205
case 4
in: [[[1,1],[1,1]],4]
expected: 3.169925001442312
Starter codePython
import math
def mimo_capacity(h, snr):
# Your code here
pass4 test cases · run your code against them in the editor