qibocal.protocols.coherence package#
Submodules#
qibocal.protocols.coherence.spin_echo module#
- class qibocal.protocols.coherence.spin_echo.SpinEchoParameters(delay_between_pulses_start: int, delay_between_pulses_end: int, delay_between_pulses_step: int, unrolling: bool = False, single_shot: bool = False)[source]#
Bases:
SpinEchoSignalParameters
SpinEcho runcard inputs.
- class qibocal.protocols.coherence.spin_echo.SpinEchoResults(t2_spin_echo: dict[typing.Union[str, int], typing.Union[float, list[float]]], fitted_parameters: dict[typing.Union[str, int], dict[str, float]], pcov: dict[typing.Union[str, int], list[float]], chi2: ~typing.Optional[dict[typing.Union[str, int], tuple[float, typing.Optional[float]]]] = <factory>)[source]#
Bases:
SpinEchoSignalResults
SpinEcho outputs.
- chi2: Optional[dict[Union[str, int], tuple[float, Optional[float]]]]#
Chi squared estimate mean value and error.
- class qibocal.protocols.coherence.spin_echo.SpinEchoData(data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#
Bases:
T1Data
SpinEcho 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.
- qibocal.protocols.coherence.spin_echo._acquisition(params: SpinEchoParameters, platform: Platform, targets: list[Union[str, int]]) SpinEchoData [source]#
Data acquisition for SpinEcho
- qibocal.protocols.coherence.spin_echo._fit(data: SpinEchoData) SpinEchoResults [source]#
Post-processing for SpinEcho.
- qibocal.protocols.coherence.spin_echo._plot(data: SpinEchoData, target: Union[str, int], fit: Optional[SpinEchoResults] = None)[source]#
Plotting for SpinEcho
- qibocal.protocols.coherence.spin_echo.spin_echo = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
SpinEcho Routine object.
qibocal.protocols.coherence.spin_echo_signal module#
- class qibocal.protocols.coherence.spin_echo_signal.SpinEchoSignalParameters(delay_between_pulses_start: int, delay_between_pulses_end: int, delay_between_pulses_step: int, unrolling: bool = False, single_shot: bool = False)[source]#
Bases:
Parameters
SpinEcho Signal runcard inputs.
- class qibocal.protocols.coherence.spin_echo_signal.SpinEchoSignalResults(t2_spin_echo: dict[Union[str, int], Union[float, list[float]]], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]])[source]#
Bases:
Results
SpinEchoSignal outputs.
- class qibocal.protocols.coherence.spin_echo_signal.SpinEchoSignalData(data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#
Bases:
T1SignalData
SpinEcho acquisition outputs.
- _to_npz(path: Path, filename: str)#
Helper function to use np.savez while converting keys into strings.
- property average#
- 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.
- qibocal.protocols.coherence.spin_echo_signal._acquisition(params: SpinEchoSignalParameters, platform: Platform, targets: list[Union[str, int]]) SpinEchoSignalData [source]#
Data acquisition for SpinEcho
- qibocal.protocols.coherence.spin_echo_signal._fit(data: SpinEchoSignalData) SpinEchoSignalResults [source]#
Post-processing for SpinEcho.
- qibocal.protocols.coherence.spin_echo_signal._plot(data: SpinEchoSignalData, target: Union[str, int], fit: Optional[SpinEchoSignalResults] = None)[source]#
Plotting for SpinEcho
- qibocal.protocols.coherence.spin_echo_signal._update(results: SpinEchoSignalResults, platform: Platform, target: Union[str, int])[source]#
- qibocal.protocols.coherence.spin_echo_signal.spin_echo_signal = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
SpinEcho Routine object.
qibocal.protocols.coherence.t1 module#
- class qibocal.protocols.coherence.t1.T1Parameters(delay_before_readout_start: int, delay_before_readout_end: int, delay_before_readout_step: int, single_shot: bool = False)[source]#
Bases:
T1SignalParameters
T1 runcard inputs.
- class qibocal.protocols.coherence.t1.T1Results(t1: dict[typing.Union[str, int], typing.Union[float, list[float]]], fitted_parameters: dict[typing.Union[str, int], dict[str, float]], pcov: dict[typing.Union[str, int], list[float]], chi2: ~typing.Optional[dict[typing.Union[str, int], list[float]]] = <factory>)[source]#
Bases:
T1SignalResults
T1 outputs.
- qibocal.protocols.coherence.t1.CoherenceProbType = dtype([('wait', '<f8'), ('prob', '<f8'), ('error', '<f8')])#
Custom dtype for coherence routines.
- class qibocal.protocols.coherence.t1.T1Data(data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#
Bases:
Data
T1 acquisition outputs.
- data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]]#
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.
- qibocal.protocols.coherence.t1._acquisition(params: T1Parameters, platform: Platform, targets: list[Union[str, int]]) T1Data [source]#
Data acquisition for T1 experiment. In a T1 experiment, we measure an excited qubit after a delay. Due to decoherence processes (e.g. amplitude damping channel), it is possible that, at the time of measurement, after the delay, the qubit will not be excited anymore. The larger the delay time is, the more likely is the qubit to fall to the ground state. The goal of the experiment is to characterize the decay rate of the qubit towards the ground state.
- Parameters:
params –
platform (Platform) – Qibolab platform object
targets (list) – list of target qubits to perform the action
delay_before_readout_start (int) – Initial time delay before ReadOut
delay_before_readout_end (list) – Maximum time delay before ReadOut
delay_before_readout_step (int) – Scan range step for the delay before ReadOut
software_averages (int) – Number of executions of the routine for averaging results
points (int) – Save data results in a file every number of points
- qibocal.protocols.coherence.t1._fit(data: T1Data) T1Results [source]#
Fitting routine for T1 experiment. The used model is
\[y = p_0-p_1 e^{-x p_2}.\]
- qibocal.protocols.coherence.t1._plot(data: T1Data, target: Union[str, int], fit: Optional[T1Results] = None)[source]#
Plotting function for T1 experiment.
- qibocal.protocols.coherence.t1.t1 = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
T1 Routine object.
qibocal.protocols.coherence.t1_sequences module#
- qibocal.protocols.coherence.t1_sequences._acquisition(params: T1SignalParameters, platform: Platform, targets: list[Union[str, int]]) T1SignalData [source]#
Data acquisition for T1 experiment. In a T1 experiment, we measure an excited qubit after a delay. Due to decoherence processes (e.g. amplitude damping channel), it is possible that, at the time of measurement, after the delay, the qubit will not be excited anymore. The larger the delay time is, the more likely is the qubit to fall to the ground state. The goal of the experiment is to characterize the decay rate of the qubit towards the ground state.
- Parameters:
params –
platform (Platform) – Qibolab platform object
targets (list) – list of target qubits to perform the action
delay_before_readout_start (int) – Initial time delay before ReadOut
delay_before_readout_end (list) – Maximum time delay before ReadOut
delay_before_readout_step (int) – Scan range step for the delay before ReadOut
software_averages (int) – Number of executions of the routine for averaging results
points (int) – Save data results in a file every number of points
- qibocal.protocols.coherence.t1_sequences.t1_sequences = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
T1 Routine object.
qibocal.protocols.coherence.t1_signal module#
- class qibocal.protocols.coherence.t1_signal.T1SignalParameters(delay_before_readout_start: int, delay_before_readout_end: int, delay_before_readout_step: int, single_shot: bool = False)[source]#
Bases:
Parameters
T1 runcard inputs.
- class qibocal.protocols.coherence.t1_signal.T1SignalResults(t1: dict[Union[str, int], Union[float, list[float]]], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]])[source]#
Bases:
Results
T1 Signal outputs.
- class qibocal.protocols.coherence.t1_signal.T1SignalData(data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#
Bases:
Data
T1 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[+_ScalarType_co]]]#
Raw data acquired.
- property average#
- qibocal.protocols.coherence.t1_signal._acquisition(params: T1SignalParameters, platform: Platform, targets: list[Union[str, int]]) T1SignalData [source]#
Data acquisition for T1 experiment. In a T1 experiment, we measure an excited qubit after a delay. Due to decoherence processes (e.g. amplitude damping channel), it is possible that, at the time of measurement, after the delay, the qubit will not be excited anymore. The larger the delay time is, the more likely is the qubit to fall to the ground state. The goal of the experiment is to characterize the decay rate of the qubit towards the ground state.
- Parameters:
params –
platform (Platform) – Qibolab platform object
targets (list) – list of target qubits to perform the action
delay_before_readout_start (int) – Initial time delay before ReadOut
delay_before_readout_end (list) – Maximum time delay before ReadOut
delay_before_readout_step (int) – Scan range step for the delay before ReadOut
software_averages (int) – Number of executions of the routine for averaging results
points (int) – Save data results in a file every number of points
- qibocal.protocols.coherence.t1_signal._fit(data: T1SignalData) T1SignalResults [source]#
Fitting routine for T1 experiment. The used model is
\[y = p_0-p_1 e^{-x p_2}.\]
- qibocal.protocols.coherence.t1_signal._plot(data: T1SignalData, target: Union[str, int], fit: Optional[T1SignalResults] = None)[source]#
Plotting function for T1 experiment.
- qibocal.protocols.coherence.t1_signal._update(results: T1SignalResults, platform: Platform, target: Union[str, int])[source]#
- qibocal.protocols.coherence.t1_signal.t1_signal = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
T1 Signal Routine object.
qibocal.protocols.coherence.t2 module#
- class qibocal.protocols.coherence.t2.T2Parameters(delay_between_pulses_start: int, delay_between_pulses_end: int, delay_between_pulses_step: int, single_shot: bool = False)[source]#
Bases:
T2SignalParameters
T2 runcard inputs.
- class qibocal.protocols.coherence.t2.T2Results(t2: dict[typing.Union[str, int], typing.Union[float, list[float]]], fitted_parameters: dict[typing.Union[str, int], dict[str, float]], pcov: dict[typing.Union[str, int], list[float]], chi2: ~typing.Optional[dict[typing.Union[str, int], tuple[float, typing.Optional[float]]]] = <factory>)[source]#
Bases:
T2SignalResults
T2 outputs.
- chi2: Optional[dict[Union[str, int], tuple[float, Optional[float]]]]#
Chi squared estimate mean value and error.
- class qibocal.protocols.coherence.t2.T2Data(data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#
Bases:
T1Data
T2 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.
- qibocal.protocols.coherence.t2._acquisition(params: T2Parameters, platform: Platform, targets: list[Union[str, int]]) T2Data [source]#
Data acquisition for Ramsey Experiment (detuned).
- qibocal.protocols.coherence.t2._fit(data: T2Data) T2Results [source]#
The used model is
\[y = p_0 - p_1 e^{-x p_2}.\]
- qibocal.protocols.coherence.t2._plot(data: T2Data, target: Union[str, int], fit: Optional[T2Results] = None)[source]#
Plotting function for Ramsey Experiment.
- qibocal.protocols.coherence.t2.t2 = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
T2 Routine object.
qibocal.protocols.coherence.t2_sequences module#
- qibocal.protocols.coherence.t2_sequences._acquisition(params: T2SignalParameters, platform: Platform, targets: list[Union[str, int]]) T2SignalData [source]#
Data acquisition for Ramsey Experiment (detuned).
- qibocal.protocols.coherence.t2_sequences.t2_sequences = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
T2 Routine object.
qibocal.protocols.coherence.t2_signal module#
- class qibocal.protocols.coherence.t2_signal.T2SignalParameters(delay_between_pulses_start: int, delay_between_pulses_end: int, delay_between_pulses_step: int, single_shot: bool = False)[source]#
Bases:
Parameters
T2Signal runcard inputs.
- class qibocal.protocols.coherence.t2_signal.T2SignalResults(t2: dict[Union[str, int], Union[float, list[float]]], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]])[source]#
Bases:
Results
T2Signal outputs.
- class qibocal.protocols.coherence.t2_signal.T2SignalData(data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#
Bases:
T1SignalData
T2Signal acquisition outputs.
- _to_npz(path: Path, filename: str)#
Helper function to use np.savez while converting keys into strings.
- property average#
- 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.
- qibocal.protocols.coherence.t2_signal._acquisition(params: T2SignalParameters, platform: Platform, targets: list[Union[str, int]]) T2SignalData [source]#
Data acquisition for Ramsey Experiment (detuned).
- qibocal.protocols.coherence.t2_signal._fit(data: T2SignalData) T2SignalResults [source]#
The used model is
\[y = p_0 - p_1 e^{-x p_2}.\]
- qibocal.protocols.coherence.t2_signal._plot(data: T2SignalData, target: Union[str, int], fit: Optional[T2SignalResults] = None)[source]#
Plotting function for Ramsey Experiment.
- qibocal.protocols.coherence.t2_signal._update(results: T2SignalResults, platform: Platform, target: Union[str, int])[source]#
- qibocal.protocols.coherence.t2_signal.t2_signal = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#
T2Signal Routine object.
qibocal.protocols.coherence.utils module#
- qibocal.protocols.coherence.utils.CoherenceType = dtype([('wait', '<f8'), ('signal', '<f8'), ('phase', '<f8')])#
Custom dtype for coherence routines.
- qibocal.protocols.coherence.utils.average_single_shots(data_type, single_shots)[source]#
Convert single shot acquisition results of signal routines to averaged.
- Parameters:
data_type – Type of produced data object (eg.
T1SignalData
,T2SignalData
etc.).single_shots (dict) – Dictionary containing acquired single shot data.
qibocal.protocols.coherence.zeno module#
- class qibocal.protocols.coherence.zeno.ZenoParameters(readouts: int)[source]#
Bases:
ZenoSignalParameters
Zeno runcard inputs.
- class qibocal.protocols.coherence.zeno.ZenoData(data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>, readout_duration: dict[typing.Union[str, int], float] = <factory>)[source]#
Bases:
T1Data
- _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.
- class qibocal.protocols.coherence.zeno.ZenoResults(zeno_t1: dict[Union[str, int], int], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]], chi2: dict[Union[str, int], tuple[float, Optional[float]]])[source]#
Bases:
ZenoSignalResults
Zeno outputs.
- chi2: dict[Union[str, int], tuple[float, Optional[float]]]#
Chi squared estimate mean value and error.
- qibocal.protocols.coherence.zeno._acquisition(params: ZenoParameters, platform: Platform, targets: list[Union[str, int]]) ZenoData [source]#
In a T1_Zeno experiment, we measure an excited qubit repeatedly. Due to decoherence processes, it is possible that, at the time of measurement, the qubit will not be excited anymore. The quantum zeno effect consists of measuring allowing a particle’s time evolution to be slowed down by measuring it frequently enough. However, in the experiments we see that due the QND-ness of the readout pulse that the qubit decoheres faster. Reference: https://link.aps.org/accepted/10.1103/PhysRevLett.118.240401.
- qibocal.protocols.coherence.zeno._fit(data: ZenoData) ZenoResults [source]#
Fitting routine for T1 experiment. The used model is
\[y = p_0-p_1 e^{-x p_2}.\]
qibocal.protocols.coherence.zeno_signal module#
- class qibocal.protocols.coherence.zeno_signal.ZenoSignalParameters(readouts: int)[source]#
Bases:
Parameters
Zeno runcard inputs.
- qibocal.protocols.coherence.zeno_signal.ZenoSignalType = dtype([('signal', '<f8'), ('phase', '<f8')])#
Custom dtype for Zeno.
- class qibocal.protocols.coherence.zeno_signal.ZenoSignalData(readout_duration: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#
Bases:
Data
- data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]]#
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.
- class qibocal.protocols.coherence.zeno_signal.ZenoSignalResults(zeno_t1: dict[Union[str, int], int], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]])[source]#
Bases:
Results
Zeno outputs.
- qibocal.protocols.coherence.zeno_signal._acquisition(params: ZenoSignalParameters, platform: Platform, targets: list[Union[str, int]]) ZenoSignalData [source]#
In a T1_Zeno experiment, we measure an excited qubit repeatedly. Due to decoherence processes, it is possible that, at the time of measurement, the qubit will not be excited anymore. The quantum zeno effect consists of measuring allowing a particle’s time evolution to be slowed down by measuring it frequently enough. However, in the experiments we see that due the QND-ness of the readout pulse that the qubit decoheres faster. Reference: https://link.aps.org/accepted/10.1103/PhysRevLett.118.240401.
- qibocal.protocols.coherence.zeno_signal._fit(data: ZenoSignalData) ZenoSignalResults [source]#
Fitting routine for T1 experiment. The used model is
\[y = p_0-p_1 e^{-x p_2}.\]
- qibocal.protocols.coherence.zeno_signal._plot(data: ZenoSignalData, fit: ZenoSignalResults, target: Union[str, int])[source]#
Plotting function for T1 experiment.