# Dispersive shift#

In this section we present the dispersive shift routines provided by Qibocal.

## Theory#

A system with a qubit and a resonator, interacting with each other, is described by the James-Cummings Hamiltonian. Restricting the qubit states to the first two levels, we get

$\hat{H}_{\text{JC}} = \hbar \omega_r \hat{a}^\dagger \hat{a} + \frac{\hbar \omega_q}{2} \hat{\sigma}_z + \hbar g (\hat{a}^\dagger \hat{\sigma}_- + \hat{a} \hat{\sigma}_+)$

where $$\omega_r$$ and $$\omega_q$$ are respectively the resonator and the qubit frequencies, and $$g$$ is the coupling constant between the qubit and the resonator. In the dispersive regime $$g \ll \lvert \omega_r - \omega_q \rvert$$, the Hamiltonian can be rewritten as

(1)#$\hat{H}_{\text{eff}} = \hbar \hat{a}^\dagger \hat{a} (\omega_r - \chi \hat{\sigma}_z) + \frac{\hbar}{2} (\omega_q + \chi) \hat{\sigma}_z$

where we introduced the dispersive shift

$\chi = \frac{g^2}{\lambda}.$

Equation (1) shows that the resonator frequency is $$\omega_{r,0} = \omega_r - \chi$$ ($$\omega_{r,1} = \omega_r + \chi$$) when the qubit is in the ground (excited) state. The separation between the two freqiencies is $$\lvert 2 \chi \rvert$$.

### Routine description#

After collecting the data from the two spectroscopies, for each readout frequency the distance of the centers of the blobs for $$\ket{0}$$ and $$\ket{1}$$ states are evaluated. The best readout frequency is the one maximizing the distance between the two blobs.

### Parameters#

class qibocal.protocols.dispersive_shift.DispersiveShiftParameters(freq_width: int, freq_step: int)[source]

Dispersive shift inputs.

freq_width: int

Width [Hz] for frequency sweep relative to the readout frequency [Hz].

freq_step: int

Frequency step for sweep [Hz].

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: dispersive shift qt
operation: dispersive_shift_qutrit
parameters:
freq_step: 200000
freq_width: 1000000


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