scqubits.utils.spectrum_utils.extract_phase#

scqubits.utils.spectrum_utils.extract_phase(complex_array, position=None)[source]#

Extracts global phase from complex_array at given position. If position is not specified, the position is set as follows. Find the maximum between the leftmost point and the halfway point of the wavefunction. The position of that point is used to determine the phase factor to be eliminated.

Parameters:
  • complex_array (ndarray) – complex-valued array

  • position (Optional[Tuple[int, ...]]) – position where the phase is extracted (default value = None)

Return type:

float