bloch_vector_to_standard_basis¶
-
forest.benchmarking.utils.
bloch_vector_to_standard_basis
(theta: float, phi: float) → Tuple[complex, complex]¶ Converts the Bloch vector representation of a 1q state given in spherical coordinates to the standard representation of that state in the computational basis.
Parameters: - theta – azimuthal angle given in radians
- phi – polar angle given in radians
Returns: tuple of the two coefficients a and b for the state
a|0> + b|1>
where a is real