qibocal.protocols.two_qubit_interaction package

Subpackages

Submodules

qibocal.protocols.two_qubit_interaction.optimize module

virtual correction experiment for two qubit gates, tune landscape.

qibocal.protocols.two_qubit_interaction.optimize.optimize_two_qubit_gate = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=True)

Optimize two qubit gate protocol

qibocal.protocols.two_qubit_interaction.utils module

qibocal.protocols.two_qubit_interaction.utils.order_pair(pair: ~typing.Annotated[tuple[~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ~typing.Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], ~pydantic.functional_validators.BeforeValidator(func=~qibocal.calibration.calibration.<lambda>, json_schema_input_type=PydanticUndefined), ~pydantic.functional_serializers.PlainSerializer(func=~qibocal.calibration.calibration.<lambda>, return_type=PydanticUndefined, when_used=always)], platform: ~qibolab._core.platform.platform.Platform) tuple[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]][source]

Order a pair of qubits by drive frequency.

qibocal.protocols.two_qubit_interaction.utils.fit_flux_amplitude(matrix, amps, times)[source]

Estimate amplitude for CZ gate.

Given the pattern of a chevron plot (see for example Fig. 2 here https://arxiv.org/pdf/1907.04818.pdf). This function estimates the CZ amplitude by finding the amplitude which gives the standard deviation, indicating that there are oscillation along the z axis.

Parameters:
  • matrix (np.ndarray) – signal matrix

  • amps (np.ndarray) – amplitudes swept

  • times (np.ndarray) – duration swept

Returns:

estimated amplitude index (int): amplitude index delta (float): omega for estimated amplitude

Return type:

amplitude (float)

qibocal.protocols.two_qubit_interaction.virtual_z_phases module

CZ virtual correction experiment for two qubit gates, tune landscape.

qibocal.protocols.two_qubit_interaction.virtual_z_phases.correct_virtual_z_phases = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=True)

Virtual phases correction protocol.

qibocal.protocols.two_qubit_interaction.virtual_z_phases.create_sequence(platform: CalibrationPlatform, setup: Literal['I', 'X'], target_qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], control_qubit: Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], ordered_pair: list[Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])], Annotated[int | str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]], native: Literal['CZ', 'iSWAP'], dt: float, flux_pulse_max_duration: float = None, gate_repetition: int = 1) tuple[PulseSequence, Pulse, list[Pulse]][source]

Create the pulse sequence for the calibration of two-qubit gate virtual phases.

This function constructs a pulse sequence for a given two-qubit native gate native (CZ or iSWAP) on the specified qubits. The sequence includes: - A preliminary RX90 pulse on the target_qubit. - An optional X pulse on the control_qubit based on the setup type. - A flux pulse implementing the two-qubit native gate. - A delay of duration dt before the final X90 pulse on the target qubit. - Measurement pulses. It is possible to specify the maximum duration for the flux pulses with the flux_pulse_max_duration parameter.

The function returns:
  • The full experiment pulse sequence.

  • The applied flux pulse.

  • The final VirtualZPhase pulses to be used for phase sweeping.

qibocal.protocols.two_qubit_interaction.virtual_z_phases.fit_sinusoid(thetas, data, gate_repetition)[source]

Fit sinusoid to the given data.

qibocal.protocols.two_qubit_interaction.virtual_z_phases.phase_diff(phase_1, phase_2)[source]

Return the phase difference of two sinusoids, normalized in the range [0, 2*pi].