qibocal.protocols.two_qubit_interaction.chevron package#

Submodules#

qibocal.protocols.two_qubit_interaction.chevron.chevron module#

SWAP experiment for two qubit gates, chevron plot.

class qibocal.protocols.two_qubit_interaction.chevron.chevron.ChevronParameters(amplitude_min_factor: float, amplitude_max_factor: float, amplitude_step_factor: float, duration_min: float, duration_max: float, duration_step: float, dt: Optional[int] = 0, parking: bool = True, native: str = 'CZ')[source]#

Bases: Parameters

CzFluxTime runcard inputs.

amplitude_min_factor: float#

Amplitude minimum.

amplitude_max_factor: float#

Amplitude maximum.

amplitude_step_factor: float#

Amplitude step.

duration_min: float#

Duration minimum.

duration_max: float#

Duration maximum.

duration_step: float#

Duration step.

dt: Optional[int] = 0#

Time delay between flux pulses and readout.

parking: bool = True#

Wether to park non interacting qubits or not.

native: str = 'CZ'#

Two qubit interaction to be calibrated.

iSWAP and CZ are the possible options.

property amplitude_range#
property duration_range#
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.two_qubit_interaction.chevron.chevron.ChevronResults(amplitude: dict[Tuple[Union[str, int], Union[str, int]], float], duration: dict[Tuple[Union[str, int], Union[str, int]], int], native: str = 'CZ')[source]#

Bases: Results

CzFluxTime outputs when fitting will be done.

amplitude: dict[Tuple[Union[str, int], Union[str, int]], float]#

CZ angle.

duration: dict[Tuple[Union[str, int], Union[str, int]], int]#

Virtual Z phase correction.

native: str = 'CZ'#

Two qubit interaction to be calibrated.

iSWAP and CZ are the possible options.

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

qibocal.protocols.two_qubit_interaction.chevron.chevron.ChevronType = dtype([('amp', '<f8'), ('length', '<f8'), ('prob_high', '<f8'), ('prob_low', '<f8')])#

Custom dtype for Chevron.

class qibocal.protocols.two_qubit_interaction.chevron.chevron.ChevronData(native_amplitude: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>, native: str = 'CZ', sweetspot: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>, data: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('length', '<f8'), ('prob_high', '<f8'), ('prob_low', '<f8')])]]] = <factory>, label: ~typing.Optional[str] = None)[source]#

Bases: Data

Chevron acquisition outputs.

native_amplitude: dict[Tuple[Union[str, int], Union[str, int]], float]#

CZ platform amplitude for qubit pair.

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

native: str = 'CZ'#

Two qubit interaction to be calibrated.

iSWAP and CZ are the possible options.

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

Sweetspot value for high frequency qubit.

data: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('length', '<f8'), ('prob_high', '<f8'), ('prob_low', '<f8')])]]]#
label: Optional[str] = None#

Label for the data.

register_qubit(low_qubit, high_qubit, length, amp, prob_low, prob_high)[source]#

Store output for single qubit.

amplitudes(pair)[source]#

Unique pair amplitudes.

durations(pair)[source]#

Unique pair durations.

low_frequency(pair)[source]#
high_frequency(pair)[source]#
qibocal.protocols.two_qubit_interaction.chevron.chevron._aquisition(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 its frequency.

Parameters:
  • platform – Platform to use.

  • params – Experiment parameters.

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

Returns:

Acquisition data.

Return type:

ChevronData

qibocal.protocols.two_qubit_interaction.chevron.chevron._fit(data: ChevronData) ChevronResults[source]#
qibocal.protocols.two_qubit_interaction.chevron.chevron._plot(data: ChevronData, fit: ChevronResults, target: Tuple[Union[str, int], Union[str, int]])[source]#

Plot the experiment result for a single pair.

qibocal.protocols.two_qubit_interaction.chevron.chevron._update(results: ChevronResults, platform: Platform, target: Tuple[Union[str, int], Union[str, int]])[source]#
qibocal.protocols.two_qubit_interaction.chevron.chevron.chevron = Routine(acquisition=<function _aquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=True)#

Chevron routine.

qibocal.protocols.two_qubit_interaction.chevron.chevron_signal module#

SWAP experiment for two qubit gates, chevron plot.

class qibocal.protocols.two_qubit_interaction.chevron.chevron_signal.ChevronSignalParameters(amplitude_min_factor: float, amplitude_max_factor: float, amplitude_step_factor: float, duration_min: float, duration_max: float, duration_step: float, dt: Optional[int] = 0, parking: bool = True, native: str = 'CZ')[source]#

Bases: ChevronParameters

ChevronSignal runcard inputs.

property amplitude_range#
dt: Optional[int] = 0#

Time delay between flux pulses and readout.

property duration_range#
hardware_average: bool = False#

By default hardware average will be performed.

native: str = 'CZ'#

Two qubit interaction to be calibrated.

iSWAP and CZ are the possible options.

parking: bool = True#

Wether to park non interacting qubits or not.

amplitude_min_factor: float#

Amplitude minimum.

amplitude_max_factor: float#

Amplitude maximum.

amplitude_step_factor: float#

Amplitude step.

duration_min: float#

Duration minimum.

duration_max: float#

Duration maximum.

duration_step: float#

Duration step.

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.two_qubit_interaction.chevron.chevron_signal.ChevronSignalResults(amplitude: dict[Tuple[Union[str, int], Union[str, int]], float], duration: dict[Tuple[Union[str, int], Union[str, int]], int], native: str = 'CZ')[source]#

Bases: ChevronResults

ChevronSignal outputs when fitting will be done.

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

native: str = 'CZ'#

Two qubit interaction to be calibrated.

iSWAP and CZ are the possible options.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

amplitude: dict[Tuple[Union[str, int], Union[str, int]], float]#

CZ angle.

duration: dict[Tuple[Union[str, int], Union[str, int]], int]#

Virtual Z phase correction.

qibocal.protocols.two_qubit_interaction.chevron.chevron_signal.ChevronSignalType = dtype([('amp', '<f8'), ('length', '<f8'), ('signal_high', '<f8'), ('signal_low', '<f8')])#

Custom dtype for Chevron.

class qibocal.protocols.two_qubit_interaction.chevron.chevron_signal.ChevronSignalData(native_amplitude: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>, native: str = 'CZ', sweetspot: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>, data: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('length', '<f8'), ('signal_high', '<f8'), ('signal_low', '<f8')])]]] = <factory>, label: ~typing.Optional[str] = None)[source]#

Bases: ChevronData

Chevron acquisition outputs.

data: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], numpy.ndarray[typing.Any, numpy.dtype[dtype([('amp', '<f8'), ('length', '<f8'), ('signal_high', '<f8'), ('signal_low', '<f8')])]]]#
register_qubit(low_qubit, high_qubit, length, amp, signal_low, signal_high)[source]#

Store output for single qubit.

low_frequency(pair)[source]#
high_frequency(pair)[source]#
_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.

amplitudes(pair)#

Unique pair amplitudes.

durations(pair)#

Unique pair durations.

label: Optional[str] = None#

Label for the data.

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.

native: str = 'CZ'#

Two qubit interaction to be calibrated.

iSWAP and CZ are the possible options.

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.

native_amplitude: dict[QubitPairId, float]#

CZ platform amplitude for qubit pair.

sweetspot: dict[QubitPairId, float]#

Sweetspot value for high frequency qubit.

qibocal.protocols.two_qubit_interaction.chevron.chevron_signal._aquisition(params: ChevronSignalParameters, platform: Platform, targets: list[Tuple[Union[str, int], Union[str, int]]]) ChevronSignalData[source]#

Perform an iSWAP/CZ experiment between pairs of qubits by changing its frequency.

Parameters:
  • params – Experiment parameters.

  • platform – Platform to use.

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

Returns:

Acquisition data.

Return type:

ChevronData

qibocal.protocols.two_qubit_interaction.chevron.chevron_signal.chevron_signal = Routine(acquisition=<function _aquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=True)#

Chevron routine.

qibocal.protocols.two_qubit_interaction.chevron.utils module#

qibocal.protocols.two_qubit_interaction.chevron.utils.COUPLER_PULSE_START = 0#

Start of coupler pulse.

qibocal.protocols.two_qubit_interaction.chevron.utils.COUPLER_PULSE_DURATION = 100#

Duration of coupler pulse.

qibocal.protocols.two_qubit_interaction.chevron.utils.chevron_sequence(platform: Platform, pair: Tuple[Union[str, int], Union[str, int]], duration_max: int, parking: bool = False, native: str = 'CZ', dt: int = 0)[source]#

Chevron pulse sequence.

qibocal.protocols.two_qubit_interaction.chevron.utils.chevron_fit(x, omega, phase, amplitude, offset)[source]#