spheres.utils.phase

spheres.utils.phase(v)[source]

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

Parameters

v (np.array or qt.Qobj) –

Returns

phase

Return type

complex