qibocal.protocols.rabi package#

Submodules#

qibocal.protocols.rabi.amplitude module#

class qibocal.protocols.rabi.amplitude.RabiAmplitudeParameters(min_amp_factor: float, max_amp_factor: float, step_amp_factor: float, pulse_length: Optional[float])[source]#

Bases: RabiAmplitudeVoltParameters

RabiAmplitude runcard inputs.

class qibocal.protocols.rabi.amplitude.RabiAmplitudeResults(amplitude: dict[typing.Union[str, int], tuple[float, typing.Optional[float]]], length: dict[typing.Union[str, int], tuple[float, typing.Optional[float]]], fitted_parameters: dict[typing.Union[str, int], dict[str, float]], chi2: dict[typing.Union[str, int], tuple[float, typing.Optional[float]]] = <factory>)[source]#

Bases: RabiAmplitudeVoltResults

RabiAmplitude outputs.

chi2: dict[Union[str, int], tuple[float, Optional[float]]]#
qibocal.protocols.rabi.amplitude.RabiAmpType = dtype([('amp', '<f8'), ('prob', '<f8'), ('error', '<f8')])#

Custom dtype for rabi amplitude.

class qibocal.protocols.rabi.amplitude.RabiAmplitudeData(durations: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('prob', '<f8'), ('error', '<f8')])]]] = <factory>)[source]#

Bases: Data

RabiAmplitude data acquisition.

durations: dict[Union[str, int], float]#

Pulse durations provided by the user.

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('prob', '<f8'), ('error', '<f8')])]]]#

Raw data acquired.

qibocal.protocols.rabi.amplitude.rabi_amplitude = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

RabiAmplitude Routine object.

qibocal.protocols.rabi.amplitude_signal module#

class qibocal.protocols.rabi.amplitude_signal.RabiAmplitudeVoltParameters(min_amp_factor: float, max_amp_factor: float, step_amp_factor: float, pulse_length: Optional[float])[source]#

Bases: Parameters

RabiAmplitude runcard inputs.

min_amp_factor: float#

Minimum amplitude multiplicative factor.

max_amp_factor: float#

Maximum amplitude multiplicative factor.

step_amp_factor: float#

Step amplitude multiplicative factor.

pulse_length: Optional[float]#

RX pulse duration [ns].

class qibocal.protocols.rabi.amplitude_signal.RabiAmplitudeVoltResults(amplitude: dict[Union[str, int], tuple[float, Optional[float]]], length: dict[Union[str, int], tuple[float, Optional[float]]], fitted_parameters: dict[Union[str, int], dict[str, float]])[source]#

Bases: Results

RabiAmplitude outputs.

amplitude: dict[Union[str, int], tuple[float, Optional[float]]]#

Drive amplitude for each qubit.

length: dict[Union[str, int], tuple[float, Optional[float]]]#

Drive pulse duration. Same for all qubits.

fitted_parameters: dict[Union[str, int], dict[str, float]]#

Raw fitted parameters.

qibocal.protocols.rabi.amplitude_signal.RabiAmpVoltType = dtype([('amp', '<f8'), ('signal', '<f8'), ('phase', '<f8')])#

Custom dtype for rabi amplitude.

class qibocal.protocols.rabi.amplitude_signal.RabiAmplitudeVoltData(durations: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: Data

RabiAmplitudeVolt data acquisition.

durations: dict[Union[str, int], float]#

Pulse durations provided by the user.

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired.

qibocal.protocols.rabi.amplitude_signal.rabi_amplitude_signal = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

RabiAmplitude Routine object.

qibocal.protocols.rabi.ef module#

class qibocal.protocols.rabi.ef.RabiAmplitudeEFParameters(min_amp_factor: float, max_amp_factor: float, step_amp_factor: float, pulse_length: Optional[float])[source]#

Bases: RabiAmplitudeVoltParameters

RabiAmplitudeEF runcard inputs.

class qibocal.protocols.rabi.ef.RabiAmplitudeEFResults(amplitude: dict[Union[str, int], tuple[float, Optional[float]]], length: dict[Union[str, int], tuple[float, Optional[float]]], fitted_parameters: dict[Union[str, int], dict[str, float]])[source]#

Bases: RabiAmplitudeVoltResults

RabiAmplitudeEF outputs.

class qibocal.protocols.rabi.ef.RabiAmplitudeEFData(durations: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: RabiAmplitudeVoltData

RabiAmplitude data acquisition.

qibocal.protocols.rabi.ef.rabi_amplitude_ef = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

RabiAmplitudeEF Routine object.

qibocal.protocols.rabi.length module#

class qibocal.protocols.rabi.length.RabiLengthParameters(pulse_duration_start: float, pulse_duration_end: float, pulse_duration_step: float, pulse_amplitude: Optional[float] = None)[source]#

Bases: Parameters

RabiLength runcard inputs.

pulse_duration_start: float#

Initial pi pulse duration [ns].

pulse_duration_end: float#

Final pi pulse duration [ns].

pulse_duration_step: float#

Step pi pulse duration [ns].

pulse_amplitude: Optional[float] = None#

Pi pulse amplitude. Same for all qubits.

class qibocal.protocols.rabi.length.RabiLengthResults(length: dict[typing.Union[str, int], tuple[int, typing.Optional[float]]], amplitude: dict[typing.Union[str, int], tuple[float, typing.Optional[float]]], fitted_parameters: dict[typing.Union[str, int], dict[str, float]], chi2: dict[typing.Union[str, int], tuple[float, typing.Optional[float]]] = <factory>)[source]#

Bases: RabiLengthVoltResults

RabiLength outputs.

chi2: dict[Union[str, int], tuple[float, Optional[float]]]#
qibocal.protocols.rabi.length.RabiLenType = dtype([('length', '<f8'), ('prob', '<f8'), ('error', '<f8')])#

Custom dtype for rabi amplitude.

class qibocal.protocols.rabi.length.RabiLengthData(amplitudes: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('length', '<f8'), ('prob', '<f8'), ('error', '<f8')])]]] = <factory>)[source]#

Bases: RabiLengthVoltData

RabiLength acquisition outputs.

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('length', '<f8'), ('prob', '<f8'), ('error', '<f8')])]]]#

Raw data acquired.

qibocal.protocols.rabi.length.rabi_length = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

RabiLength Routine object.

qibocal.protocols.rabi.length_sequences module#

qibocal.protocols.rabi.length_sequences.rabi_length_sequences = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

RabiLength Routine object.

qibocal.protocols.rabi.length_signal module#

class qibocal.protocols.rabi.length_signal.RabiLengthVoltParameters(pulse_duration_start: float, pulse_duration_end: float, pulse_duration_step: float, pulse_amplitude: Optional[float] = None)[source]#

Bases: Parameters

RabiLengthVolt runcard inputs.

pulse_duration_start: float#

Initial pi pulse duration [ns].

pulse_duration_end: float#

Final pi pulse duration [ns].

pulse_duration_step: float#

Step pi pulse duration [ns].

pulse_amplitude: Optional[float] = None#

Pi pulse amplitude. Same for all qubits.

class qibocal.protocols.rabi.length_signal.RabiLengthVoltResults(length: dict[Union[str, int], tuple[int, Optional[float]]], amplitude: dict[Union[str, int], tuple[float, Optional[float]]], fitted_parameters: dict[Union[str, int], dict[str, float]])[source]#

Bases: Results

RabiLengthVolt outputs.

length: dict[Union[str, int], tuple[int, Optional[float]]]#

Pi pulse duration for each qubit.

amplitude: dict[Union[str, int], tuple[float, Optional[float]]]#

Pi pulse amplitude. Same for all qubits.

fitted_parameters: dict[Union[str, int], dict[str, float]]#

Raw fitting output.

qibocal.protocols.rabi.length_signal.RabiLenVoltType = dtype([('length', '<f8'), ('signal', '<f8'), ('phase', '<f8')])#

Custom dtype for rabi amplitude.

class qibocal.protocols.rabi.length_signal.RabiLengthVoltData(amplitudes: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('length', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: Data

RabiLength acquisition outputs.

amplitudes: dict[Union[str, int], float]#

Pulse durations provided by the user.

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('length', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired.

qibocal.protocols.rabi.length_signal.rabi_length_signal = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

RabiLength Routine object.

qibocal.protocols.rabi.utils module#

qibocal.protocols.rabi.utils.rabi_amplitude_function(x, offset, amplitude, period, phase)[source]#

Fit function of Rabi amplitude signal experiment.

Parameters:

x – Input data.

qibocal.protocols.rabi.utils.rabi_length_function(x, offset, amplitude, period, phase, t2_inv)[source]#

Fit function of Rabi length signal experiment.

Parameters:

x – Input data.

qibocal.protocols.rabi.utils.plot(data, qubit, fit)[source]#
qibocal.protocols.rabi.utils.plot_probabilities(data, qubit, fit)[source]#
qibocal.protocols.rabi.utils.extract_rabi(data)[source]#

Extract Rabi fit info.

qibocal.protocols.rabi.utils.period_correction_factor(phase: float)[source]#

Correct period by taking phase into account.

https://github.com/qiboteam/qibocal/issues/656

We want to find the first maximum or minimum which will correspond to an exchange of population between 0 and 1. To find it we need to solve the following equation \(\cos(2 \pi x / T + \phi) = \pm 1\) which will give us the following solution

\[x = ( k - \phi / \pi) T / 2\]

for integer \(k\), which is chosen such that we get the smallest multiplicative correction compared to \(T/2\).