qibocal.protocols.couplers package#

Submodules#

qibocal.protocols.couplers.coupler_chevron module#

qibocal.protocols.couplers.coupler_chevron._acquisition(params: ChevronParameters, platform: Platform, targets: list[Tuple[Union[str, int], Union[str, int]]]) ChevronData[source]#

Perform an CZ experiment between pairs of qubits by changing the coupler state, qubits need to be pulses into their interaction point.

Parameters:
  • platform – Platform to use.

  • params – Experiment parameters.

  • targets (list) – List of pairs to use sequentially.

Returns:

Acquisition data.

Return type:

ChevronData

qibocal.protocols.couplers.coupler_chevron._fit(data: ChevronData) Results[source]#

Results for ChevronCouplers.

qibocal.protocols.couplers.coupler_chevron.plot(data: ChevronData, fit: Results, target)[source]#
qibocal.protocols.couplers.coupler_chevron.coupler_chevron = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function plot>, update=<function _dummy_update>, two_qubit_gates=True)#

Coupler cz/swap flux routine.

qibocal.protocols.couplers.coupler_qubit_spectroscopy module#

class qibocal.protocols.couplers.coupler_qubit_spectroscopy.CouplerSpectroscopyParametersQubit(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None, measured_qubits: Optional[list[Union[str, int]]] = None, amplitude: Optional[Union[int, float]] = None)[source]#

Bases: CouplerSpectroscopyParameters

drive_duration: Optional[int] = 2000#

Drive pulse duration to excite the qubit before the measurement

amplitude: Optional[Union[int, float]] = None#

Readout or qubit drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

hardware_average: bool = False#

By default hardware average will be performed.

measured_qubits: Optional[list[QubitId]] = None#

Qubit to measure from the pair

freq_width: int#

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

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware.

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state.

qibocal.protocols.couplers.coupler_qubit_spectroscopy._acquisition(params: CouplerSpectroscopyParametersQubit, platform: Platform, targets: list[Tuple[Union[str, int], Union[str, int]]]) CouplerSpectroscopyData[source]#

Data acquisition for CouplerQubit spectroscopy.

This consist on a frequency sweep on the qubit frequency while we change the flux coupler pulse amplitude of the coupler pulse. We expect to enable the coupler during the amplitude sweep and detect an avoided crossing that will be followed by the frequency sweep. This needs the qubits at resonance, the routine assumes a sweetspot value for the higher frequency qubit that moves it to the lower frequency qubit instead of trying to calibrate both pulses at once. This should be run after qubit_spectroscopy to further adjust the coupler sweetspot if needed and get some information on the flux coupler pulse amplitude requiered to enable 2q interactions.

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

CouplerQubitSpectroscopy Routine object.

qibocal.protocols.couplers.coupler_resonator_spectroscopy module#

qibocal.protocols.couplers.coupler_resonator_spectroscopy._acquisition(params: CouplerSpectroscopyParameters, platform: Platform, targets: list[Tuple[Union[str, int], Union[str, int]]]) CouplerSpectroscopyData[source]#

Data acquisition for CouplerResonator spectroscopy.

This consist on a frequency sweep on the readout frequency while we change the flux coupler pulse amplitude of the coupler pulse. We expect to enable the coupler during the amplitude sweep and detect an avoided crossing that will be followed by the frequency sweep. No need to have the qubits at resonance. This should be run after resonator_spectroscopy to detect couplers and adjust the coupler sweetspot if needed and get some information on the flux coupler pulse amplitude requiered to enable 2q interactions.

qibocal.protocols.couplers.coupler_resonator_spectroscopy._fit(data: CouplerSpectroscopyData) CouplerSpectroscopyResults[source]#

Post-processing function for CouplerResonatorSpectroscopy.

qibocal.protocols.couplers.coupler_resonator_spectroscopy._plot(data: CouplerSpectroscopyData, target: Tuple[Union[str, int], Union[str, int]], fit: CouplerSpectroscopyResults)[source]#

We may want to measure both qubits on the pair, that will require a different plotting that takes both.

qibocal.protocols.couplers.coupler_resonator_spectroscopy._update(results: CouplerSpectroscopyResults, platform: Platform, target: Tuple[Union[str, int], Union[str, int]])[source]#
qibocal.protocols.couplers.coupler_resonator_spectroscopy.coupler_resonator_spectroscopy = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

CouplerResonatorSpectroscopy Routine object.

qibocal.protocols.couplers.utils module#

class qibocal.protocols.couplers.utils.CouplerSpectroscopyParameters(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None, measured_qubits: Optional[list[Union[str, int]]] = None, amplitude: Optional[Union[int, float]] = None)[source]#

Bases: ResonatorFluxParameters

CouplerResonatorSpectroscopy and CouplerQubitSpectroscopy runcard inputs.

measured_qubits: Optional[list[Union[str, int]]] = None#

Qubit to measure from the pair

amplitude: Optional[Union[int, float]] = None#

Readout or qubit drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

hardware_average: bool = False#

By default hardware average will be performed.

freq_width: int#

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

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware.

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state.

qibocal.protocols.couplers.utils.CouplerSpecType = dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])#

Custom dtype for coupler resonator spectroscopy.

class qibocal.protocols.couplers.utils.CouplerSpectroscopyResults(sweetspot: dict[Union[str, int], float], pulse_amp: dict[Union[str, int], float], fitted_parameters: dict[Union[str, int], dict[str, float]])[source]#

Bases: Results

CouplerResonatorSpectroscopy or CouplerQubitSpectroscopy outputs.

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

Sweetspot for each coupler.

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

Pulse amplitude for the coupler.

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

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

Raw fitted parameters.

class qibocal.protocols.couplers.utils.CouplerSpectroscopyData(resonator_type: str, offset: dict[typing.Union[str, int], float] = <factory>, data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: Data

Data structure for CouplerResonatorSpectroscopy or CouplerQubitSpectroscopy.

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

save(path: Path)#

Store data to file.

resonator_type: str#

Resonator type.

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

Qubit bias offset.

data: dict[typing.Union[str, int], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired.

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

Store output for single qubit.