qibocal.protocols.qubit_spectroscopies package

Submodules

qibocal.protocols.qubit_spectroscopies.qubit_power_spectroscopy module

qibocal.protocols.qubit_spectroscopies.qubit_power_spectroscopy.qubit_power_spectroscopy = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _dummy_update>, two_qubit_gates=False)

QubitPowerSpectroscopy Routine object.

qibocal.protocols.qubit_spectroscopies.qubit_spectroscopy module

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

QubitSpectroscopy Routine object.

class qibocal.protocols.qubit_spectroscopies.qubit_spectroscopy.QubitSpectroscopyParameters(freq_width: int, freq_step: int, drive_duration: int, drive_amplitude: float | None = None, hardware_average: bool = True)[source]

Bases: Parameters

QubitSpectroscopy runcard inputs.

freq_width: int

Width [Hz] for frequency sweep relative to the qubit frequency.

freq_step: int

Frequency [Hz] step for sweep.

drive_duration: int

Drive pulse duration [ns]. Same for all qubits.

drive_amplitude: float | None = None

Drive pulse amplitude (optional). Same for all qubits.

hardware_average: bool = True

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.qubit_spectroscopies.qubit_spectroscopy.QubitSpectroscopyResults(frequency: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], dict[str, float]], amplitude: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float], fitted_parameters: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], list[float]], chi2_reduced: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], tuple[float, float | None]] = <factory>, error_fit_pars: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], list] = <factory>)[source]

Bases: Results

QubitSpectroscopy outputs.

frequency: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], dict[str, float]]

Drive frequecy [GHz] for each qubit.

amplitude: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float]

Input drive amplitude. Same for all qubits.

fitted_parameters: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], 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.

chi2_reduced: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], tuple[float, float | None]]

Chi2 reduced.

error_fit_pars: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], list]

Errors of the fit parameters.

class qibocal.protocols.qubit_spectroscopies.qubit_spectroscopy.QubitSpectroscopyData(resonator_type: str, amplitudes: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], float], fit_function: str = 'lorentzian', phase_sign: bool = False, data: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[dtype([('freq', '<f8'), ('signal', '<f8'), ('phase', '<f8'), ('error_signal', '<f8'), ('error_phase', '<f8')])]]] = <factory>, power_level: ~qibocal.protocols.utils.PowerLevel | None = None)[source]

Bases: ResonatorSpectroscopyData

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

fit_function: str = 'lorentzian'

Fit function (optional) used for the resonance.

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.

phase_sign: bool = False

Several instruments have their convention about the sign of the phase. If True, the routine will apply a minus to the phase data.

power_level: PowerLevel | None = None

Power regime of the resonator.

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.

resonator_type: str

Resonator type.

amplitudes: dict[QubitId, float]

Amplitudes provided by the user.

data: dict[QubitId, npt.NDArray[ResSpecType]]

Raw data acquired.

qibocal.protocols.qubit_spectroscopies.qubit_spectroscopy._fit(data: QubitSpectroscopyData) QubitSpectroscopyResults[source]

Post-processing function for QubitSpectroscopy.

qibocal.protocols.qubit_spectroscopies.qubit_spectroscopy_ef module

qibocal.protocols.qubit_spectroscopies.qubit_spectroscopy_ef.qubit_spectroscopy_ef = Routine(acquisition=<function _acquisition>, fit=<function fit_ef>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)

QubitSpectroscopyEF Routine object.