qibocal.protocols.two_qubit_interaction package#

Subpackages#

Submodules#

qibocal.protocols.two_qubit_interaction.cz_virtualz module#

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

class qibocal.protocols.two_qubit_interaction.cz_virtualz.CZVirtualZParameters(theta_start: float, theta_end: float, theta_step: float, flux_pulse_amplitude: Optional[float] = None, flux_pulse_duration: Optional[float] = None, dt: Optional[float] = 20, parking: bool = True)[source]#

Bases: Parameters

CzVirtualZ runcard inputs.

theta_start: float#

Initial angle for the low frequency qubit measurement in radians.

theta_end: float#

Final angle for the low frequency qubit measurement in radians.

theta_step: float#

Step size for the theta sweep in radians.

flux_pulse_amplitude: Optional[float] = None#

Amplitude of flux pulse implementing CZ.

flux_pulse_duration: Optional[float] = None#

Duration of flux pulse implementing CZ.

dt: Optional[float] = 20#

Time delay between flux pulses and readout.

parking: bool = True#

Wether to park non interacting qubits or not.

class qibocal.protocols.two_qubit_interaction.cz_virtualz.CZVirtualZResults(fitted_parameters: dict[tuple[str, Union[str, int]]], cz_angle: dict[Tuple[Union[str, int], Union[str, int]], float], virtual_phase: dict[Tuple[Union[str, int], Union[str, int]], dict[Union[str, int], float]], leakage: dict[Tuple[Union[str, int], Union[str, int]], dict[Union[str, int], float]])[source]#

Bases: Results

CzVirtualZ outputs when fitting will be done.

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

Fitted parameters

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

CZ angle.

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

Virtual Z phase correction.

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

Leakage on control qubit for pair.

class qibocal.protocols.two_qubit_interaction.cz_virtualz.CZVirtualZData(data: dict[tuple, numpy.ndarray[typing.Any, numpy.dtype[dtype([('target', '<f8'), ('control', '<f8')])]]] = <factory>, thetas: list = <factory>, vphases: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], dict[typing.Union[str, int], float]] = <factory>, amplitudes: dict[tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>, durations: dict[tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>)[source]#

Bases: Data

CZVirtualZ data.

data: dict[tuple, numpy.ndarray[typing.Any, numpy.dtype[dtype([('target', '<f8'), ('control', '<f8')])]]]#
thetas: list#
vphases: dict[Tuple[Union[str, int], Union[str, int]], dict[Union[str, int], float]]#
amplitudes: dict[tuple[Union[str, int], Union[str, int]], float]#
durations: dict[tuple[Union[str, int], Union[str, int]], float]#
qibocal.protocols.two_qubit_interaction.cz_virtualz.create_sequence(platform: Platform, setup: str, target_qubit: Union[str, int], control_qubit: Union[str, int], ordered_pair: list[Union[str, int], Union[str, int]], parking: bool, dt: float, amplitude: Optional[float] = None, duration: Optional[float] = None) tuple[qibolab.pulses.PulseSequence, dict[Union[str, int], qibolab.pulses.Pulse], dict[Union[str, int], qibolab.pulses.Pulse], dict[Union[str, int], qibolab.pulses.Pulse], dict[Union[str, int], qibolab.pulses.Pulse]][source]#

Create the experiment PulseSequence.

qibocal.protocols.two_qubit_interaction.cz_virtualz.fit_function(x, p0, p1, p2)[source]#

Sinusoidal fit function.

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

CZ virtual Z correction routine.

qibocal.protocols.two_qubit_interaction.cz_virtualz_signal module#

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

class qibocal.protocols.two_qubit_interaction.cz_virtualz_signal.CZVirtualZSignalParameters(theta_start: float, theta_end: float, theta_step: float, flux_pulse_amplitude: Optional[float] = None, flux_pulse_duration: Optional[float] = None, dt: Optional[float] = 20, parking: bool = True)[source]#

Bases: CZVirtualZParameters

CzVirtualZ runcard inputs.

class qibocal.protocols.two_qubit_interaction.cz_virtualz_signal.CZVirtualZSignalResults(fitted_parameters: dict[tuple[str, Union[str, int]]], cz_angle: dict[Tuple[Union[str, int], Union[str, int]], float], virtual_phase: dict[Tuple[Union[str, int], Union[str, int]], dict[Union[str, int], float]], leakage: dict[Tuple[Union[str, int], Union[str, int]], dict[Union[str, int], float]])[source]#

Bases: CZVirtualZResults

CzVirtualZ outputs when fitting will be done.

class qibocal.protocols.two_qubit_interaction.cz_virtualz_signal.CZVirtualZSignalData(data: dict[tuple, numpy.ndarray[typing.Any, numpy.dtype[dtype([('target', '<f8'), ('control', '<f8')])]]] = <factory>, thetas: list = <factory>, vphases: dict[typing.Tuple[typing.Union[str, int], typing.Union[str, int]], dict[typing.Union[str, int], float]] = <factory>, amplitudes: dict[tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>, durations: dict[tuple[typing.Union[str, int], typing.Union[str, int]], float] = <factory>)[source]#

Bases: CZVirtualZData

CZVirtualZ data.

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

CZ virtual Z correction routine.

qibocal.protocols.two_qubit_interaction.utils module#

qibocal.protocols.two_qubit_interaction.utils.RANDOM_HIGH_VALUE = 1000000.0#

High value to avoid None when computing FFT.

qibocal.protocols.two_qubit_interaction.utils.order_pair(pair: Tuple[Union[str, int], Union[str, int]], platform: Platform) tuple[Union[str, int], Union[str, int]][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 highest oscillation period. In case there are multiple values with the same period, given the symmetry, the median value is chosen. The FFT also gives a first estimate for the duration of the CZ gate.

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)