diff --git a/src/qibocal/protocols/two_qubit_interaction/optimize.py b/src/qibocal/protocols/two_qubit_interaction/optimize.py index 020eecb66..cf2ce3216 100644 --- a/src/qibocal/protocols/two_qubit_interaction/optimize.py +++ b/src/qibocal/protocols/two_qubit_interaction/optimize.py @@ -112,8 +112,6 @@ class OptimizeTwoQubitGateData(Data): """Angles swept.""" native: str = "CZ" """Native two qubit gate.""" - vphases: dict[QubitPairId, dict[QubitId, float]] = field(default_factory=dict) - """Virtual phases for each qubit.""" amplitudes: dict[tuple[QubitId, QubitId], float] = field(default_factory=dict) """"Amplitudes swept.""" durations: dict[tuple[QubitId, QubitId], float] = field(default_factory=dict) @@ -166,7 +164,6 @@ def _acquisition( for setup in ("I", "X"): ( sequence, - virtual_z_phase, theta_pulse, amplitude, data.durations[ord_pair], @@ -181,7 +178,6 @@ def _acquisition( params.parking, params.flux_pulse_amplitude_min, ) - data.vphases[ord_pair] = dict(virtual_z_phase) theta = np.arange( params.theta_start, params.theta_end, @@ -208,7 +204,7 @@ def _acquisition( sweeper_theta = Sweeper( Parameter.relative_phase, - theta - data.vphases[ord_pair][target_q], + theta, pulses=[theta_pulse], type=SweeperType.ABSOLUTE, ) @@ -246,7 +242,7 @@ def _acquisition( target_q, control_q, setup, - theta - data.vphases[ord_pair][target_q], + theta, data.amplitudes[ord_pair], data.durations[ord_pair], result_control, @@ -293,7 +289,7 @@ def _fit( try: popt, _ = curve_fit( fit_function, - np.array(data.thetas) - data.vphases[ord_pair][target], + np.array(data.thetas), target_data, p0=pguess, bounds=( diff --git a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py index e526198cd..c4659b660 100644 --- a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py +++ b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py @@ -88,7 +88,6 @@ class VirtualZPhasesData(Data): data: dict[tuple, npt.NDArray[VirtualZPhasesType]] = field(default_factory=dict) native: str = "CZ" thetas: list = field(default_factory=list) - vphases: dict[QubitPairId, dict[QubitId, float]] = field(default_factory=dict) amplitudes: dict[tuple[QubitId, QubitId], float] = field(default_factory=dict) durations: dict[tuple[QubitId, QubitId], float] = field(default_factory=dict) @@ -127,9 +126,7 @@ def create_sequence( ) RX_pulse_start = platform.create_RX_pulse(control_qubit, start=0, relative_phase=0) - flux_sequence, virtual_z_phase = getattr( - platform, f"create_{native}_pulse_sequence" - )( + flux_sequence, _ = getattr(platform, f"create_{native}_pulse_sequence")( (ordered_pair[1], ordered_pair[0]), start=max(Y90_pulse.finish, RX_pulse_start.finish), ) @@ -139,16 +136,15 @@ def create_sequence( if duration is not None: flux_sequence.get_qubit_pulses(ordered_pair[1])[0].duration = duration - theta_pulse = platform.create_RX90_pulse( target_qubit, start=flux_sequence.finish + dt, - relative_phase=virtual_z_phase[target_qubit], + relative_phase=0, ) RX_pulse_end = platform.create_RX_pulse( control_qubit, start=flux_sequence.finish + dt, - relative_phase=virtual_z_phase[control_qubit], + relative_phase=0, ) measure_target = platform.create_qubit_readout_pulse( target_qubit, start=theta_pulse.finish @@ -177,10 +173,8 @@ def create_sequence( if pulse.qubit not in ordered_pair: pulse.duration = theta_pulse.finish sequence.add(pulse) - return ( sequence, - virtual_z_phase, theta_pulse, flux_sequence.get_qubit_pulses(ordered_pair[1])[0].amplitude, flux_sequence.get_qubit_pulses(ordered_pair[1])[0].duration, @@ -222,7 +216,6 @@ def _acquisition( for setup in ("I", "X"): ( sequence, - virtual_z_phase, theta_pulse, data.amplitudes[ord_pair], data.durations[ord_pair], @@ -237,7 +230,6 @@ def _acquisition( params.parking, params.flux_pulse_amplitude, ) - data.vphases[ord_pair] = dict(virtual_z_phase) theta = np.arange( params.theta_start, params.theta_end, diff --git a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py index 64bd0a7ab..d4f54ec46 100644 --- a/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py +++ b/src/qibocal/protocols/two_qubit_interaction/virtual_z_phases_signal.py @@ -75,7 +75,6 @@ def _acquisition( for setup in ("I", "X"): ( sequence, - virtual_z_phase, theta_pulse, data.amplitudes[ord_pair], data.durations[ord_pair], @@ -90,7 +89,6 @@ def _acquisition( params.parking, params.flux_pulse_amplitude, ) - data.vphases[ord_pair] = dict(virtual_z_phase) theta = np.arange( params.theta_start, params.theta_end,