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], tuple[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.

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.

delay_between_pulses_start: int#

Initial delay between pulses [ns].

delay_between_pulses_end: int#

Final delay between pulses [ns].

delay_between_pulses_step: int#

Step delay between pulses [ns].

unrolling: bool = False#

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

single_shot: bool = False#

If True save single shot signal data.

class qibocal.protocols.coherence.spin_echo_signal.SpinEchoSignalResults(t2_spin_echo: dict[Union[str, int], tuple[float]], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]])[source]#

Bases: Results

SpinEchoSignal outputs.

t2_spin_echo: dict[Union[str, int], tuple[float]]#

T2 echo for each qubit.

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

Raw fitting output.

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

Approximate covariance of fitted parameters.

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.

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], tuple[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: T1SignalResults

T1 outputs.

chi2: Optional[dict[Union[str, int], tuple[float, Optional[float]]]]#

Chi squared estimate mean value and error.

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.

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.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.

delay_before_readout_start: int#

Initial delay before readout [ns].

delay_before_readout_end: int#

Final delay before readout [ns].

delay_before_readout_step: int#

Step delay before readout [ns].

single_shot: bool = False#

If True save single shot signal data.

class qibocal.protocols.coherence.t1_signal.T1SignalResults(t1: dict[Union[str, int], tuple[float]], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]])[source]#

Bases: Results

T1 Signal outputs.

t1: dict[Union[str, int], tuple[float]]#

T1 for each qubit.

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

Raw fitting output.

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

Approximate covariance of fitted parameters.

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.

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]]#

Raw data acquired.

property average#
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.

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.

class qibocal.protocols.coherence.t2.T2Results(t2: dict[typing.Union[str, int], tuple[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.

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.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.

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.

single_shot: bool = False#

If True save single shot signal data.

class qibocal.protocols.coherence.t2_signal.T2SignalResults(t2: dict[Union[str, int], tuple[float]], fitted_parameters: dict[Union[str, int], dict[str, float]], pcov: dict[Union[str, int], list[float]])[source]#

Bases: Results

T2Signal outputs.

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

T2 for each qubit [ns].

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

Raw fitting output.

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

Approximate covariance of fitted parameters.

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.

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

T2 for each qubit [ns].

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

Raw fitting output.

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.utils.exp_decay(x, *p)[source]#
qibocal.protocols.coherence.utils.exponential_fit(data, zeno=None)[source]#
qibocal.protocols.coherence.utils.exponential_fit_probability(data)[source]#

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

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

Readout durations for each qubit

class qibocal.protocols.coherence.zeno.ZenoResults(zeno_t1: dict[Union[str, int], int], fitted_parameters: dict[Union[str, int], dict[str, 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_signal module#

class qibocal.protocols.coherence.zeno_signal.ZenoSignalParameters(readouts: int)[source]#

Bases: Parameters

Zeno runcard inputs.

readouts: int#

Number of readout pulses

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

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

Readout durations for each qubit

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]]#

Raw data acquired.

register_qubit(qubit, signal, phase)[source]#

Store output for single qubit.

class qibocal.protocols.coherence.zeno_signal.ZenoSignalResults(zeno_t1: dict[Union[str, int], int], fitted_parameters: dict[Union[str, int], dict[str, float]])[source]#

Bases: Results

Zeno outputs.

zeno_t1: dict[Union[str, int], int]#

T1 for each qubit.

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

Raw fitting output.