real2complex_vector#

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

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

Transforms the last dimension of a real-valued tensor into its complex-valued equivalent by interpreting the first half as the real and the second half as the imaginary part.

For a vector \(\mathbf{z}=\left[\mathbf{x}^{\mathsf{T}}, \mathbf{y}^{\mathsf{T}} \right ]^{\mathsf{T}}\in \mathbb{R}^{2M}\) with \(\mathbf{x}\in \mathbb{R}^M\) and \(\mathbf{y}\in \mathbb{R}^M\), this function returns the vector \(\mathbf{x}+j\mathbf{y}\in\mathbb{C}^M\).

Parameters:

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

Outputs:

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

Examples

z = torch.tensor([1., 2., 3., 4.])
zc = real2complex_vector(z)
# zc = tensor([1.+3.j, 2.+4.j])