complex2real_vector#
- sionna.phy.mimo.complex2real_vector(z: torch.Tensor) torch.Tensor[source]#
Transforms a complex-valued vector into its real-valued equivalent.
Transforms the last dimension of a complex-valued tensor into its real-valued equivalent by stacking the real and imaginary parts on top of each other.
For a vector \(\mathbf{z}\in \mathbb{C}^M\) with real and imaginary parts \(\mathbf{x}\in \mathbb{R}^M\) and \(\mathbf{y}\in \mathbb{R}^M\), respectively, this function returns the vector \(\left[\mathbf{x}^{\mathsf{T}}, \mathbf{y}^{\mathsf{T}} \right ]^{\mathsf{T}}\in\mathbb{R}^{2M}\).
- Parameters:
z (torch.Tensor) – […, M], torch.complex. Complex-valued input vector.
- Outputs:
z_real – […, 2M], torch.float. Real-valued equivalent vector.
Examples
z = torch.complex(torch.tensor([1., 2.]), torch.tensor([3., 4.])) zr = complex2real_vector(z) # zr = tensor([1., 2., 3., 4.])