qibocal.protocols.ramsey package#
Submodules#
qibocal.protocols.ramsey.ramsey module#
- class qibocal.protocols.ramsey.ramsey.RamseyParameters(delay_between_pulses_start: int, delay_between_pulses_end: int, delay_between_pulses_step: int, detuning: Optional[int] = None, unrolling: bool = False)[source]#
Bases:
RamseySignalParameters
Ramsey runcard inputs.
- detuning: Optional[int] = None#
Frequency detuning [Hz] (optional). If 0 standard Ramsey experiment is performed.
- class qibocal.protocols.ramsey.ramsey.RamseyResults(detuning: float, frequency: dict[Union[str, int], Union[float, list[float]]], t2: dict[Union[str, int], Union[float, list[float]]], delta_phys: dict[Union[str, int], Union[float, list[float]]], delta_fitting: dict[Union[str, int], Union[float, list[float]]], fitted_parameters: dict[Union[str, int], list[float]], chi2: dict[Union[str, int], tuple[float, Optional[float]]])[source]#
Bases:
RamseySignalResults
Ramsey outputs.
- chi2: dict[Union[str, int], tuple[float, Optional[float]]]#
Chi squared estimate mean value and error.
- _to_npz(path: Path, filename: str)#
Helper function to use np.savez while converting keys into strings.
- delta_phys: dict[QubitId, Union[float, list[float]]]#
Drive frequency [Hz] correction for each qubit.
- qibocal.protocols.ramsey.ramsey.RamseyType = dtype([('wait', '<f8'), ('prob', '<f8'), ('errors', '<f8')])#
Custom dtype for coherence routines.
- class qibocal.protocols.ramsey.ramsey.RamseyData(detuning: ~typing.Optional[int] = None, qubit_freqs: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('wait', '<f8'), ('prob', '<f8'), ('errors', '<f8')])]]] = <factory>)[source]#
Bases:
RamseySignalData
Ramsey acquisition outputs.
- data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('wait', '<f8'), ('prob', '<f8'), ('errors', '<f8')])]]]#
Raw data acquired.
- _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.
- property waits#
Return a list with the waiting times without repetitions.
- qibocal.protocols.ramsey.ramsey._acquisition(params: RamseyParameters, platform: Platform, targets: list[Union[str, int]]) RamseyData [source]#
Data acquisition for Ramsey Experiment (detuned).
The protocol consists in applying the following pulse sequence RX90 - wait - RX90 - MZ for different waiting times wait. The range of waiting times is defined through the attributes delay_between_pulses_* available in RamseyParameters. The final range will be constructed using np.arange. It is possible to detune the drive frequency using the parameter detuning in RamseyParameters which will increment the drive frequency accordingly. Currently when detuning==0 it will be performed a sweep over the waiting values if detuning is not zero, all sequences with different waiting value will be executed sequentially. By providing the option unrolling=True in RamseyParameters the sequences will be unrolled when the frequency is detuned. The following protocol will display on the y-axis the probability of finding the ground state, therefore it is advise to execute it only after having performed the single shot classification. Error bars are provided as binomial distribution error.
- qibocal.protocols.ramsey.ramsey._fit(data: RamseyData) RamseyResults [source]#
Fitting routine for Ramsey experiment. The used model is .. math:
y = p_0 + p_1 sin \Big(p_2 x + p_3 \Big) e^{-x p_4}.
- qibocal.protocols.ramsey.ramsey._plot(data: RamseyData, target: Union[str, int], fit: Optional[RamseyResults] = None)[source]#
Plotting function for Ramsey Experiment.
- 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_signal module#
- 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.
- detuning: Optional[int] = None#
Frequency detuning [Hz] (optional). If 0 standard Ramsey experiment is performed.
- class qibocal.protocols.ramsey.ramsey_signal.RamseySignalResults(detuning: float, frequency: dict[Union[str, int], Union[float, list[float]]], t2: dict[Union[str, int], Union[float, list[float]]], delta_phys: dict[Union[str, int], Union[float, list[float]]], delta_fitting: dict[Union[str, int], Union[float, list[float]]], fitted_parameters: dict[Union[str, int], list[float]])[source]#
Bases:
Results
Ramsey outputs.
- delta_phys: dict[Union[str, int], Union[float, list[float]]]#
Drive frequency [Hz] correction for each qubit.
- delta_fitting: dict[Union[str, int], Union[float, list[float]]]#
Raw drive frequency [Hz] correction for each qubit. including the detuning.
- qibocal.protocols.ramsey.ramsey_signal.RamseySignalType = dtype([('wait', '<f8'), ('signal', '<f8')])#
Custom dtype for coherence routines.
- class qibocal.protocols.ramsey.ramsey_signal.RamseySignalData(detuning: ~typing.Optional[int] = None, qubit_freqs: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('wait', '<f8'), ('signal', '<f8')])]]] = <factory>)[source]#
Bases:
Data
Ramsey 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.
- data: dict[typing.Union[str, int], 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._acquisition(params: RamseySignalParameters, platform: Platform, targets: list[Union[str, int]]) RamseySignalData [source]#
Data acquisition for Ramsey Experiment (detuned).
- qibocal.protocols.ramsey.ramsey_signal._fit(data: RamseySignalData) RamseySignalResults [source]#
Fitting routine for Ramsey experiment. The used model is .. math:
y = p_0 + p_1 sin \Big(p_2 x + p_3 \Big) e^{-x p_4}.
- qibocal.protocols.ramsey.ramsey_signal._plot(data: RamseySignalData, target: Union[str, int], fit: Optional[RamseySignalResults] = None)[source]#
Plotting function for Ramsey Experiment.
- qibocal.protocols.ramsey.ramsey_signal._update(results: RamseySignalResults, platform: Platform, target: Union[str, int])[source]#
- 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.
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, qubit: Union[str, int], wait: int = 0, detuning: Optional[int] = None)[source]#
Pulse sequence used in Ramsey (detuned) experiments.
The pulse sequence is the following:
RX90 – wait – RX90 – MZ
If detuning is specified the RX90 pulses will be sent to frequency = drive_frequency + detuning
- qibocal.protocols.ramsey.utils.ramsey_fit(x, offset, amplitude, delta, phase, decay)[source]#
Dumped sinusoidal fit.