qibocal.protocols.allxy package#

Submodules#

qibocal.protocols.allxy.allxy module#

class qibocal.protocols.allxy.allxy.AllXYParameters(beta_param: 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: float = None, data: dict[typing.Union[int, str], 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[int, str], 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: CalibrationPlatform, targets: list[Union[int, str]]) 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.apply_drag(pulse: Pulse, beta_param: Optional[float] = None) Pulse[source]#

Apply Drag with parameter beta.

qibocal.protocols.allxy.allxy.allxy_sequence(platform: CalibrationPlatform, gates, qubit, sequence_delay=None, readout_delay=None, 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[int, str], fit: 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_resonator_depletion_tuning module#

class qibocal.protocols.allxy.allxy_resonator_depletion_tuning.AllXYResonatorParameters(delay_start: float, delay_end: float, delay_step: float, readout_delay: int = 1000, unrolling: bool = False, beta_param: float = None)[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.

readout_delay: int = 1000#

Delay on readout.

unrolling: bool = False#

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

beta_param: float = None#

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_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[int, str], float], numpy.ndarray[typing.Any, numpy.dtype[dtype([('prob', '<f8'), ('gate', '<U5'), ('errors', '<f8')])]]] = <factory>)[source]#

Bases: Data

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

delay_param: Optional[float] = None#

Delay parameter for resonator depletion.

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[tuple[typing.Union[int, str], float], numpy.ndarray[typing.Any, numpy.dtype[dtype([('prob', '<f8'), ('gate', '<U5'), ('errors', '<f8')])]]]#

Raw data acquired.

property delay_params#

Access qubits from data structure.

qibocal.protocols.allxy.allxy_resonator_depletion_tuning._acquisition(params: AllXYResonatorParameters, platform: CalibrationPlatform, targets: list[Union[int, str]]) 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[int, str], fit: 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.