complex2real_matrix#
- sionna.phy.mimo.complex2real_matrix(z: torch.Tensor) torch.Tensor[source]#
Transforms a complex-valued matrix into its real-valued equivalent.
Transforms the last two dimensions of a complex-valued tensor into their real-valued matrix equivalent representation.
For a matrix \(\mathbf{Z}\in \mathbb{C}^{M\times K}\) with real and imaginary parts \(\mathbf{X}\in \mathbb{R}^{M\times K}\) and \(\mathbf{Y}\in \mathbb{R}^{M\times K}\), respectively, this function returns the matrix \(\tilde{\mathbf{Z}}\in \mathbb{R}^{2M\times 2K}\), given as
\[\begin{split}\tilde{\mathbf{Z}} = \begin{pmatrix} \mathbf{X} & -\mathbf{Y}\\ \mathbf{Y} & \mathbf{X} \end{pmatrix}.\end{split}\]- Parameters:
z (torch.Tensor) – […, M, K], torch.complex. Complex-valued input matrix.
- Outputs:
z_real – […, 2M, 2K], torch.float. Real-valued equivalent matrix.
Examples
z = torch.complex(torch.ones(2, 3), torch.ones(2, 3) * 2) zr = complex2real_matrix(z) # zr.shape = torch.Size([4, 6])