qibocal.protocols.ramsey package#

Submodules#

qibocal.protocols.ramsey.ramsey module#

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

Ramsey Routine object.

qibocal.protocols.ramsey.ramsey.RamseyType = dtype([('wait', '<f8'), ('prob', '<f8'), ('errors', '<f8')])#

Custom dtype for coherence routines.

qibocal.protocols.ramsey.ramsey_signal module#

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

Ramsey Routine object.

class qibocal.protocols.ramsey.ramsey_signal.RamseySignalParameters(delay_between_pulses_start: int, delay_between_pulses_end: int, delay_between_pulses_step: int, detuning: Optional[int] = None, unrolling: bool = False)[source]#

Bases: Parameters

Ramsey runcard inputs.

delay_between_pulses_start: int#

Initial delay between RX(pi/2) pulses in ns.

delay_between_pulses_end: int#

Final delay between RX(pi/2) pulses in ns.

delay_between_pulses_step: int#

Step delay between RX(pi/2) pulses in ns.

detuning: Optional[int] = None#

Frequency detuning [Hz] (optional). If 0 standard Ramsey experiment is performed.

unrolling: bool = False#

If True it uses sequence unrolling to deploy multiple sequences in a single instrument call. Defaults to False.

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.

class qibocal.protocols.ramsey.ramsey_signal.RamseySignalData(detuning: ~typing.Optional[int] = None, qubit_freqs: dict[typing.Union[int, str], float] = <factory>, data: dict[typing.Union[int, str], numpy.ndarray[typing.Any, numpy.dtype[dtype([('wait', '<f8'), ('signal', '<f8')])]]] = <factory>)[source]#

Bases: Data

Ramsey acquisition outputs.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

register_qubit(dtype, data_keys, data_dict)#

Store output for single qubit.

Parameters:
  • data_keys (tuple) – Keys of Data.data.

  • data_dict (dict) – The keys are the fields of dtype and

  • arrays. (the values are the related) –

save(path: Path)#

Store data to file.

detuning: Optional[int] = None#

Frequency detuning [Hz].

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

Qubit freqs for each qubit.

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

Raw data acquired.

property waits#

Return a list with the waiting times without repetitions.

qibocal.protocols.ramsey.ramsey_signal._update(results: RamseySignalResults, platform: CalibrationPlatform, target: Union[int, str])[source]#
class qibocal.protocols.ramsey.ramsey_signal.RamseySignalResults(detuning: float, frequency: dict[Union[int, str], Union[float, list[float]]], t2: dict[Union[int, str], Union[float, list[float]]], delta_phys: dict[Union[int, str], Union[float, list[float]]], delta_fitting: dict[Union[int, str], Union[float, list[float]]], fitted_parameters: dict[Union[int, str], list[float]])[source]#

Bases: Results

Ramsey outputs.

detuning: float#

Qubit frequency detuning.

frequency: dict[Union[int, str], Union[float, list[float]]]#

Drive frequency [GHz] for each qubit.

t2: dict[Union[int, str], Union[float, list[float]]]#

T2 for each qubit [ns].

delta_phys: dict[Union[int, str], Union[float, list[float]]]#

Drive frequency [Hz] correction for each qubit.

delta_fitting: dict[Union[int, str], Union[float, list[float]]]#

Raw drive frequency [Hz] correction for each qubit. including the detuning.

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

Raw fitting output.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

qibocal.protocols.ramsey.ramsey_zz module#

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

Ramsey Routine object.

qibocal.protocols.ramsey.utils module#

qibocal.protocols.ramsey.utils.POPT_EXCEPTION = [0, 0, 0, 0, 1]#

Fit parameters output to handle exceptions

qibocal.protocols.ramsey.utils.PERR_EXCEPTION = [1, 1, 1, 1, 1]#

Fit errors to handle exceptions; their choice has no physical meaning and is meant to avoid breaking the code.

qibocal.protocols.ramsey.utils.THRESHOLD = 0.5#

Threshold parameters for find_peaks to guess frequency for sinusoidal fit.

qibocal.protocols.ramsey.utils.ramsey_sequence(platform: Platform, targets: list[Union[int, str]], wait: int = 0, target_qubit: Optional[Union[int, str]] = None)[source]#

Pulse sequence used in Ramsey (detuned) experiments.

The pulse sequence is the following:

RX90 – wait – RX90 – MZ

qibocal.protocols.ramsey.utils.ramsey_fit(x, offset, amplitude, delta, phase, decay)[source]#

Dumped sinusoidal fit.

qibocal.protocols.ramsey.utils.fitting(x: list, y: list, errors: list = None) list[source]#

Given the inputs list x and outputs one y, this function fits the ramsey_fit function and returns a list with the fit parameters.

qibocal.protocols.ramsey.utils.process_fit(popt: list[float], perr: list[float], qubit_frequency: float, detuning: float)[source]#

Processing Ramsey fitting results.