rydiqule.sensor_utils.get_basis_transform¶
- rydiqule.sensor_utils.get_basis_transform(basis_size: int) Tuple[ndarray, ndarray] [source]¶
Function that defines the basis transformation matrix u and its inverse u_i, between the real and complex basis.
This matrix u implements that the \(\rho[j,i] \rightarrow Re(\rho[j,i])\) and \(\rho[i,j] \rightarrow Im(\rho[j,i])\).
The transformation is not quite unitary, due to the asymmetry of the factors of 1/2.
- Parameters:
basis_size (int) – Size of the basis to generate transformations for.
- Returns:
u (numpy.ndarray) – Forward transformation matrix.
u_inv (numpy.ndarray) – Inverse transformation matrix.
- Raises:
RydiquleError – If
basis_size
does not match current basis.