R utility functions used below.
Convert to wide
If we wish to convert to a true matrix representation, the following function adds all the missing zeros and places the entries at the combined indices \((q,q')\),
30 x 30 matrix of characters:
[,1] [,2] ... [,30]
[1,] -5.9e-05-4.3e-04i 0.0e+00+0.0e+00i ... 0.0e+00+0.0e+00i
[2,] 0.0e+00+0.0e+00i -3.2e-05-3.8e-04i ... 0.0e+00+0.0e+00i
[3,] 0.0e+00+0.0e+00i 0.0e+00+0.0e+00i ... 0.0e+00+0.0e+00i
... ... ... ... ...
[30,] 0.0e+00+0.0e+00i 0.0e+00+0.0e+00i ... -6.4e-09+1.7e-07i