standard_basis_to_bloch_vector¶
-
forest.benchmarking.utils.
standard_basis_to_bloch_vector
(qubit_state: Sequence[complex]) → Tuple[float, float]¶ Converts a standard representation of a single qubit state in the computational basis to the spherical coordinates theta, phi of its representation on the Bloch sphere.
Parameters: qubit_state – a sequence of the two coefficients a and b for the state a|0> + b|1>
Returns: the azimuthal and polar angle, theta and phi, representing a point on the Bloch sphere.