real2complex_matrix#

sionna.phy.mimo.real2complex_matrix(z: torch.Tensor) torch.Tensor[source]#

Transforms a real-valued matrix into its complex-valued equivalent.

Transforms the last two dimensions of a real-valued tensor into their complex-valued matrix equivalent representation.

For a matrix \(\tilde{\mathbf{Z}}\in \mathbb{R}^{2M\times 2K}\), satisfying

\[\begin{split}\tilde{\mathbf{Z}} = \begin{pmatrix} \mathbf{X} & -\mathbf{Y}\\ \mathbf{Y} & \mathbf{X} \end{pmatrix}\end{split}\]

with \(\mathbf{X}\in \mathbb{R}^{M\times K}\) and \(\mathbf{Y}\in \mathbb{R}^{M\times K}\), this function returns the matrix \(\mathbf{Z}=\mathbf{X}+j\mathbf{Y}\in\mathbb{C}^{M\times K}\).

Parameters:

z (torch.Tensor) – […, 2M, 2K], torch.float. Real-valued input matrix.

Outputs:

z_complex – […, M, K], torch.complex. Complex-valued equivalent matrix.

Examples

zr = torch.tensor([[1., 1., -2., -2.],
                   [1., 1., -2., -2.],
                   [2., 2., 1., 1.],
                   [2., 2., 1., 1.]])
zc = real2complex_matrix(zr)
# zc.shape = torch.Size([2, 2])