qibocal.protocols.drag package

Submodules

qibocal.protocols.drag.drag module

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

DragTuning Routine object.

class qibocal.protocols.drag.drag.DragTuningParameters(beta_start: float, beta_end: float, beta_step: float, unrolling: bool = False, nflips: int = 1)[source]

Bases: Parameters

DragTuning runcard inputs.

beta_start: float

DRAG pulse beta start sweep parameter.

beta_end: float

DRAG pulse beta end sweep parameter.

beta_step: float

DRAG pulse beta sweep step parameter.

unrolling: bool = False

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

nflips: int = 1

Repetitions of (Xpi - Xmpi).

hardware_average: bool = False

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.drag.drag.DragTuningResults(betas: 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')])], dict[str, float]], chi2: dict[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], tuple[float, float | None]] = <factory>)[source]

Bases: Results

DragTuning outputs.

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

Optimal beta paramter for each qubit.

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

Raw fitting output.

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

Chi2 calculation.

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

class qibocal.protocols.drag.drag.DragTuningData(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([('prob', '<f8'), ('error', '<f8'), ('beta', '<f8')])]]] = <factory>)[source]

Bases: Data

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

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.

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.

data: dict[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ndarray[tuple[Any, ...], dtype[dtype(['prob', '<f8', 'error', '<f8', 'beta', '<f8'])]]]

Raw data acquired.

qibocal.protocols.drag.drag_simple module

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

DragTuning Routine object.