# Rabi experiments#

In this section we present all Rabi experiments provided by Qibocal.

## Rabi lenght and amplitude#

The goal of the Rabi experiment is to tune the amplitude (duration) of the drive pulse, in order to excite the qubit from the ground state up to state $$\ket{1}$$.

In the Rabi experiment, the qubit is probed with a drive pulse at the qubit frequency $$w_{01}$$ before measuring. This pulse sequence is repeated multiple times changing the amplitude (duration) of the pulse. The qubit starts in the ground state, changing one of the two parameters of the drive pulse, the probability of being in the first excited state increases following a sinusoidal pattern.

For the amplitude version, we expect:

$p_e(t) =\frac{1}{2} \left( 1 - \cos\left(\Omega_R t \right) \right)$

For the time version, we have to take into account the dephasing and the energy decay. In case the Rabi rate is larger than the decay and the pure dephasing rate,

$p_e(t) = \frac{1}{2} \left(1- e^{-t/\tau} \cos\left(\Omega_R \frac{t}{2}\right)\right)$

where $$\Omega_R$$ is the Rabi frequency and $$\tau$$ the decay time.

### Parameters#

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

RabiAmplitude runcard inputs.

hardware_average: bool = False

By default hardware average will be performed.

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].

nshots: int

Number of executions on hardware

relaxation_time: float

Wait time for the qubit to decohere back to the gnd state

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

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.

hardware_average: bool = False

By default hardware average will be performed.

nshots: int

Number of executions on hardware

relaxation_time: float

Wait time for the qubit to decohere back to the gnd state

### Example#

It follows an example of the experiment parameters.

- id: Rabi amplitude
operation: rabi_amplitude
parameters:
min_amp_factor: 0.1
max_amp_factor: 1.
step_amp_factor: 0.01
pulse_length: 40
nshots: 3000
relaxation_time: 50000


To run properly this experiment it is important to set the relaxation_time higher than the qubit T1.

After running qq auto, the experiment is executed and the result will looks like the following picture.

Regarding the time version of this experiment, this is an example

- id: Rabi length
operation: rabi_length
parameters:
pulse_duration_start: 16
pulse_duration_end: 100
pulse_duration_step: 4
pulse_amplitude: 0.22
nshots: 3000
relaxation_time: 50000


For each Rabi experiment Qibocal provides the signal version, where just the readout signal is acquired, without performing state discrimination qibocal.protocols.rabi.amplitude_signal.rabi_amplitude_signal, qibocal.protocols.rabi.length_signal.rabi_length_signal.

It follows an example runcard and plot for the signal exepriment

- id: Rabi signal
operation: rabi_amplitude_signal
parameters:
min_amp_factor: 0.2
max_amp_factor: 1.
step_amp_factor: 0.01
pulse_length: 40
nshots: 3000
relaxation_time: 50000


## Rabi ef#

This experiment is used to characterized the $$\pi_{12}$$ pulse, in order to change the qubit state from $$\ket{1}$$ to $$\ket{2}$$. The experiment is similar to the Rabi experiment, but at the beginning the state should be prepared in the $$\ket{1}$$ state through a $$\pi_{01}$$ pulse.

### Example#

It follows an example of runcard and a generated report.

- id: Rabi ef
operation: rabi_amplitude_ef
parameters:
min_amp_factor: 0.2
max_amp_factor: 1.
step_amp_factor: 0.01
pulse_length: 400
nshots: 3000
relaxation_time: 50000