spheres.utils.phase_angle

spheres.utils.phase_angle(q)[source]

Extracts phase angle of a complex vector (np.ndarray or qt.Qobj) by finding the first non-zero component and returning its phase angle.

Parameters

v (np.array or qt.Qobj) –

Returns

phase_angle

Return type

float