qibocal.protocols.allxy package#

Submodules#

qibocal.protocols.allxy.allxy module#

class qibocal.protocols.allxy.allxy.AllXYParameters(beta_param: Optional[float] = None, unrolling: bool = False)[source]#

Bases: Parameters

AllXY runcard inputs.

beta_param: float = None#

Beta parameter for drag pulse.

unrolling: bool = False#

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

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.allxy.allxy.AllXYResults[source]#

Bases: Results

AllXY 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 params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

class qibocal.protocols.allxy.allxy.AllXYData(beta_param: ~typing.Optional[float] = None, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[+_ScalarType_co]]] = <factory>)[source]#

Bases: Data

AllXY acquisition outputs.

beta_param: float = None#

Beta parameter for drag pulse.

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

Raw data acquired.

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

qibocal.protocols.allxy.allxy._acquisition(params: AllXYParameters, platform: Platform, targets: list[Union[str, int]]) AllXYData[source]#

Data acquisition for allXY experiment. The AllXY experiment is a simple test of the calibration of single qubit gatesThe qubit (initialized in the |0> state) is subjected to two back-to-back single-qubit gates and measured. In each round, we run 21 different gate pairs: ideally, the first 5 return the qubit to |0>, the next 12 drive it to superposition state, and the last 4 put the qubit in |1> state.

qibocal.protocols.allxy.allxy.add_gate_pair_pulses_to_sequence(platform: Platform, gates, qubit, sequence, sequence_delay=0, readout_delay=0, beta_param=None)[source]#
qibocal.protocols.allxy.allxy._fit(_data: AllXYData) AllXYResults[source]#

Post-Processing for allXY

qibocal.protocols.allxy.allxy._plot(data: AllXYData, target: Union[str, int], fit: Optional[AllXYResults] = None)[source]#

Plotting function for allXY.

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

AllXY Routine object.

qibocal.protocols.allxy.allxy_drag_pulse_tuning module#

class qibocal.protocols.allxy.allxy_drag_pulse_tuning.AllXYDragParameters(beta_start: float, beta_end: float, beta_step: float)[source]#

Bases: Parameters

AllXYDrag runcard inputs.

beta_start: float#

Initial beta parameter for Drag pulse.

beta_end: float#

Final beta parameter for Drag pulse.

beta_step: float#

Step beta parameter for Drag pulse.

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.allxy.allxy_drag_pulse_tuning.AllXYDragResults[source]#

Bases: Results

AllXYDrag 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 params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

class qibocal.protocols.allxy.allxy_drag_pulse_tuning.AllXYDragData(beta_param: ~typing.Optional[float] = None, data: dict[tuple[typing.Union[str, int], float], numpy.ndarray[typing.Any, numpy.dtype[dtype([('prob', '<f8'), ('gate', '<U5'), ('errors', '<f8')])]]] = <factory>)[source]#

Bases: Data

AllXY acquisition outputs.

beta_param: Optional[float] = None#

Beta parameter for drag pulse.

data: dict[tuple[typing.Union[str, int], float], numpy.ndarray[typing.Any, numpy.dtype[dtype([('prob', '<f8'), ('gate', '<U5'), ('errors', '<f8')])]]]#

Raw data acquired.

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

property beta_params#

Access qubits from data structure.

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.

qibocal.protocols.allxy.allxy_drag_pulse_tuning._acquisition(params: AllXYDragParameters, platform: Platform, targets: list[Union[str, int]]) AllXYDragData[source]#

Data acquisition for allXY experiment varying beta. The AllXY experiment is a simple test of the calibration of single qubit gatesThe qubit (initialized in the |0> state) is subjected to two back-to-back single-qubit gates and measured. In each round, we run 21 different gate pairs: ideally, the first 5 return the qubit to |0>, the next 12 drive it to superposition state, and the last 4 put the qubit in |1> state.

The AllXY iteration method allows the user to execute iteratively the list of gates playing with the drag pulse shape in order to find the optimal drag pulse coefficient for pi pulses.

qibocal.protocols.allxy.allxy_drag_pulse_tuning._fit(_data: AllXYDragData) AllXYDragResults[source]#

Post-processing for allXYDrag.

qibocal.protocols.allxy.allxy_drag_pulse_tuning._plot(data: AllXYDragData, target: Union[str, int], fit: Optional[AllXYDragResults] = None)[source]#

Plotting function for allXYDrag.

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

AllXYDrag Routine object.

qibocal.protocols.allxy.allxy_resonator_depletion_tuning module#

class qibocal.protocols.allxy.allxy_resonator_depletion_tuning.AllXYResonatorParameters(delay_start: float, delay_end: float, delay_step: float)[source]#

Bases: Parameters

AllXYDrag runcard inputs.

delay_start: float#

Initial delay parameter for resonator depletion.

delay_end: float#

Final delay parameter for resonator depletion.

delay_step: float#

Step delay parameter for resonator depletion.

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.allxy.allxy_resonator_depletion_tuning.AllXYResonatorResults[source]#

Bases: Results

AllXYDrag 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 params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

class qibocal.protocols.allxy.allxy_resonator_depletion_tuning.AllXYResonatorData(delay_param: ~typing.Optional[float] = None, data: dict[tuple[typing.Union[str, int], float], numpy.ndarray[typing.Any, numpy.dtype[dtype([('prob', '<f8'), ('gate', '<U5'), ('errors', '<f8')])]]] = <factory>)[source]#

Bases: Data

AllXY acquisition outputs.

delay_param: Optional[float] = None#

Delay parameter for resonator depletion.

data: dict[tuple[typing.Union[str, int], float], numpy.ndarray[typing.Any, numpy.dtype[dtype([('prob', '<f8'), ('gate', '<U5'), ('errors', '<f8')])]]]#

Raw data acquired.

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

property delay_params#

Access qubits from data structure.

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.

qibocal.protocols.allxy.allxy_resonator_depletion_tuning._acquisition(params: AllXYResonatorParameters, platform: Platform, targets: list[Union[str, int]]) AllXYResonatorData[source]#

Data acquisition for allXY experiment varying delay after a measurement pulse to characterise resonator depletion time: https://arxiv.org/pdf/1604.00916. Passive resonator depletion time: Time it takes the process by which photons inside a resonator dissipate over time without any external intervention. After a measurement is performed, photons remain in the resonator and qubits errors induced if trying to drive the qubit by leftover photons due to the coupling resonator-qubit inducing a shift in the qubit frequency. This experiment is used to characterise the resonator depletion time by waiting an increased delay time until the allXY pattern looks right.

qibocal.protocols.allxy.allxy_resonator_depletion_tuning._fit(_data: AllXYResonatorData) AllXYResonatorResults[source]#

Post-processing for allXYDrag.

qibocal.protocols.allxy.allxy_resonator_depletion_tuning._plot(data: AllXYResonatorData, target: Union[str, int], fit: Optional[AllXYResonatorResults] = None)[source]#

Plotting function for allXYDrag.

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

AllXYDrag Routine object.