I have the following state
$L=a \sum_{n,m} \left| 0 n m\right>+b \sum_{n,m} \left| 1 (n+1) (m+1)\right>$
lets suppose n,m = 0,1 also $\left| 0 \right> = (1,0)$ and $\left| 1 \right> = (0,1)$ (column vectors)
also $\left| m\right> $ and $\left| m\right> $ are n-dimension Unit column vectors.
I wanted to create the nxn matrix based on state L. but the result is wrong. in fact 16 elements should be nonzero and the rest should be zero. this is my code