Skip to content

Commit

Permalink
refactor: remove virtual_z_phase and data.vphases
Browse files Browse the repository at this point in the history
  • Loading branch information
Edoardo-Pedicillo committed Oct 30, 2024
1 parent 3c5a42d commit 535f5e6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion src/qibocal/protocols/two_qubit_interaction/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def _acquisition(
for setup in ("I", "X"):
(
sequence,
virtual_z_phase,
theta_pulse,
amplitude,
data.durations[ord_pair],
Expand Down
10 changes: 1 addition & 9 deletions src/qibocal/protocols/two_qubit_interaction/virtual_z_phases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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),
)
Expand All @@ -139,7 +136,6 @@ 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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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],
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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,
Expand Down

0 comments on commit 535f5e6

Please sign in to comment.