phase_helper

phase_helper#

Full path: exa.core.util.phase_helper

Helpers for creating phase and conditional phase datasets.

Functions

add_conditional_phase_amplitude(data_array, ...)

Uses get_phase_array() to calculate phase and amplitude, and then calculates conditional phase by comparing phase values for conditioned=True and conditioned=False.

add_phase_amplitude(data_array, ...[, ...])

Adds the phase and amplitude calculated by get_phase_array() to the target dataset.

get_phase_2_points(phases, data)

Calculate the qubit phase, assuming two points in the phase sweep were used, and the excited state probability is well-calibrated, so the data offset is 0.5.

get_phase_array(data_array, phase_coord[, ...])

Calculates the fit, phase and amplitude arrays, by collapsing the phase dimension on the given data.

get_phase_fitter(n_phases)

Generates a fitter function for cosine oscillation with frequency 1, used to determine the phase of the data.

get_phase_more_points(phases, data)

Calculate the qubit phase, assuming more than two points in the phase sweep were used.

get_unwrapped_phase_array(array[, dimension])

Produce an unwrapped array skipping NaNs.

unwrap_with_nans(x, y)

Unwrap y along x, skipping NaNs.