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: int | None = None, unrolling: bool = False)[source]¶
Bases:
ParametersRamsey runcard inputs.
- detuning: int | None = None¶
Frequency detuning [Hz] (optional). If 0 standard Ramsey experiment is performed.
- class qibocal.protocols.ramsey.ramsey_signal.RamseySignalData(detuning: int | None = None, qubit_freqs: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float] = <factory>, data: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~numpy.ndarray[tuple[int, ...], ~numpy.dtype[dtype([('wait', '<f8'), ('signal', '<f8')])]]] = <factory>)[source]¶
Bases:
DataRamsey acquisition outputs.
- _to_npz(path: Path, filename: str)¶
Helper function to use np.savez while converting keys into strings.
- property pairs¶
Access qubit pairs ordered alphanumerically from data structure.
- property qubits¶
Access qubits from data structure.
- register_qubit(dtype, data_keys, data_dict)¶
Store output for single qubit.
- qubit_freqs: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float]¶
Qubit freqs for each qubit.
- data: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ndarray[tuple[int, ...], 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: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])])[source]¶
- class qibocal.protocols.ramsey.ramsey_signal.RamseySignalResults(detuning: float, frequency: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]], t2: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]], delta_phys: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]], delta_fitting: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]], fitted_parameters: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], list[float]])[source]¶
Bases:
ResultsRamsey outputs.
- frequency: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]]¶
Drive frequency [GHz] for each qubit.
- t2: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]]¶
T2 for each qubit [ns].
- delta_phys: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]]¶
Drive frequency [Hz] correction for each qubit.
- delta_fitting: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float | list[float]]¶
Raw drive frequency [Hz] correction for each qubit. including the detuning.
- fitted_parameters: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], list[float]]¶
Raw fitting output.
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.DAMPED_CONSTANT = 1.5¶
Scaling factor to recover amplitude from quantiles.
Measuring intermediate quantiles is less noise sensitive then meauring extremal points (minimum and maximum), but it is not a direct measurement of the amplitude itself. For pure sinusoidal oscillations, the scaling from the value associated to a given quantile and the amplitude is asymptotically fixed, for a large number of oscillations. Assuming that samples are dense enough that they could be represented by the continuous distribution, essentially projecting a uniform measure over an interval through a single sinusoidal oscillation.
However, for damped oscillations, the factor is not easily determined, since the value associated to a certian quantile depends on the observation window extent, and the ratio between the decay rate and the oscillation.
Assuming a mild decay, and we can approximate this factor with the same one for the pure oscillation. This can be assumed to be slightly decreased because of the dampening, but there is no general control about how much. By reducing the amplitude by this rough 30%, the estimation will lend closer to the actual amplitude. We rely anyhow on the fit to determine the precise value.
- qibocal.protocols.ramsey.utils.ramsey_sequence(platform: Platform, targets: list[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], wait: int = 0, target_qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])] | None = None, flux_pulse_amplitude: float | None = 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.angle_wrap(angle: float)[source]¶
Wrap an angle from [-np.inf,np.inf] into the [0,2*np.pi] domain